commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Neidhart <thomas.neidh...@gmail.com>
Subject Re: svn commit: r1384363 - in /commons/proper/math/trunk/src: changes/ main/java/org/apache/commons/math3/linear/ test/java/org/apache/commons/math3/linear/ test/java/org/apache/commons/math3/random/
Date Thu, 13 Sep 2012 17:10:08 GMT
On 09/13/2012 05:13 PM, luc@apache.org wrote:
> Author: luc
> Date: Thu Sep 13 15:13:03 2012
> New Revision: 1384363
> 
> URL: http://svn.apache.org/viewvc?rev=1384363&view=rev
> Log:
> Fixed an error in rectangular Cholesky decomposition.
> 
> JIRA: MATH-789

Hi Luc,

thanks for looking into this.

I think that there is still an error in the way the rank is calculated
in case diagonal values are below the threshold:

//all remaining diagonal elements are close to zero, we consider we have
// found the rank of the symmetric positive semidefinite matrix
//++r;   <- commented out
loop = false;

Otherwise the resulting root Matrix may be rank deficient as can be seen
in the examples below.

Actually there is a unit test (CorrelatedRandomVectorGeneratorTest) that
tests for a wrong rank:

    @Test
    public void testRank() {
        Assert.assertEquals(3, generator.getRank());
    }

Should be 2, see the resulting root Matrix:

Array2DRowRealMatrix{
{2.0823861495,0.0605633926,0.0},
{2.6016090812,0.0403755951,0.0},
{3.1208320129,0.0201877975,0.0},
{3.6400549446,0.0,0.0}}

with the fix the result is the following:

Array2DRowRealMatrix{
{2.0823861495,0.0605633926},
{2.6016090812,0.0403755951},
{3.1208320129,0.0201877975},
{3.6400549446,0.0}}

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message