Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
melodic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
melodic
Commits
81c3c734
Commit
81c3c734
authored
17 years ago
by
Christian Beckmann
Browse files
Options
Downloads
Patches
Plain Diff
MM report option added
parent
636a0b81
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
meldata.cc
+7
-2
7 additions, 2 deletions
meldata.cc
melica.cc
+6
-3
6 additions, 3 deletions
melica.cc
melodic.cc
+4
-5
4 additions, 5 deletions
melodic.cc
with
17 additions
and
10 deletions
meldata.cc
+
7
−
2
View file @
81c3c734
...
@@ -413,16 +413,21 @@ namespace Melodic{
...
@@ -413,16 +413,21 @@ namespace Melodic{
// ICadjust = IC;
// ICadjust = IC;
}
}
else
{
else
{
Matrix
resids
=
stdev
(
Data
-
mixMatrix
*
IC
);
Matrix
resids
=
stdev
(
Data
-
mixMatrix
*
IC
);
for
(
int
ctr
=
1
;
ctr
<=
resids
.
Ncols
();
ctr
++
)
for
(
int
ctr
=
1
;
ctr
<=
resids
.
Ncols
();
ctr
++
)
if
(
resids
(
1
,
ctr
)
<
0.05
)
if
(
resids
(
1
,
ctr
)
<
0.05
)
resids
(
1
,
ctr
)
=
1
;
resids
(
1
,
ctr
)
=
1
;
stdNoisei
=
pow
(
stdev
(
Data
-
mixMatrix
*
IC
)
*
// stdNoisei = pow(stdev(Data - mixMatrix * IC)*
// std::sqrt((float)(Data.Nrows()-1))/
// std::sqrt((float)(Data.Nrows()-IC.Nrows())),-1);
stdNoisei
=
pow
(
resids
*
std
::
sqrt
((
float
)(
Data
.
Nrows
()
-
1
))
/
std
::
sqrt
((
float
)(
Data
.
Nrows
()
-
1
))
/
std
::
sqrt
((
float
)(
Data
.
Nrows
()
-
IC
.
Nrows
())),
-
1
);
std
::
sqrt
((
float
)(
Data
.
Nrows
()
-
IC
.
Nrows
())),
-
1
);
ColumnVector
diagvals
;
ColumnVector
diagvals
;
diagvals
=
pow
(
diag
(
unmixMatrix
*
unmixMatrix
.
t
()),
-
0.5
);
diagvals
=
pow
(
diag
(
unmixMatrix
*
unmixMatrix
.
t
()),
-
0.5
);
save4D
(
SP
(
IC
,
diagvals
*
stdNoisei
),
opts
.
outputfname
.
value
()
+
"_IC"
);
save4D
(
SP
(
IC
,
diagvals
*
stdNoisei
),
opts
.
outputfname
.
value
()
+
"_IC"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
melica.cc
+
6
−
3
View file @
81c3c734
...
@@ -101,9 +101,11 @@ namespace Melodic{
...
@@ -101,9 +101,11 @@ namespace Melodic{
}
}
//termination condition : angle between old and new < epsilon
//termination condition : angle between old and new < epsilon
minAbsSin
=
1
-
diag
(
abs
(
redUMM
.
t
()
*
redUMM_old
)).
Minimum
();
minAbsSin
=
1
-
diag
(
abs
(
redUMM
.
t
()
*
redUMM_old
)).
Minimum
();
message
(
" Step no. "
<<
cum_itt
+
itt_ctr
<<
" change : "
<<
minAbsSin
<<
endl
);
message
(
" Step no. "
<<
cum_itt
+
itt_ctr
<<
" change : "
<<
minAbsSin
<<
endl
);
if
((
abs
(
minAbsSin
)
<
opts
.
epsilon
.
value
())
&&
// if((abs(minAbsSin) < opts.epsilon.value())&&
(
opts
.
approach
.
value
()
!=
string
(
"tica"
))){
break
;}
// (opts.approach.value()!=string("tica"))){ break;}
if
((
abs
(
minAbsSin
)
<
opts
.
epsilon
.
value
())){
break
;}
itt_ctr
++
;
itt_ctr
++
;
}
while
(
itt_ctr
<
opts
.
maxNumItt
.
value
());
}
while
(
itt_ctr
<
opts
.
maxNumItt
.
value
());
...
@@ -119,7 +121,7 @@ namespace Melodic{
...
@@ -119,7 +121,7 @@ namespace Melodic{
temp
=
melodat
.
reduce_dimred
(
temp
);
temp
=
melodat
.
reduce_dimred
(
temp
);
redUMM
=
melodat
.
get_white
()
*
temp
;
redUMM
=
melodat
.
get_white
()
*
temp
;
message
(
" change : "
<<
abs
(
minAbsSin2
)
<<
endl
);
message
(
" change : "
<<
minAbsSin2
<<
endl
);
if
(
abs
(
minAbsSin2
)
<
opts
.
epsilonS
.
value
()
&&
abs
(
minAbsSin
)
<
opts
.
epsilon
.
value
()){
break
;}
if
(
abs
(
minAbsSin2
)
<
opts
.
epsilonS
.
value
()
&&
abs
(
minAbsSin
)
<
opts
.
epsilon
.
value
()){
break
;}
}
}
}
while
(
}
while
(
...
@@ -467,6 +469,7 @@ namespace Melodic{
...
@@ -467,6 +469,7 @@ namespace Melodic{
melodat
.
set_mix
(
tmp
);
melodat
.
set_mix
(
tmp
);
melodat
.
set_IC
(
temp
);
melodat
.
set_IC
(
temp
);
melodat
.
set_ICstats
(
scales
);
melodat
.
set_ICstats
(
scales
);
melodat
.
sort
();
melodat
.
sort
();
...
...
This diff is collapsed.
Click to expand it.
melodic.cc
+
4
−
5
View file @
81c3c734
...
@@ -114,7 +114,7 @@ int main(int argc, char *argv[]){
...
@@ -114,7 +114,7 @@ int main(int argc, char *argv[]){
opts
.
pca_dim
.
set_T
(
opts
.
pca_dim
.
value
()
-
retry
*
opts
.
retrystep
);
opts
.
pca_dim
.
set_T
(
opts
.
pca_dim
.
value
()
-
retry
*
opts
.
retrystep
);
}
}
else
{
else
{
if
(
opts
.
pca_dim
.
value
()
-
retry
*
opts
.
retrystep
<
melodat
.
data_dim
()){
if
(
opts
.
pca_dim
.
value
()
+
retry
*
opts
.
retrystep
<
melodat
.
data_dim
()){
opts
.
pca_dim
.
set_T
(
opts
.
pca_dim
.
value
()
+
retry
*
opts
.
retrystep
);
opts
.
pca_dim
.
set_T
(
opts
.
pca_dim
.
value
()
+
retry
*
opts
.
retrystep
);
}
else
{
}
else
{
leaveloop
=
true
;
//stupid, but break does not compile
leaveloop
=
true
;
//stupid, but break does not compile
...
@@ -234,7 +234,7 @@ void mmonly(Log& logger, MelodicOptions& opts,
...
@@ -234,7 +234,7 @@ void mmonly(Log& logger, MelodicOptions& opts,
message
(
" done"
<<
endl
);
message
(
" done"
<<
endl
);
}
}
message
(
"Reading mixing matrix "
<<
opts
.
filtermix
.
value
());
message
(
"Reading mixing matrix "
<<
opts
.
filtermix
.
value
()
<<
" ... "
);
mixMatrix
=
read_ascii_matrix
(
opts
.
filtermix
.
value
());
mixMatrix
=
read_ascii_matrix
(
opts
.
filtermix
.
value
());
if
(
mixMatrix
.
Storage
()
<=
0
)
{
if
(
mixMatrix
.
Storage
()
<=
0
)
{
cerr
<<
" Please specify the mixing matrix correctly"
<<
endl
;
cerr
<<
" Please specify the mixing matrix correctly"
<<
endl
;
...
@@ -257,13 +257,12 @@ void mmonly(Log& logger, MelodicOptions& opts,
...
@@ -257,13 +257,12 @@ void mmonly(Log& logger, MelodicOptions& opts,
}
}
}
}
melodat
.
tempInfo
=
ICvolInfo
;
melodat
.
tempInfo
=
ICvolInfo
;
melodat
.
set_mask
(
Mask
);
melodat
.
set_mask
(
Mask
);
melodat
.
set_mean
(
Mean
);
melodat
.
set_mean
(
Mean
);
melodat
.
set_IC
(
ICs
);
melodat
.
set_IC
(
ICs
);
melodat
.
set_mix
(
mixMatrix
);
melodat
.
set_mix
(
mixMatrix
);
fmixMatrix
=
calc_FFT
(
m
elodat
.
expand_mix
()
,
opts
.
logPower
.
value
());
fmixMatrix
=
calc_FFT
(
m
ixMatrix
,
opts
.
logPower
.
value
());
melodat
.
set_fmix
(
fmixMatrix
);
melodat
.
set_fmix
(
fmixMatrix
);
fmixMatrix
=
pinv
(
mixMatrix
);
fmixMatrix
=
pinv
(
mixMatrix
);
melodat
.
set_unmix
(
fmixMatrix
);
melodat
.
set_unmix
(
fmixMatrix
);
...
@@ -272,7 +271,7 @@ void mmonly(Log& logger, MelodicOptions& opts,
...
@@ -272,7 +271,7 @@ void mmonly(Log& logger, MelodicOptions& opts,
Matrix
mmres
;
Matrix
mmres
;
Matrix
pmaps
;
//(ICs);
Matrix
pmaps
;
//(ICs);
if
(
opts
.
perf_mm
.
value
())
if
(
opts
.
perf_mm
.
value
())
mmres
=
mmall
(
logger
,
opts
,
melodat
,
report
,
pmaps
);
mmres
=
mmall
(
logger
,
opts
,
melodat
,
report
,
pmaps
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment