Class MixtureComponent

Class Documentation

class MixtureComponent

A weighted Student’s T or Gaussian distribution used as a component in a Mixture.

Unnamed Group

Vector getMu() const

Get/set the location parameter (mean/median/mode) of this component.

void setMu(Vector const &mu)

Unnamed Group

Matrix getSigma() const

Get/set the shape/size parameter.

For the Gaussian distribution, this is simply the covariance matrix. For the Student’s T distribution with df > 2, covariance = sigma * df / (df - 2); for df <= 2, the Student’s T distribution has infinite variance, but is still a valid distribution.

void setSigma(Matrix const &sigma)

Public Functions

int getDimension() const

Return the number of dimensions.

MixtureComponent project(int dim) const

Project the distribution onto the given dimension (marginalize over all others)

MixtureComponent project(int dim1, int dim2) const

Project the distribution onto the given dimensions (marginalize over all others)

MixtureComponent(int dim)

Default-construct a mixture component with weight=1, mu=0, sigma=identity.

MixtureComponent(Scalar weight_, Vector const &mu, Matrix const &sigma)

Default-construct a mixture component with the given parameters.

MixtureComponent &operator=(MixtureComponent const &other)

Public Members

Scalar weight

Weight of this distribution in the mixture.

Friends

std::ostream &operator<<(std::ostream &os, MixtureComponent const &self)