SYNOPSIS

Public Member Functions

LaplaceDistribution ()

Default constructor, which creates a Laplace distribution with zero dimension and zero scale parameter. LaplaceDistribution (const size_t dimensionality, const double scale)

Construct the Laplace distribution with the given scale and dimensionality. LaplaceDistribution (const arma::vec &mean, const double scale)

Construct the Laplace distribution with the given mean and scale parameter. size_t Dimensionality () const

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

Estimate the Laplace distribution directly from the given observations. void Estimate (const arma::mat &observations, const arma::vec &probabilities)

Estimate the Laplace 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 ()

Modify 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. double Scale () const

Return the scale parameter. double & Scale ()

Modify the scale parameter. std::string ToString () const

Return a string representation of the object.

Private Attributes

arma::vec mean

Mean of the distribution. double scale

Scale parameter of the distribution.

Detailed Description

The multivariate Laplace distribution centered at 0 has pdf.

\[ f(x|\theta) = ac{1}{2 \theta}\xp\left(-ac{\|x - \mu\|}{\theta}\right) \]

given scale parameter $\theta$ and mean $\mu$. This implementation assumes a diagonal covariance, but a rewrite to support arbitrary covariances is possible.

See the following paper for more information on the non-diagonal-covariance Laplace distribution and estimation techniques:

@article{eltoft2006multivariate,
  title={{On the Multivariate Laplace Distribution}},
  author={Eltoft, Torbj\orn and Kim, Taesu and Lee, Te-Won},
  journal={IEEE Signal Processing Letters},
  volume={13},
  number={5},
  pages={300--304},
  year={2006}
}

Note that because of the diagonal covariance restriction, much of the algebra in the paper above becomes simplified, and the PDF takes roughly the same form as the univariate case.

Definition at line 59 of file laplace_distribution.hpp.

Constructor & Destructor Documentation

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

Default constructor, which creates a Laplace distribution with zero dimension and zero scale parameter.

Definition at line 66 of file laplace_distribution.hpp.

mlpack::distribution::LaplaceDistribution::LaplaceDistribution (const size_tdimensionality, const doublescale)\fC [inline]\fP

Construct the Laplace distribution with the given scale and dimensionality. The mean is initialized to zero.

Parameters:

dimensionality Dimensionality of distribution.

scale Scale of distribution.

Definition at line 75 of file laplace_distribution.hpp.

mlpack::distribution::LaplaceDistribution::LaplaceDistribution (const arma::vec &mean, const doublescale)\fC [inline]\fP

Construct the Laplace distribution with the given mean and scale parameter.

Parameters:

mean Mean of distribution.

scale Scale of distribution.

Definition at line 84 of file laplace_distribution.hpp.

Member Function Documentation

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

Return the dimensionality of this distribution.

Definition at line 88 of file laplace_distribution.hpp.

References mean.

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

Estimate the Laplace distribution directly from the given observations.

Parameters:

observations List of observations.

void mlpack::distribution::LaplaceDistribution::Estimate (const arma::mat &observations, const arma::vec &probabilities)

Estimate the Laplace distribution from the given observations, taking into account the probability of each observation actually being from this distribution.

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

Return the mean.

Definition at line 138 of file laplace_distribution.hpp.

References mean.

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

Modify the mean.

Definition at line 140 of file laplace_distribution.hpp.

References mean.

double mlpack::distribution::LaplaceDistribution::Probability (const arma::vec &observation) const

Return the probability of the given observation.

arma::vec mlpack::distribution::LaplaceDistribution::Random () const\fC [inline]\fP

Return a randomly generated observation according to the probability distribution defined by this object. This is inlined for speed.

Returns:

Random observation from this Laplace distribution.

Definition at line 101 of file laplace_distribution.hpp.

References mean, and scale.

double mlpack::distribution::LaplaceDistribution::Scale () const\fC [inline]\fP

Return the scale parameter.

Definition at line 143 of file laplace_distribution.hpp.

References scale.

double& mlpack::distribution::LaplaceDistribution::Scale ()\fC [inline]\fP

Modify the scale parameter.

Definition at line 145 of file laplace_distribution.hpp.

References scale.

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

Return a string representation of the object.

Member Data Documentation

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

Mean of the distribution.

Definition at line 152 of file laplace_distribution.hpp.

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

double mlpack::distribution::LaplaceDistribution::scale\fC [private]\fP

Scale parameter of the distribution.

Definition at line 154 of file laplace_distribution.hpp.

Referenced by Random(), and Scale().

Author

Generated automatically by Doxygen for MLPACK from the source code.