commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimitri Pourbaix (JIRA)" <j...@apache.org>
Subject [jira] Updated: (MATH-333) eigenvectors computation is wrong when several vectors share the same eigenvalue
Date Wed, 10 Feb 2010 22:52:29 GMT

     [ 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.


Mime
View raw message