gplib  1.0.0
C++ Gaussian Process Library
Classes | Public Member Functions | Private Attributes | List of all members
gplib::mv_gauss Class Reference

#include <mvgauss.hpp>

Collaboration diagram for gplib::mv_gauss:
Collaboration graph
[legend]

Classes

struct  implementation
 

Public Member Functions

 mv_gauss ()
 Constructor. More...
 
 mv_gauss (const mv_gauss &other)
 Constructor, requieres another Multivariate Gaussian distribution to be copied. More...
 
 mv_gauss (const arma::vec &mean, const arma::mat &cov)
 Constructor, requieres a arma vector of means and a matrix of covariances. More...
 
 ~mv_gauss ()
 Destructor. More...
 
void set_mean (const arma::vec &mean)
 Sets the mean vector to the Gaussian distribution. More...
 
void set_cov (const arma::mat &cov)
 Sets the covariance matrix to the Gaussian distribution. More...
 
arma::vec get_mean () const
 Gets the mean vector. More...
 
arma::mat get_cov () const
 Gets the covanriance matrix. More...
 
arma::mat get_cov_inv () const
 Returns the inverse of the covanriance matrix. More...
 
arma::mat get_cov_chol () const
 Returns the cholesky decomposition of the covanriance matrix. More...
 
size_t dimension () const
 Returns the dimensionality of the Gaussian ditribution. More...
 
arma::mat sample (int n_samples) const
 Returns n_samples samples in a matrix with n_samples rows and D columns. More...
 
double log_density (const arma::vec &x) const
 Returns the logartihm density of the Gaussian distribution. More...
 
double density (const arma::vec &x) const
 Returns the density of the Gaussian ditribution. More...
 
mv_gauss marginalize_hidden (const std::vector< bool > &observed) const
 Returns the marginal distribution after integrating out the non observed variables. More...
 
mv_gauss conditional (const arma::vec &observation, const std::vector< bool > &observed) const
 Returns the conditional distribution of the hidden variables given the an observation of the observed variables. More...
 
mv_gauss operator= (const mv_gauss &other)
 Overload of the operand = to work with Multivariate Gaussian class. More...
 

Private Attributes

implementationpimpl
 

Constructor & Destructor Documentation

gplib::mv_gauss::mv_gauss ( )

Constructor.

gplib::mv_gauss::mv_gauss ( const mv_gauss other)

Constructor, requieres another Multivariate Gaussian distribution to be copied.

Parameters
other: Multivariate Gaussian.
gplib::mv_gauss::mv_gauss ( const arma::vec &  mean,
const arma::mat &  cov 
)

Constructor, requieres a arma vector of means and a matrix of covariances.

Parameters
mean: Vector of means.
cov: Matrix of covariance.
gplib::mv_gauss::~mv_gauss ( )

Destructor.

Member Function Documentation

mv_gauss gplib::mv_gauss::conditional ( const arma::vec &  observation,
const std::vector< bool > &  observed 
) const

Returns the conditional distribution of the hidden variables given the an observation of the observed variables.

Only the values for which the observed vector is true are considered on vector observation.

Parameters
observation: vector, indicates the observed values.
observed: boolean vector, indicates which values are observed.
double gplib::mv_gauss::density ( const arma::vec &  x) const

Returns the density of the Gaussian ditribution.

Parameters
x: Vector of random variables.
size_t gplib::mv_gauss::dimension ( ) const

Returns the dimensionality of the Gaussian ditribution.

mat gplib::mv_gauss::get_cov ( ) const

Gets the covanriance matrix.

mat gplib::mv_gauss::get_cov_chol ( ) const

Returns the cholesky decomposition of the covanriance matrix.

mat gplib::mv_gauss::get_cov_inv ( ) const

Returns the inverse of the covanriance matrix.

vec gplib::mv_gauss::get_mean ( ) const

Gets the mean vector.

double gplib::mv_gauss::log_density ( const arma::vec &  x) const

Returns the logartihm density of the Gaussian distribution.

Parameters
x: Vector of random variables.
mv_gauss gplib::mv_gauss::marginalize_hidden ( const std::vector< bool > &  observed) const

Returns the marginal distribution after integrating out the non observed variables.

If the value of observed[i] is true then the variable is assumed observed, otherwise it is integrated out.

Parameters
observed: boolean vector which indicates which values are observed.
mv_gauss gplib::mv_gauss::operator= ( const mv_gauss other)

Overload of the operand = to work with Multivariate Gaussian class.

Parameters
other: Gaussian distribution to be set.
mat gplib::mv_gauss::sample ( int  n_samples) const

Returns n_samples samples in a matrix with n_samples rows and D columns.

Where D is the dimensionality of the Gaussian distribution.

Parameters
n_samples: number of samples.
void gplib::mv_gauss::set_cov ( const arma::mat &  cov)

Sets the covariance matrix to the Gaussian distribution.

Parameters
cov: Matrix of covanriance.
void gplib::mv_gauss::set_mean ( const arma::vec &  mean)

Sets the mean vector to the Gaussian distribution.

Parameters
mean: Vector of means.

Member Data Documentation

implementation* gplib::mv_gauss::pimpl
private

The documentation for this class was generated from the following files: