Skip to content
Snippets Groups Projects
Commit 35e7fda0 authored by Matthew Webster's avatar Matthew Webster
Browse files

Limited dof trace calculation to 4000 EV's

parent 26cc3220
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment