A single multivariate Gaussian distribution with diagonal covariance. More...
Public Member Functions | |
| DiagonalGaussianDistribution () | |
| Default constructor, which creates a Gaussian with zero dimension. More... | |
| DiagonalGaussianDistribution (const size_t dimension) | |
| Create a Gaussian Distribution with zero mean and diagonal covariance with the given dimensionality. More... | |
| DiagonalGaussianDistribution (const arma::vec &mean, const arma::vec &covariance) | |
| Create a Gaussian distribution with the given mean and diagonal covariance. More... | |
| const arma::vec & | Covariance () const |
| Return the covariance matrix. More... | |
| void | Covariance (const arma::vec &covariance) |
| Set the covariance matrix. More... | |
| void | Covariance (arma::vec &&covariance) |
| Set the covariance matrix using move assignment. More... | |
| size_t | Dimensionality () const |
| Return the dimensionality of this distribution. More... | |
| double | LogProbability (const arma::vec &observation) const |
| Return the log probability of the given observation. More... | |
| void | LogProbability (const arma::mat &observations, arma::vec &logProbabilities) const |
| Calculate the multivariate Gaussian log probability density function for each data point (column) in the given matrix. More... | |
| const arma::vec & | Mean () const |
| Return the mean. More... | |
| arma::vec & | Mean () |
| Return a modifiable copy of the mean. More... | |
| double | Probability (const arma::vec &observation) const |
| Return the probability of the given observation. More... | |
| void | Probability (const arma::mat &x, arma::vec &probabilities) const |
| Calculate the multivariate Gaussian probability density function for each data point (column) in the given matrix. More... | |
| arma::vec | Random () const |
| Return a randomly generated observation according to the probability distribution defined by this object. More... | |
template < typename Archive > | |
| void | serialize (Archive &ar, const uint32_t) |
| Serialize the distribution. More... | |
| void | Train (const arma::mat &observations) |
| Estimate the Gaussian distribution directly from the given observations. More... | |
| void | Train (const arma::mat &observations, const arma::vec &probabilities) |
| Estimate the Gaussian distribution from the given observations, taking into account the probability of each observation actually being from this distribution. More... | |
A single multivariate Gaussian distribution with diagonal covariance.
Definition at line 21 of file diagonal_gaussian_distribution.hpp.
|
inline |
Default constructor, which creates a Gaussian with zero dimension.
Definition at line 38 of file diagonal_gaussian_distribution.hpp.
Referenced by DiagonalGaussianDistribution::DiagonalGaussianDistribution().
|
inline |
Create a Gaussian Distribution with zero mean and diagonal covariance with the given dimensionality.
| dimension | Number of dimensions. |
Definition at line 46 of file diagonal_gaussian_distribution.hpp.
References DiagonalGaussianDistribution::DiagonalGaussianDistribution().
| DiagonalGaussianDistribution | ( | const arma::vec & | mean, |
| const arma::vec & | covariance | ||
| ) |
Create a Gaussian distribution with the given mean and diagonal covariance.
| mean | Mean of distribution. |
| covariance | Covariance of distribution. |
|
inline |
Return the covariance matrix.
Definition at line 133 of file diagonal_gaussian_distribution.hpp.
| void Covariance | ( | const arma::vec & | covariance | ) |
Set the covariance matrix.
| void Covariance | ( | arma::vec && | covariance | ) |
Set the covariance matrix using move assignment.
|
inline |
Return the dimensionality of this distribution.
Definition at line 64 of file diagonal_gaussian_distribution.hpp.
| double LogProbability | ( | const arma::vec & | observation | ) | const |
Return the log probability of the given observation.
Referenced by DiagonalGaussianDistribution::Probability().
| void LogProbability | ( | const arma::mat & | observations, |
| arma::vec & | logProbabilities | ||
| ) | const |
Calculate the multivariate Gaussian log probability density function for each data point (column) in the given matrix.
| observations | Matrix of observations. |
| logProbabilities | Output log probabilities for each observation. |
|
inline |
Return the mean.
Definition at line 127 of file diagonal_gaussian_distribution.hpp.
|
inline |
Return a modifiable copy of the mean.
Definition at line 130 of file diagonal_gaussian_distribution.hpp.
|
inline |
Return the probability of the given observation.
Definition at line 67 of file diagonal_gaussian_distribution.hpp.
References DiagonalGaussianDistribution::LogProbability().
|
inline |
Calculate the multivariate Gaussian probability density function for each data point (column) in the given matrix.
| x | Matrix of observations. |
| probabilities | Output probabilities for each input observation. |
Definition at line 82 of file diagonal_gaussian_distribution.hpp.
References DiagonalGaussianDistribution::LogProbability(), DiagonalGaussianDistribution::Random(), and DiagonalGaussianDistribution::Train().
| arma::vec Random | ( | ) | const |
Return a randomly generated observation according to the probability distribution defined by this object.
Referenced by DiagonalGaussianDistribution::Probability().
|
inline |
Serialize the distribution.
Definition at line 143 of file diagonal_gaussian_distribution.hpp.
| void Train | ( | const arma::mat & | observations | ) |
Estimate the Gaussian distribution directly from the given observations.
| observations | Matrix of observations. |
Referenced by DiagonalGaussianDistribution::Probability().
| void Train | ( | const arma::mat & | observations, |
| const arma::vec & | probabilities | ||
| ) |
Estimate the Gaussian distribution from the given observations, taking into account the probability of each observation actually being from this distribution.
| observations | Matrix of observations. |
| probabilities | List of probability of the each observation being from this distribution. |