[SciPy-user] solve for symetric matrix ?

Nils Wagner nwagner at iam.uni-stuttgart.de
Thu Apr 26 11:38:57 EDT 2007


Anne Archibald wrote:
> On 26/04/07, Nils Wagner <nwagner at iam.uni-stuttgart.de> wrote:
>
>   
>> If you can't believe it run the attached script.
>> I get
>> python -i cholesky_lu.py
>> Elapsed time LU 0.291770935059
>> Residual 1.65732165386e-14
>> Elapsed time Cholesky 0.210819959641
>> Residual 1.8009241117e-14
>>     
>
> Notice here that Cholesky is less than a factor of two faster. It'll
> never be much better than that in general. So you're not going to win
> much on speed.
>
> Personally I prefer to use SVD for matrix inversions - it's much more
> reliable, which I value more than speed. It allows me to diagnose
> whether the matrix is singular or ill-conditioned and deal with that.
>
> Anne
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>   
Strange.  I have increased the number of unknowns to 5000. What happens
with the residual ??

Elapsed time LU 28.8819189072
Residual 7.64156112039e-14
Elapsed time Cholesky 15.6276760101
Residual 141.421356237
>>> n
5000

Any idea ?
 
Nils




More information about the SciPy-User mailing list