SYNOPSIS

Public Member Functions

GaussianDistribution ()

Default constructor, which creates a Gaussian with zero dimension. GaussianDistribution (const size_t dimension)

Create a Gaussian distribution with zero mean and identity covariance with the given dimensionality. GaussianDistribution (const arma::vec &mean, const arma::mat &covariance)

Create a Gaussian distribution with the given mean and covariance. const arma::mat & Covariance () const

Return the covariance matrix. arma::mat & Covariance ()

Return a modifiable copy of the covariance. size_t Dimensionality () const

Return the dimensionality of this distribution. void Estimate (const arma::mat &observations)

Estimate the Gaussian distribution directly from the given observations. 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. const arma::vec & Mean () const

Return the mean. arma::vec & Mean ()

Return a modifiable copy of the mean. double Probability (const arma::vec &observation) const

Return the probability of the given observation. arma::vec Random () const

Return a randomly generated observation according to the probability distribution defined by this object. std::string ToString () const

Returns a string representation of this object.

Private Attributes

arma::mat covariance

Covariance of the distribution. arma::vec mean

Mean of the distribution.

Detailed Description

A single multivariate Gaussian distribution.

Definition at line 35 of file gaussian_distribution.hpp.

Constructor & Destructor Documentation

mlpack::distribution::GaussianDistribution::GaussianDistribution ()\fC [inline]\fP

Default constructor, which creates a Gaussian with zero dimension.

Definition at line 47 of file gaussian_distribution.hpp.

mlpack::distribution::GaussianDistribution::GaussianDistribution (const size_tdimension)\fC [inline]\fP

Create a Gaussian distribution with zero mean and identity covariance with the given dimensionality.

Definition at line 53 of file gaussian_distribution.hpp.

mlpack::distribution::GaussianDistribution::GaussianDistribution (const arma::vec &mean, const arma::mat &covariance)\fC [inline]\fP

Create a Gaussian distribution with the given mean and covariance.

Definition at line 61 of file gaussian_distribution.hpp.

Member Function Documentation

const arma::mat& mlpack::distribution::GaussianDistribution::Covariance () const\fC [inline]\fP

Return the covariance matrix.

Definition at line 104 of file gaussian_distribution.hpp.

References covariance.

arma::mat& mlpack::distribution::GaussianDistribution::Covariance ()\fC [inline]\fP

Return a modifiable copy of the covariance.

Definition at line 106 of file gaussian_distribution.hpp.

References covariance.

size_t mlpack::distribution::GaussianDistribution::Dimensionality () const\fC [inline]\fP

Return the dimensionality of this distribution.

Definition at line 65 of file gaussian_distribution.hpp.

References mean.

void mlpack::distribution::GaussianDistribution::Estimate (const arma::mat &observations)

Estimate the Gaussian distribution directly from the given observations.

Parameters:

observations List of observations.

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.

const arma::vec& mlpack::distribution::GaussianDistribution::Mean () const\fC [inline]\fP

Return the mean.

Definition at line 99 of file gaussian_distribution.hpp.

References mean.

arma::vec& mlpack::distribution::GaussianDistribution::Mean ()\fC [inline]\fP

Return a modifiable copy of the mean.

Definition at line 101 of file gaussian_distribution.hpp.

References mean.

double mlpack::distribution::GaussianDistribution::Probability (const arma::vec &observation) const\fC [inline]\fP

Return the probability of the given observation.

Definition at line 70 of file gaussian_distribution.hpp.

References covariance, mean, and mlpack::gmm::phi().

arma::vec mlpack::distribution::GaussianDistribution::Random () const

Return a randomly generated observation according to the probability distribution defined by this object.

Returns:

Random observation from this Gaussian distribution.

std::string mlpack::distribution::GaussianDistribution::ToString () const

Returns a string representation of this object.

Member Data Documentation

arma::mat mlpack::distribution::GaussianDistribution::covariance\fC [private]\fP

Covariance of the distribution.

Definition at line 41 of file gaussian_distribution.hpp.

Referenced by Covariance(), and Probability().

arma::vec mlpack::distribution::GaussianDistribution::mean\fC [private]\fP

Mean of the distribution.

Definition at line 39 of file gaussian_distribution.hpp.

Referenced by Dimensionality(), Mean(), and Probability().

Author

Generated automatically by Doxygen for MLPACK from the source code.