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
2ebc3060
Commit
2ebc3060
authored
12 years ago
by
Christian Beckmann
Browse files
Options
Downloads
Patches
Plain Diff
fixed GLM OLS bug
parent
09112c50
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
meldata.cc
+14
-9
14 additions, 9 deletions
meldata.cc
melica.cc
+1
-1
1 addition, 1 deletion
melica.cc
test.cc
+15
-11
15 additions, 11 deletions
test.cc
with
30 additions
and
21 deletions
meldata.cc
+
14
−
9
View file @
2ebc3060
...
...
@@ -138,18 +138,24 @@ namespace Melodic{
void
MelodicData
::
set_TSmode
()
{
dbgmsg
(
string
(
"START: set_TSmode"
));
Matrix
tmp
,
tmpT
,
tmpS
,
tmpT2
,
tmpS2
,
tmpT3
;
tmp
=
expand_dimred
(
mixMatrix
);
tmpT
=
zeros
(
tmp
.
Nrows
()
/
numfiles
,
tmp
.
Ncols
());
tmpS
=
zeros
(
numfiles
,
tmp
.
Ncols
());
if
(
opts
.
approach
.
value
()
==
string
(
"tica"
)){
outMsize
(
"tmp"
,
tmp
);
outMsize
(
"tmpT"
,
tmpT
);
outMsize
(
"tmpS"
,
tmpS
);
dbgmsg
(
string
(
" approach "
)
<<
opts
.
approach
.
value
()
<<
endl
);
if
(
!
opts
.
approach
.
value
()
==
string
(
"concat"
)){
message
(
"Calculating T- and S-modes "
<<
endl
);
explained_var
=
krfact
(
tmp
,
tmpT
,
tmpS
);
outMsize
(
"tmp"
,
tmp
);
outMsize
(
"tmpT"
,
tmpT
);
outMsize
(
"tmpS"
,
tmpS
);
if
(
opts
.
approach
.
value
()
==
string
(
"tica"
)){
if
(
opts
.
approach
.
value
()
==
string
(
"tica"
)){
Tmodes
.
clear
();
Smodes
.
clear
();
for
(
int
ctr
=
1
;
ctr
<=
tmp
.
Ncols
();
ctr
++
){
tmpT3
<<
reshape
(
tmp
.
Column
(
ctr
),
tmpT
.
Nrows
(),
numfiles
);
...
...
@@ -165,7 +171,6 @@ namespace Melodic{
}
add_Tmodes
(
tmpT2
);
add_Smodes
(
tmpS2
);
}
}
//add GLM OLS fit
...
...
@@ -185,9 +190,9 @@ namespace Melodic{
}
}
//
else{
//
add_Tmodes(tmp);
//
}
else
{
add_Tmodes
(
tmp
);
}
dbgmsg
(
string
(
"END: set_TSmode"
));
...
...
This diff is collapsed.
Click to expand it.
melica.cc
+
1
−
1
View file @
2ebc3060
...
...
@@ -476,7 +476,7 @@ namespace Melodic {
melodat
.
set_ICstats
(
scales
);
melodat
.
sort
();
message
(
"Calculating T- and S-modes "
<<
endl
);
//
message("Calculating T- and S-modes " << endl);
melodat
.
set_TSmode
();
}
...
...
This diff is collapsed.
Click to expand it.
test.cc
+
15
−
11
View file @
2ebc3060
...
...
@@ -34,6 +34,12 @@ using namespace std;
Option
<
int
>
help
(
string
(
"-h,--help"
),
0
,
string
(
"display this help text"
),
false
,
no_argument
);
Option
<
int
>
xdim
(
string
(
"-x,--xdim"
),
10
,
string
(
"xdim"
),
false
,
requires_argument
);
Option
<
int
>
ydim
(
string
(
"-y,--ydim"
),
10
,
string
(
"ydim"
),
false
,
requires_argument
);
/*
}
*/
...
...
@@ -42,7 +48,12 @@ using namespace std;
// Local functions
int
do_work
(
int
argc
,
char
*
argv
[])
{
Matrix
test
;
cerr
<<
" X: "
<<
xdim
.
value
()
<<
", Y: "
<<
ydim
.
value
()
<<
endl
;
test
=
zeros
(
xdim
.
value
(),
ydim
.
value
());
cerr
<<
"Created matrix of size "
<<
test
.
Nrows
()
<<
" x "
<<
test
.
Ncols
()
<<
endl
;
return
0
;
}
...
...
@@ -55,17 +66,10 @@ int do_work(int argc, char* argv[]) {
// must include all wanted options here (the order determines how
// the help message is printed)
double
tmptime
=
time
(
NULL
);
srand
((
unsigned
int
)
tmptime
);
cerr
<<
(
unsigned
int
)
tmptime
<<
endl
<<
endl
;
cerr
<<
unifrnd
(
2
,
2
)
<<
endl
;
exit
(
1
);
/*
options
.
add
(
fnin
);
options
.
add
(
help
);
options
.
add
(
xdim
);
options
.
add
(
ydim
);
options
.
parse_command_line
(
argc
,
argv
);
// line below stops the program if the help was requested or
...
...
@@ -76,7 +80,7 @@ int do_work(int argc, char* argv[]) {
}
else
{
// Call the local functions
return
do_work
(
argc
,
argv
);
}
*/
}
}
catch
(
X_OptionError
&
e
)
{
options
.
usage
();
cerr
<<
endl
<<
e
.
what
()
<<
endl
;
...
...
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