Problem with Singular Value Decomposition Algorithm
Brian Gough
bjg@network-theory.co.uk
Wed Dec 19 13:20:00 GMT 2001
Jim Love writes:
> In every text that I have read dealing with the process of SVD, they have always placed the eigenvalues in a decreasing order. The stated reason is to provide a standard solution and methodology. Why would anybody build an API that does something different?? If you are using the SVD to find the least squares fit of a plane or a cylinder for example, order matters (if you want the right answer hehehe). Yes I can add to my code to re-order the output, but so will most everybody else that uses this function. So it should be done in the API. Just a suggestion.
>
Thanks for the bug report.
I'm pretty sure this is caused by me adding some new code to
explicitly handle the 2x2 case in the past few weeks. I overlooked
the ordering of the singular values for that routine and I can see
that it will be unsorted. That would explain why the first two
elements are wrong --- they are handled by the 2x2 routine. I'll add
the appropriate sorting to that case.
regards
Brian Gough
More information about the Gsl-discuss
mailing list