This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Cholesky - Return until failure

Tags: None
(comma "," separated)
bobo01
Registered Member
Posts
10
Karma
0

Cholesky - Return until failure

Sat Nov 08, 2014 1:51 pm
I am developing some code that inverts matrices, which can be ill-conditioned. In some scenarions I understand that Cholesky will fail, I guess roundoff errors may make a value negative etc.. In these cases the algorithmn will fail. Always the matrix is sqaure and positive definite. It is an autocorrelation matrix.

Is there any way in Eigen for the matrix that can be processed to be returned? Meaning if I have a 125x125 matrix and due to numerical errors only 50x50 can be processed then I would like to use that. If not, how easy would something like this be for me to add to the code?

Thanks.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Cholesky - Return until failure

Tue Nov 11, 2014 8:59 pm
Actually, LLT internal implementation already returns the first failing row/column index, see:

https://bitbucket.org/eigen/eigen/src/1 ... ult#cl-357

so instead of checking if it is equal to -1 for success you can easily adapt the code to record this value and return it to the user.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]