MLPACK
1.0.11
|
A single multivariate Gaussian distribution. More...
Public Member Functions | |
GaussianDistribution () | |
Default constructor, which creates a Gaussian with zero dimension. More... | |
GaussianDistribution (const size_t dimension) | |
Create a Gaussian distribution with zero mean and identity covariance with the given dimensionality. More... | |
GaussianDistribution (const arma::vec &mean, const arma::mat &covariance) | |
Create a Gaussian distribution with the given mean and covariance. More... | |
const arma::mat & | Covariance () const |
Return the covariance matrix. More... | |
arma::mat & | Covariance () |
Return a modifiable copy of the covariance. More... | |
size_t | Dimensionality () const |
Return the dimensionality of this distribution. More... | |
void | Estimate (const arma::mat &observations) |
Estimate the Gaussian distribution directly from the given observations. More... | |
void | Estimate (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... | |
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... | |
arma::vec | Random () const |
Return a randomly generated observation according to the probability distribution defined by this object. More... | |
std::string | ToString () const |
Returns a string representation of this object. More... | |
Private Attributes | |
arma::mat | covariance |
Covariance of the distribution. More... | |
arma::vec | mean |
Mean of the distribution. More... | |
A single multivariate Gaussian distribution.
Definition at line 35 of file gaussian_distribution.hpp.
|
inline |
Default constructor, which creates a Gaussian with zero dimension.
Definition at line 47 of file gaussian_distribution.hpp.
|
inline |
Create a Gaussian distribution with zero mean and identity covariance with the given dimensionality.
Definition at line 53 of file gaussian_distribution.hpp.
|
inline |
Create a Gaussian distribution with the given mean and covariance.
Definition at line 61 of file gaussian_distribution.hpp.
|
inline |
Return the covariance matrix.
Definition at line 104 of file gaussian_distribution.hpp.
References covariance.
|
inline |
Return a modifiable copy of the covariance.
Definition at line 106 of file gaussian_distribution.hpp.
References covariance, and ToString().
|
inline |
Return the dimensionality of this distribution.
Definition at line 65 of file gaussian_distribution.hpp.
void mlpack::distribution::GaussianDistribution::Estimate | ( | const arma::mat & | observations | ) |
Estimate the Gaussian distribution directly from the given observations.
observations | List of observations. |
Referenced by Probability().
void mlpack::distribution::GaussianDistribution::Estimate | ( | 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.
|
inline |
|
inline |
Return a modifiable copy of the mean.
Definition at line 101 of file gaussian_distribution.hpp.
References mean.
|
inline |
Return the probability of the given observation.
Definition at line 70 of file gaussian_distribution.hpp.
References Estimate(), mlpack::gmm::phi(), and Random().
arma::vec mlpack::distribution::GaussianDistribution::Random | ( | ) | const |
Return a randomly generated observation according to the probability distribution defined by this object.
Referenced by Probability().
std::string mlpack::distribution::GaussianDistribution::ToString | ( | ) | const |
Returns a string representation of this object.
Referenced by Covariance().
|
private |
Covariance of the distribution.
Definition at line 41 of file gaussian_distribution.hpp.
Referenced by Covariance().
|
private |
Mean of the distribution.
Definition at line 39 of file gaussian_distribution.hpp.
Referenced by Mean().