# [jira] Created: (MATH-333) eigenvectors computation is wrong when several vectors share the same eigenvalue

6 messages
Open this post in threaded view
|

## [jira] Created: (MATH-333) eigenvectors computation is wrong when several vectors share the same eigenvalue

 eigenvectors computation is wrong when several vectors share the same eigenvalue --------------------------------------------------------------------------------                  Key: MATH-333                  URL: https://issues.apache.org/jira/browse/MATH-333             Project: Commons Math           Issue Type: Bug             Reporter: Luc Maisonobe              Fix For: 2.2 A typical example is to decompose identity matrix. There is only one eigenvalue: 1.0. Instead of returning n different eigenvectors forming a complete vector base, the same vector is returned n times. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Open this post in threaded view
|

## [jira] Updated: (MATH-333) eigenvectors computation is wrong when several vectors share the same eigenvalue

 [ https://issues.apache.org/jira/browse/MATH-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Luc Maisonobe updated MATH-333: -------------------------------     Fix Version/s:     (was: 2.2)                    2.1 This issue should really be fixed for 2.1 > eigenvectors computation is wrong when several vectors share the same eigenvalue > -------------------------------------------------------------------------------- > >                 Key: MATH-333 >                 URL: https://issues.apache.org/jira/browse/MATH-333>             Project: Commons Math >          Issue Type: Bug >            Reporter: Luc Maisonobe >             Fix For: 2.1 > > > A typical example is to decompose identity matrix. There is only one eigenvalue: 1.0. Instead of returning n different eigenvectors forming a complete vector base, the same vector is returned n times. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Open this post in threaded view
|

## [jira] Updated: (MATH-333) eigenvectors computation is wrong when several vectors share the same eigenvalue

 In reply to this post by David Mollitor (Jira)      [ https://issues.apache.org/jira/browse/MATH-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dimitri Pourbaix updated MATH-333: ----------------------------------     Attachment: SingularValueDecompositionImpl.java                 EigenDecompositionImpl.java EigenDecomposition is the Java (strict) translation of some parts of the LAPACK library, as obscure as the original.  It is likely efficient when it works properly but it is a debugging nightmare when it does not.  Far away from most OOP paradigms, every useful quantity is stored in a huge array which is used as a working area. Part of the LAPACK complexity as far as EigenDecomposition is concerned is caused by its wish to handle almost any kind of matrix.  So, lots of routines are introduced to handle these different cases.  If one tries to follow the path of a real symmetric matrix in that jungle, one still ends up with a lot of routines and thus with a lot of Java methods.  However, if one decides from the beginning that we will deal with real symmetric matrices only, there are way simpler alternatives to the LAPACK collection. Even without changing the current methods, a bit of mathematical consistency might be welcome: the class EigenDecomposition is clearly described as sol- ving an eigen problem for a real symmetic matrix.  Fine.  But if it is so, there is no point in keeping imaginaryEigenvalues: the eigen values of a real symmetric matrix are real (LAPACK legacy)!!!  The only reason I see for keeping the imaginary part is because solver() needs it. At the cost of a second eigen decomposition, SVD now returns the correct number of singular values (and left and right singular vectors) even when the matrix is singular. A few signs in the eigen vectors of testMath308 must be changed to successfully pass to the tests. testTruncated and testMath320A (in SingularValueSolverTest) have been removed since SVD always return the maximum number of singular values. testMatricesValues2 (from SingularValueDecompositionImplTest) is removed because the SVD decomposition is not unique. > eigenvectors computation is wrong when several vectors share the same eigenvalue > -------------------------------------------------------------------------------- > >                 Key: MATH-333 >                 URL: https://issues.apache.org/jira/browse/MATH-333>             Project: Commons Math >          Issue Type: Bug >            Reporter: Luc Maisonobe >             Fix For: 2.1 > >         Attachments: EigenDecompositionImpl.java, SingularValueDecompositionImpl.java > > > A typical example is to decompose identity matrix. There is only one eigenvalue: 1.0. Instead of returning n different eigenvectors forming a complete vector base, the same vector is returned n times. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Open this post in threaded view
|

## [jira] Updated: (MATH-333) eigenvectors computation is wrong when several vectors share the same eigenvalue

 In reply to this post by David Mollitor (Jira)      [ https://issues.apache.org/jira/browse/MATH-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dimitri Pourbaix updated MATH-333: ----------------------------------     Attachment: MATH-333_320.patch The attached file is the result 'svn diff' from trunk. > eigenvectors computation is wrong when several vectors share the same eigenvalue > -------------------------------------------------------------------------------- > >                 Key: MATH-333 >                 URL: https://issues.apache.org/jira/browse/MATH-333>             Project: Commons Math >          Issue Type: Bug >            Reporter: Luc Maisonobe >             Fix For: 2.1 > >         Attachments: EigenDecompositionImpl.java, MATH-333_320.patch, SingularValueDecompositionImpl.java > > > A typical example is to decompose identity matrix. There is only one eigenvalue: 1.0. Instead of returning n different eigenvectors forming a complete vector base, the same vector is returned n times. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.