Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cholesky factorization

within a matlab code of mine, I have to deal with the Cholesky factorization of a certain given matrix. I am generally calling chol(A,'lower') to generate the lower triangular factor.

Now, checking my code with the profiler, it is evident that function chol is really time consuming, especially if the size of the input matrix becomes large.

Therefore, I would like to know, if there is any valuable alternative to the built-in chol function.

I have been thinking of the LAPACK library, and namely of spptrf function. Is it available in MATLAB or not?

Any hint or support are more than welcome.

EDIT

Just as an example, the profiler retrieves this information:

enter image description here

where Coh_u has size (1395*1395). It has, also, to be remarked that chol is called 4000 times, since I need the cholesky factor for 4000 different configurations.

like image 760
fpe Avatar asked Feb 26 '13 14:02

fpe


1 Answers

I'm not sure what version of matlab you are using, but I found this discussion, which suggests in older versions that Cholesky Factorization was very slow as you're describing.

One of the answers there says to use the CHOLMOD package or SuiteSparse, which has a chol2 function that is supposed to be faster.

like image 199
munk Avatar answered Sep 18 '22 08:09

munk