KJB
|
Multivariate Gaussian (normal) distribution. More...
#include <prob_distribution.h>
Public Member Functions | |
MV_gaussian_distribution (int d) | |
Constructs a d-dimensinoal multivariate Gaussian with a mean of zero and a covariance matrix of identity. More... | |
MV_gaussian_distribution (const Vector &mu, const Matrix &sigma) | |
Constructs a multivariate Gaussian with a mean of mu and a covariance matrix of sigma. sigma must be positive-definite. More... | |
MV_gaussian_distribution (const Vector &mu, const Vector &sigma_diag) | |
Constructs a multivariate Gaussian with a mean of mu and a covariance matrix diag(sigma_diag). More... | |
const Vector & | get_mean () const |
Gets the mean of this distribution. More... | |
const Matrix & | get_covariance_matrix () const |
Gets the covariance matrix of this distribution. More... | |
void | set_mean (const Vector &m) |
Gets the mean of this distribution. More... | |
void | set_covariance_matrix (const Matrix &S) |
Gets the covariance matrix of this distribution. More... | |
void | set_covariance_matrix (const Matrix &S, const Vector &m) |
Gets the covariance matrix of this distribution. More... | |
int | get_dimension () const |
Gets the dimension of this distribution. More... | |
MV_gaussian_conditional_distribution | conditional (int i) const |
Conditional distribution of the ith variable given the rest. More... | |
Friends | |
double | pdf (const MV_gaussian_distribution &, const Vector &) |
Computes the joint PDF of a multivariate Gaussian at x. More... | |
double | log_pdf (const MV_gaussian_distribution &, const Vector &) |
Computes the log PDF a multivariate normal distribution at x. More... | |
Vector | sample (const MV_gaussian_distribution &) |
Sample from a multivariate normal distribution. More... | |
Multivariate Gaussian (normal) distribution.
This class implements a multivariate Gaussian distribution.
|
inline |
Constructs a d-dimensinoal multivariate Gaussian with a mean of zero and a covariance matrix of identity.
d | The dimension of the distribution. |
|
inline |
Constructs a multivariate Gaussian with a mean of mu and a covariance matrix of sigma. sigma must be positive-definite.
mu | The mean of the distribution. |
sigma | The covariance matrix of the distribution. |
|
inline |
Constructs a multivariate Gaussian with a mean of mu and a covariance matrix diag(sigma_diag).
mu | The mean of the distribution. |
sigma_diag | The diagonal of the covariance matrix. |
MV_gaussian_conditional_distribution kjb::MV_gaussian_distribution::conditional | ( | int | i | ) | const |
Conditional distribution of the ith variable given the rest.
|
inline |
Gets the covariance matrix of this distribution.
|
inline |
Gets the dimension of this distribution.
|
inline |
Gets the mean of this distribution.
|
inline |
Gets the covariance matrix of this distribution.
|
inline |
Gets the covariance matrix of this distribution.
|
inline |
Gets the mean of this distribution.
|
friend |
Computes the log PDF a multivariate normal distribution at x.
This is a specialization of the generic joint_log_pdf function. It is specialized to avoid the computation of the log of the exponential.
|
friend |
Computes the joint PDF of a multivariate Gaussian at x.
|
friend |
Sample from a multivariate normal distribution.