Macaulay2 » Documentation
Packages » GraphicalModelsMLE :: checkPD(...,ZeroTolerance=>...)
next | previous | forward | backward | up | index | toc

checkPD(...,ZeroTolerance=>...) -- optional input to set the largest absolute value that should be treated as zero

Description

A matrix is assumed to be positive definite if for all eigenvalues e:

- realPart e > ZeroTolerance

- abs imaginaryPart e <= ZeroTolerance

If a matrix contains an imaginary part below the tolerance level, then only the real part is reported in the output.

i1 : L={matrix{{10^(-9)+10^(-10)*sqrt(-1),0},{0,10^(-9)+10^(-10)*sqrt (-1)}},
         matrix{{10^(-10)+10^(-10)*sqrt(-1),0},{0,10^(-10)+10^(-10)*sqrt (-1)}},
         matrix{{1+10^(-10)*sqrt(-1),0},{0,1+10^(-10)*sqrt (-1)}},
         matrix{{1-10^(-9)*sqrt(-1),0},{0,1+10^(-9)*sqrt (-1)}}
         }

o1 = {| 1e-9+1e-10ii 0            |, | 1e-10+1e-10ii 0             |, |
      | 0            1e-9+1e-10ii |  | 0             1e-10+1e-10ii |  |
     ------------------------------------------------------------------------
     1+1e-10ii 0         |, | 1-1e-9ii 0        |}
     0         1+1e-10ii |  | 0        1+1e-9ii |

o1 : List
i2 : checkPD L

o2 = {| 1e-9 0    |, | 1 0 |}
      | 0    1e-9 |  | 0 1 |

o2 : List

See also

Functions with optional argument named ZeroTolerance:

Further information

  • Default value: 1e-10
  • Function: checkPD -- returns positive definite matrices from a list of symmetric matrices
  • Option key: ZeroTolerance -- optional input to set the largest absolute value that should be treated as zero

The source of this document is in /build/reproducible-path/macaulay2-1.25.06+ds/M2/Macaulay2/packages/GraphicalModelsMLE.m2:1725:0.