in

.NET Opensource

Community for opensource projects by Christoph Rüegg

Positive Definite Test

Last post 03-30-2008 20:47 by Christoph Rüegg. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-26-2008 9:50

    Positive Definite Test

    I have been going over the code, and maybe I am just thick, but do any of the decompositions that require it perform a test for positive definiteness (or semi-definiteness?). I notice there is a TODO in the Cholesky decomposition class about it?
    If not, would you want me to write a method in the Matrix class to test for positive definite (PD) and positive semi-definite(PSD) matrices? My proposed implementation would be:
    1. Check to see if it is symmetric row diagonally-dominant - if it is then it is PSD, if not....
    2. Check whether each principle submatrix has a determinant greater than (PD) or equal to (PSD)
    For large matrices this is the most efficient method I am aware of. Anyone have any better ideas?
    I have this code currently in the LDL/UDU decompositions that I need for square-root Kalman filtering... Once these classes make it into Iridium, I can push my Kalman filters into Neodym.
    Filed under: ,
  • 03-26-2008 10:37 In reply to

    Re: Positive Definite Test

    In fact, while I reflect on it, is there any reason there are no methods in the Matrix class for:
    IsSymmetric()
    IsPositiveDefinite()
    IsPositiveSemiDefinite()
    They are all rather handy when dealing with covariance matrices! I'll create issues in the tracker, and if you want me to address them, just assign them to me. I already have soem reasonably solid code for them in my Kalman Filter classes
  • 03-28-2008 21:47 In reply to

    Re: Positive Definite Test

    There's no reason, it just wasn't done yet. Hence, yes, please implement them. Thanks!

    (You may want to consider caching the results using the on-demand computation pattern, and then (only then) use properties instead of methods.)

  • 03-30-2008 20:47 In reply to

    Re: Positive Definite Test

    Some other missing properties that might be interesting to provide: see older forum post. I'll create some feature requests in the tracker for them.

    Filed under: ,
Page 1 of 1 (4 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems