[
https://issues.apache.org/jira/browse/MATH-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13802067#comment-13802067
]
Gilles commented on MATH-1045:
------------------------------
bq. On the other hand it seems a bit undesirable to return an 'inverse' in this
case – it's dominated by the inverse of that tiny eigenvalue, which is huge,
and the result is pretty unreliable.
This could be case-dependent and the code should perhaps be able to detect and
accept input that can return a reliable result. In r1534709, I've committed an
example that seems to work, even as the eigenvalues are quite small indeed.
bq. it's more reasonable to examine the eigenvalues in sorted order and examine
ratio
That's an interesting idea.
Could you try and see whether it would let the new test pass, while
intercepting the singular matrix of your test?
> EigenDecomposition.Solver should consider tiny values 0 for purposes of
> determining singularity
> -----------------------------------------------------------------------------------------------
>
> Key: MATH-1045
> URL: https://issues.apache.org/jira/browse/MATH-1045
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.2
> Reporter: Sean Owen
> Priority: Minor
> Labels: eigenvalue, singular
> Attachments: MATH-1045.patch
>
>
> EigenDecomposition.Solver tests for singularity by comparing eigenvalues to 0
> for exact equality. Elsewhere in the class and in the code, of course, very
> small values are considered 0. This causes the solver to consider some
> singular matrices as non-singular.
> The patch here includes a test as well showing the behavior -- the matrix is
> clearly singular but isn't considered as such since one eigenvalue are ~1e-14
> rather than exactly 0.
> (What I am not sure of is whether we should really be evaluating the *norm*
> of the imaginary eigenvalues rather than real/imag components separately. But
> the javadoc says the solver only supports real eigenvalues anyhow, so it's
> kind of moot since imag=0 for all eigenvalues.)
--
This message was sent by Atlassian JIRA
(v6.1#6144)