[Numpy-discussion] SVD errors
Mon Feb 2 18:40:04 CST 2009
I ran into this problem a year or so ago. I suspect my messages to the list are in the archives somewhere. It is a known problem and involves a hard-coded maximum number of iterations in the SVD code. The problem is on the LaPack side. You can go in and change it, but then you have to recompile everything and rebuild Numpy, etc. etc. Not sure how easy/hard this is. I avoided it.
What I found that worked for me (depends on your numerical situation) is to take the original matrix you are trying to decompose, say A, and examine, instead, the SVD of A^T A. Then the singular values of that matrix are the square of the singular values of A. This worked for me, but my original matrix was square. Maybe that helped. Don't know. It's worth a try.
-- Lou Pecora, my views are my own.
--- On Mon, 2/2/09, firstname.lastname@example.org <email@example.com> wrote:
> From: firstname.lastname@example.org <email@example.com>
> Subject: [Numpy-discussion] SVD errors
> To: firstname.lastname@example.org
> Date: Monday, February 2, 2009, 7:21 PM
> Hello list.. I've run into two SVD errors over the last
> few days. Both
> errors are identical in numpy/scipy.
> I've submitted a ticket for the 1st problem (numpy
> ticket #990). Summary
> is: some builds of the lapack_lite module linking against
> system LAPACK
> (not the bundled dlapack_lite.o, etc) give a
> "LinAlgError: SVD did not
> converge" exception on my matrix. This error does
> occur using Mac's
> Accelerate framework LAPACK, and a coworker's Ubuntu
> LAPACK version. It
> does not seem to happen using ATLAS LAPACK (nor using
> Octave/Matlab on
> said Ubuntu)
> Just today I've come across a negative singular value
> cropping up in an
> SVD of a different matrix. This error does occur on my
> ATLAS LAPACK based
> numpy, as well as on the Ubuntu setup. And once again, it
> does not happen
> in Octave/Matlab.
> I'm using numpy 1.3.0.dev6336 -- don't know what
> the Ubuntu box is running.
> Here are some npy files for the two different cases:
> Numpy-discussion mailing list
More information about the Numpy-discussion