[SciPy-user] SciPy-user Digest, Vol 44, Issue 54

Anand Patil anand at soe.ucsc.edu
Thu Apr 26 13:03:18 EDT 2007


>Let me reiterate my support for the SVD. It allows you to find a
>least-squares solution for matrices with nullspaces, real or
>numerical, even if the result vector is not in the span of the matrix.
>It also lets you check how far your answer is from being a real
>solution, in both spaces.
>
>
>
>Anne
>  
>
Anne,

I completely agree with you, the SVD is very much nicer and more 
intuitive to work with than the Cholesky decomposition. The only thing 
Cholesky has to recommend it is that it's a lot faster for large 
matrices, and in my applications (and possibly the OP's) the need for 
speed can be acute. Since you can eventually get everything you need 
from a Cholesky decomposition even for matrices with nullspaces, it 
unfortunately becomes the method of choice.

Cheers,
Anand

In [9]: A=eye(1000)

In [10]: %time b=svd(A)
CPU times: user 11.54 s, sys: 0.69 s, total: 12.22 s
Wall time: 19.25

In [11]: %time b=cholesky(A)
CPU times: user 0.53 s, sys: 0.16 s, total: 0.69 s
Wall time: 0.89




More information about the SciPy-User mailing list