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... | |
static void | ApplyConstraint (arma::vec &diagCovariance) |
Apply the positive definiteness constraint to the given diagonal covariance matrix (which is represented as a vector), and ensure each value on the diagonal is at least 1e-50. More... | |
template < typename Archive > | |
static void | serialize (Archive &, const uint32_t) |
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.
References Log::Fatal.
|
inlinestatic |
Apply the positive definiteness constraint to the given diagonal covariance matrix (which is represented as a vector), and ensure each value on the diagonal is at least 1e-50.
Definition at line 75 of file positive_definite_constraint.hpp.
|
inlinestatic |
Serialize the constraint (which stores nothing, so, nothing to do).
Definition at line 100 of file positive_definite_constraint.hpp.