Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
miscmaths
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
miscmaths
Commits
35e7fda0
Commit
35e7fda0
authored
13 years ago
by
Matthew Webster
Browse files
Options
Downloads
Patches
Plain Diff
Limited dof trace calculation to 4000 EV's
parent
26cc3220
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
miscmaths.cc
+8
-1
8 additions, 1 deletion
miscmaths.cc
with
8 additions
and
1 deletion
miscmaths.cc
+
8
−
1
View file @
35e7fda0
...
...
@@ -2183,9 +2183,16 @@ void ols(const Matrix& data,const Matrix& des,const Matrix& tc, Matrix& cope,Mat
}
float
ols_dof
(
const
Matrix
&
des
){
if
(
des
.
Nrows
()
>
4000
)
//Use the simple version as huge designs require too much RAM in the full calculation
return
des
.
Nrows
()
-
des
.
Ncols
();
try
{
Matrix
pdes
=
pinv
(
des
);
Matrix
R
=
IdentityMatrix
(
des
.
Nrows
())
-
des
*
pdes
;
return
R
.
Trace
();
return
R
.
Trace
();}
catch
(...)
{
cerr
<<
"ols_dof: Error in determining the trace, resorting to basic calculation"
<<
endl
;
}
return
des
.
Nrows
()
-
des
.
Ncols
();
}
int
conjgrad
(
ColumnVector
&
x
,
const
Matrix
&
A
,
const
ColumnVector
&
b
,
int
maxit
,
...
...
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