22 #ifndef __MLPACK_METHODS_HMM_DISTRIBUTIONS_GAUSSIAN_DISTRIBUTION_HPP
23 #define __MLPACK_METHODS_HMM_DISTRIBUTIONS_GAUSSIAN_DISTRIBUTION_HPP
30 namespace distribution {
54 mean(arma::zeros<arma::vec>(dimension)),
55 covariance(arma::eye<arma::mat>(dimension, dimension))
62 mean(mean), covariance(covariance) { }
88 void Estimate(
const arma::mat& observations);
95 void Estimate(
const arma::mat& observations,
96 const arma::vec& probabilities);
A single multivariate Gaussian distribution.
arma::vec mean
Mean of the distribution.
const arma::vec & Mean() const
Return the mean.
arma::vec Random() const
Return a randomly generated observation according to the probability distribution defined by this obj...
void Estimate(const arma::mat &observations)
Estimate the Gaussian distribution directly from the given observations.
arma::mat & Covariance()
Return a modifiable copy of the covariance.
arma::mat covariance
Covariance of the distribution.
double phi(const double x, const double mean, const double var)
Calculates the univariate Gaussian probability density function.
std::string ToString() const
Returns a string representation of this object.
double Probability(const arma::vec &observation) const
Return the probability of the given observation.
GaussianDistribution(const arma::vec &mean, const arma::mat &covariance)
Create a Gaussian distribution with the given mean and covariance.
size_t Dimensionality() const
Return the dimensionality of this distribution.
GaussianDistribution(const size_t dimension)
Create a Gaussian distribution with zero mean and identity covariance with the given dimensionality...
const arma::mat & Covariance() const
Return the covariance matrix.
GaussianDistribution()
Default constructor, which creates a Gaussian with zero dimension.
arma::vec & Mean()
Return a modifiable copy of the mean.