A single multivariate Gaussian distribution.
More...
#include <gaussian_distribution.hpp>
|
| 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. More...
|
|
size_t | Dimensionality () const |
| Return the dimensionality of this distribution.
|
|
double | Probability (const arma::vec &observation) const |
| Return the probability of the given observation.
|
|
double | LogProbability (const arma::vec &observation) const |
| Return the log probability of the given observation.
|
|
void | Probability (const arma::mat &x, arma::vec &probabilities) const |
| Calculates the multivariate Gaussian probability density function for each data point (column) in the given matrix. More...
|
|
void | LogProbability (const arma::mat &x, arma::vec &logProbabilities) const |
| Returns the Log probability of the given matrix. More...
|
|
arma::vec | Random () const |
| Return a randomly generated observation according to the probability distribution defined by this object. 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.
|
|
const arma::vec & | Mean () const |
| Return the mean.
|
|
arma::vec & | Mean () |
| Return a modifiable copy of the mean.
|
|
const arma::mat & | Covariance () const |
| Return the covariance matrix.
|
|
void | Covariance (const arma::mat &covariance) |
| Set the covariance.
|
|
void | Covariance (arma::mat &&covariance) |
|
const arma::mat & | InvCov () const |
| Return the invCov.
|
|
double | LogDetCov () const |
| Return the logDetCov.
|
|
template<typename Archive > |
void | serialize (Archive &ar, const uint32_t) |
| Serialize the distribution.
|
|
A single multivariate Gaussian distribution.
◆ GaussianDistribution()
GaussianDistribution::GaussianDistribution |
( |
const arma::vec & |
mean, |
|
|
const arma::mat & |
covariance |
|
) |
| |
Create a Gaussian distribution with the given mean and covariance.
covariance is expected to be positive definite.
◆ LogProbability()
void mlpack::distribution::GaussianDistribution::LogProbability |
( |
const arma::mat & |
x, |
|
|
arma::vec & |
logProbabilities |
|
) |
| const |
|
inline |
Returns the Log probability of the given matrix.
These values are stored in logProbabilities.
- Parameters
-
x | List of observations. |
logProbabilities | Output log probabilities for each input observation. |
◆ Probability()
void mlpack::distribution::GaussianDistribution::Probability |
( |
const arma::mat & |
x, |
|
|
arma::vec & |
probabilities |
|
) |
| const |
|
inline |
Calculates the multivariate Gaussian probability density function for each data point (column) in the given matrix.
- Parameters
-
x | List of observations. |
probabilities | Output probabilities for each input observation. |
◆ Random()
arma::vec GaussianDistribution::Random |
( |
| ) |
const |
Return a randomly generated observation according to the probability distribution defined by this object.
- Returns
- Random observation from this Gaussian distribution.
◆ Train()
void GaussianDistribution::Train |
( |
const arma::mat & |
observations | ) |
|
Estimate the Gaussian distribution directly from the given observations.
- Parameters
-
observations | List of observations. |
The documentation for this class was generated from the following files: