mlpack
master
|
Given a covariance matrix, force the matrix to be positive definite. More...
Static Public Member Functions | |
static void | ApplyConstraint (arma::mat &covariance) |
Apply the positive definiteness constraint to the given covariance matrix, and ensure each value on the diagonal is at least 1e-50. More... | |
template<typename Archive > | |
static void | Serialize (Archive &, const unsigned int) |
Serialize the constraint (which stores nothing, so, nothing to do). More... | |
Given a covariance matrix, force the matrix to be positive definite.
Also force a minimum value on the diagonal, so that even if the matrix is invertible, it doesn't cause problems with Cholesky decompositions. The forcing here is also done in order to bring the condition number of the matrix under 1e5 (10k), which should help with numerical stability.
Definition at line 27 of file positive_definite_constraint.hpp.
|
inlinestatic |
Apply the positive definiteness constraint to the given covariance matrix, and ensure each value on the diagonal is at least 1e-50.
covariance | Covariance matrix. |
Definition at line 36 of file positive_definite_constraint.hpp.
|
inlinestatic |
Serialize the constraint (which stores nothing, so, nothing to do).
Definition at line 67 of file positive_definite_constraint.hpp.