[SciPy-user] Eror estimation in leastsq

Fernando Pérez fperez at pizero.colorado.edu
Wed Feb 20 11:09:40 CST 2002


On Wed, 20 Feb 2002, eric wrote:

> Now the next question is why the heck there are two least squares algorithms in
> SciPy.  For that, I have no good answer, other than its still evolving... :-)

I haven't looked at the code, but in general using svd for least-squares
fitting is a good idea. The one issue that can get tricky is where to cutoff
small singular values. But if that's addressed correctly in the linalg
version, *and* the other version is using a straight normal equations
solution, it would probably be best to keep the linalg one. Solving the normal
equations directly is often numerically tricky/unstable.

I have some svd code around (in Python), maybe next week I'll take a peek at
these two versions, compare them and drop some comments on the issue more
informed than what I just blabbered. Need time ... :)

Cheers,

f.




More information about the SciPy-user mailing list