commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manuel Rossetti (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MATH-274) testing for symmetric positive definite matrix in CholeskyDecomposition
Date Thu, 04 Jun 2009 20:59:07 GMT

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

Manuel Rossetti commented on MATH-274:
--------------------------------------

Luc,

Thanks for fixing the error.

You are missing my point.  You should provide the user the opportunity  
to check the condition, rather than having to rely on exceptions.  The  
client can make the decision whether it is a waste or not.

And, we will agree to disagree on how the library is using exceptions.

Regards,
Manuel



-----------------------------------------------------
Manuel D. Rossetti, Ph.D., P.E.
Associate Professor of Industrial Engineering
University of Arkansas
Department of Industrial Engineering
4207 Bell Engineering Center
Fayetteville, AR 72701
Phone: (479) 575-6756
Fax: (479) 575-8431
email: rossetti@uark.edu
www: www.uark.edu/~rossetti





> testing for symmetric positive definite matrix in CholeskyDecomposition
> -----------------------------------------------------------------------
>
>                 Key: MATH-274
>                 URL: https://issues.apache.org/jira/browse/MATH-274
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Mac OS X, NetBeans
>            Reporter: Manuel Rossetti
>            Assignee: Luc Maisonobe
>            Priority: Minor
>             Fix For: 2.0
>
>
> I used this matrix:
>         double[][] cv = {
>             {0.40434286, 0.09376327, 0.30328980, 0.04909388},
>             {0.09376327, 0.10400408, 0.07137959, 0.04762857},
>             {0.30328980, 0.07137959, 0.30458776, 0.04882449},
>             {0.04909388, 0.04762857, 0.04882449, 0.07543265}
>         };
> And it works fine, because it is symmetric positive definite
> I tried this matrix:
>         double[][] cv = {
>             {0.40434286, -0.09376327, 0.30328980, 0.04909388},
>             {-0.09376327, 0.10400408, 0.07137959, 0.04762857},
>             {0.30328980, 0.07137959, 0.30458776, 0.04882449},
>             {0.04909388, 0.04762857, 0.04882449, 0.07543265}
>         };
> And it should throw an exception but it does not.  I tested the matrix in R and R's cholesky
decomposition method returns that the matrix is not symmetric positive definite.
> Obviously your code is not catching this appropriately.
> By the way (in my opinion) the use of exceptions to check these conditions is not the
best design or use for exceptions.  If you are going to force the use to try and catch these
exceptions at least provide methods  to test the conditions prior to the possibility of the
exception.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message