mlpack  master
Static Public Member Functions | List of all members
mlpack::gmm::PositiveDefiniteConstraint Class Reference

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...
 

Detailed Description

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.

Member Function Documentation

static void mlpack::gmm::PositiveDefiniteConstraint::ApplyConstraint ( arma::mat &  covariance)
inlinestatic

Apply the positive definiteness constraint to the given covariance matrix, and ensure each value on the diagonal is at least 1e-50.

Parameters
covarianceCovariance matrix.

Definition at line 36 of file positive_definite_constraint.hpp.

template<typename Archive >
static void mlpack::gmm::PositiveDefiniteConstraint::Serialize ( Archive &  ,
const unsigned  int 
)
inlinestatic

Serialize the constraint (which stores nothing, so, nothing to do).

Definition at line 67 of file positive_definite_constraint.hpp.


The documentation for this class was generated from the following file: