Closed GoogleCodeExporter closed 8 years ago
The eigenvalues are not sorted, but because of how the QR algorithm works they
tend to be returned semi-sorted. Just did a quick search to see if returning
sorted results was standard and I don't believe it is. At least LAPACK does
not sort by default but I think some functions provide the options to return
sorted results. MATLAB uses the order that LAPACK uses, according to a message
board.
Do you think that having sorted results would be useful or was this more of a
general comment?
Original comment by peter.ab...@gmail.com
on 24 Feb 2011 at 12:34
The fact that they are almost sorted made me think that perhaps they were
supposed to be sorted but something was not working right. It might be useful
just to add a comment to the JavaDoc making it clear that the user will need to
do any necessary sorting. (E.g., if someone is doing a PCA analysis they will
generally just want the eigenvectors corresponding the largest N eigenvalues,
so they will need to sort the results.)
Original comment by senor.ca...@gmail.com
on 25 Feb 2011 at 12:18
I'll add a comment making it clear that they are unsorted by default and add a
sorting function to the wish list.
BTW If you are doing PCA you might want to considering using SVD rather than
EVD because EVD forces you to explicitly compute the covariance matrix and that
introduces numerical errors.
Original comment by peter.ab...@gmail.com
on 25 Feb 2011 at 7:22
Thanks!
Original comment by senor.ca...@gmail.com
on 25 Feb 2011 at 9:01
Original comment by peter.ab...@gmail.com
on 26 Feb 2011 at 11:16
Original issue reported on code.google.com by
senor.ca...@gmail.com
on 24 Feb 2011 at 7:10