On 09/13/2012 05:13 PM, l...@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-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to