[Fwd: Bug in SVD?]
- Subject: [Fwd: Bug in SVD?]
- From: Ron Boisvert <boisvert@nist.gov>
- Date: Thu, 09 Apr 2009 11:27:34 -0400
- Content-Transfer-Encoding: 8bit
- Content-Type: text/plain; charset=ISO-8859-1; format=flowed
- User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
Sender: Martin Breidt <martin.breidt@tuebingen.mpg.de>
Subject: Bug in SVD?
Hello,
hoping that this list and the development of the library is still
active, I am sending this message in order to ask whether there might be
a bug in the SVD code?
(I am using the dotNet port of this library, so apologies if this is
related to the port)
Here's my problem:
The SVD computation produces wrong dimensions of the resulting matrices.
If you do a test with the example provided on Wikipedia
(http://en.wikipedia.org/wiki/Singular_value_decomposition), this
library produces wrong results as far as I can tell (FWIW, Matlab
returns the same values given on Wikipedia).
After running the example (an SVD on a 4-by-5 matrix), the S matrix from
the SVD object is a 5-by-5 matrix, whereas the correct result should be
a 4-by-5 matrix. Also, the entries of the U and V matrix seem to be in
the wrong order and/or have the wrong sign.
Finally, the singular values vector returned by the SVD object has five
elements in this example, but, according to Wikipedia
"An m × n matrix M has at least one and at most p = min(m,n) distinct
singular values."
so there should be a maximum of four singular values, not five.
If anyone is still following this mailing list, I'd very much like to
hear whether anyone can confirm my findings and/or has a bug fix!
I'd really like to use this library for my work, but only if works with
non-square matrices.
Thanks very much in advance
Martin
Date Index |
Thread Index |
Problems or questions? Contact list-master@nist.gov