[jira] [Commented] (MATH-1417) weird result in RRQR decomposition.
[ https://issues.apache.org/jira/browse/MATH-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16004422#comment-16004422 ] Gilles commented on MATH-1417: -- Side-note: When you add a comment, please disable quoting of previous comments. bq. How should I proceed to take advantage of this fix ? It depends on your requirements. Best is to start a thread on the "dev" ML. > weird result in RRQR decomposition. > --- > > Key: MATH-1417 > URL: https://issues.apache.org/jira/browse/MATH-1417 > Project: Commons Math > Issue Type: Bug >Affects Versions: 3.6.1 > Environment: linux RH6 > netbeans 8.2 > java 1.8 >Reporter: Lecomte > > When using RRQRDecomposition on rank deficient matrix, results are wrong. > double[][] Xi = { > {0, 0, 0, 0, 0, 0, 0, 0, 0}, > {0, 1, 0, 0, 0, 0, 0, 0, 0}, > {0, 0, 1, 0, 0, 0, 0, 0, 0}, > {0, 0, 1, 0, 0, 0, 0, 0, 0}, > {0, 0, 1, 0, 0, 0, 0, 0, 0}, > {0, 0, 0, 1, 0, 0, 0, 0, 0}, > {0, 0, 0, 0, 0, 0, 1, 0, 0}, > {0, 0, 0, 0, 0, 0, 0, 0, 0},}; > With this matrix, i obtain: > rank 6 > R: > |1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 1,000 1,000 1,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > Q: > |0,000 0,000 1,000 0,000 0,000 0,000 0,000 0,000 0,000| > |1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 1,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000| > Where Scipy (lapack) or ejml gives me: > rank 4 > Type = dense real , numRows = 9 , numCols = 8 > -1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 -1,000 0,000 0,000 -1,000 0,000 -1,000 0,000 > 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > Type = dense real , numRows = 9 , numCols = 9 > 0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000 > -1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 > 0,000 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000 > That are the results i expect. > -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MATH-1417) weird result in RRQR decomposition.
[ https://issues.apache.org/jira/browse/MATH-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16003376#comment-16003376 ] Gilles commented on MATH-1417: -- Got it. :) Please check that commit ed1ce82d822ffe185875b7b7d38352f20171c096 fixed the problem. > weird result in RRQR decomposition. > --- > > Key: MATH-1417 > URL: https://issues.apache.org/jira/browse/MATH-1417 > Project: Commons Math > Issue Type: Bug >Affects Versions: 3.6.1 > Environment: linux RH6 > netbeans 8.2 > java 1.8 >Reporter: Lecomte > > When using RRQRDecomposition on rank deficient matrix, results are wrong. > double[][] Xi = { > {0, 0, 0, 0, 0, 0, 0, 0, 0}, > {0, 1, 0, 0, 0, 0, 0, 0, 0}, > {0, 0, 1, 0, 0, 0, 0, 0, 0}, > {0, 0, 1, 0, 0, 0, 0, 0, 0}, > {0, 0, 1, 0, 0, 0, 0, 0, 0}, > {0, 0, 0, 1, 0, 0, 0, 0, 0}, > {0, 0, 0, 0, 0, 0, 1, 0, 0}, > {0, 0, 0, 0, 0, 0, 0, 0, 0},}; > With this matrix, i obtain: > rank 6 > R: > |1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 1,000 1,000 1,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > Q: > |0,000 0,000 1,000 0,000 0,000 0,000 0,000 0,000 0,000| > |1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 1,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000| > Where Scipy (lapack) or ejml gives me: > rank 4 > Type = dense real , numRows = 9 , numCols = 8 > -1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 -1,000 0,000 0,000 -1,000 0,000 -1,000 0,000 > 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > Type = dense real , numRows = 9 , numCols = 9 > 0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000 > -1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 > 0,000 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000 > That are the results i expect. > -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MATH-1417) weird result in RRQR decomposition.
[ https://issues.apache.org/jira/browse/MATH-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16002798#comment-16002798 ] Gilles commented on MATH-1417: -- Have you checked out the git "master" branch? With your example (and no change to the source), I obtain 4 as the rank value. > weird result in RRQR decomposition. > --- > > Key: MATH-1417 > URL: https://issues.apache.org/jira/browse/MATH-1417 > Project: Commons Math > Issue Type: Bug >Affects Versions: 3.6.1 > Environment: linux RH6 > netbeans 8.2 > java 1.8 >Reporter: Lecomte > > When using RRQRDecomposition on rank deficient matrix, results are wrong. > double[][] Xi = { > {0, 0, 0, 0, 0, 0, 0, 0, 0}, > {0, 1, 0, 0, 0, 0, 0, 0, 0}, > {0, 0, 1, 0, 0, 0, 0, 0, 0}, > {0, 0, 1, 0, 0, 0, 0, 0, 0}, > {0, 0, 1, 0, 0, 0, 0, 0, 0}, > {0, 0, 0, 1, 0, 0, 0, 0, 0}, > {0, 0, 0, 0, 0, 0, 1, 0, 0}, > {0, 0, 0, 0, 0, 0, 0, 0, 0},}; > With this matrix, i obtain: > rank 6 > R: > |1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 1,000 1,000 1,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > Q: > |0,000 0,000 1,000 0,000 0,000 0,000 0,000 0,000 0,000| > |1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 1,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000| > Where Scipy (lapack) or ejml gives me: > rank 4 > Type = dense real , numRows = 9 , numCols = 8 > -1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 -1,000 0,000 0,000 -1,000 0,000 -1,000 0,000 > 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > Type = dense real , numRows = 9 , numCols = 9 > 0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000 > -1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 > 0,000 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000 > That are the results i expect. > -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MATH-1417) weird result in RRQR decomposition.
[ https://issues.apache.org/jira/browse/MATH-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16002476#comment-16002476 ] Gilles commented on MATH-1417: -- Thanks for the report! Are you willing to dig into the code in order to locate the bug? > weird result in RRQR decomposition. > --- > > Key: MATH-1417 > URL: https://issues.apache.org/jira/browse/MATH-1417 > Project: Commons Math > Issue Type: Bug >Affects Versions: 3.6.1 > Environment: linux RH6 > netbeans 8.2 > java 1.8 >Reporter: Lecomte > > When using RRQRDecomposition on rank deficient matrix, results are wrong. > double[][] Xi = { > {0, 0, 0, 0, 0, 0, 0, 0, 0}, > {0, 1, 0, 0, 0, 0, 0, 0, 0}, > {0, 0, 1, 0, 0, 0, 0, 0, 0}, > {0, 0, 1, 0, 0, 0, 0, 0, 0}, > {0, 0, 1, 0, 0, 0, 0, 0, 0}, > {0, 0, 0, 1, 0, 0, 0, 0, 0}, > {0, 0, 0, 0, 0, 0, 1, 0, 0}, > {0, 0, 0, 0, 0, 0, 0, 0, 0},}; > With this matrix, i obtain: > rank 6 > R: > |1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 1,000 1,000 1,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > Q: > |0,000 0,000 1,000 0,000 0,000 0,000 0,000 0,000 0,000| > |1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 1,000 0,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000| > |0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000| > Where Scipy (lapack) or ejml gives me: > rank 4 > Type = dense real , numRows = 9 , numCols = 8 > -1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 -1,000 0,000 0,000 -1,000 0,000 -1,000 0,000 > 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > Type = dense real , numRows = 9 , numCols = 9 > 0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000 > -1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 > 0,000 0,000 0,000 -1,000 0,000 0,000 0,000 0,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000 0,000 > 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 1,000 > That are the results i expect. > -- This message was sent by Atlassian JIRA (v6.3.15#6346)