You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2012/11/09 22:05:12 UTC

[jira] [Commented] (MATH-886) SingularValueDecomposition fails to calcuate matrix rank

    [ https://issues.apache.org/jira/browse/MATH-886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494311#comment-13494311 ] 

Thomas Neidhart commented on MATH-886:
--------------------------------------

Tested with latest trunk:

{noformat}
        double[][] data = {
                {0.0,1.0,0.0,1.0,1.0,1.0,0.0,0.0},
                {0.0,0.0,1.0,0.0,0.0,0.0,1.0,1.0},
                {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
                {1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}
        };
        
        RealMatrix m = MatrixUtils.createRealMatrix(data);
        SingularValueDecomposition d = new SingularValueDecomposition(m);
        System.out.println("Rank=" + d.getRank());
{noformat}

Result is: rank=3
                
> SingularValueDecomposition fails to calcuate matrix rank
> --------------------------------------------------------
>
>                 Key: MATH-886
>                 URL: https://issues.apache.org/jira/browse/MATH-886
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: jdk1.6 on windows machine
>            Reporter: alberto trivellato
>
> for the matrix {{0.0,1.0,0.0,1.0,1.0,1.0,0.0,0.0},
>  {0.0,0.0,1.0,0.0,0.0,0.0,1.0,1.0},
>  {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
>  {1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}}, SVD return rank=4, but it is 3.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira