LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::gaussianMixtureModel< T > Class Template Reference

Functor which estimates a gaussian mixture model of a given data set. More...

#include <ltiGaussianMixtureModel.h>

Inheritance diagram for lti::gaussianMixtureModel< T >:
Inheritance graph
[legend]
Collaboration diagram for lti::gaussianMixtureModel< T >:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 The parameters for the class gaussianMixtureModel. More...

Public Member Functions

 gaussianMixtureModel ()
 gaussianMixtureModel (const gaussianMixtureModel &other)
virtual ~gaussianMixtureModel ()
virtual const char * getTypeName () const
bool apply (const matrix< T > &src)
bool estimate (const matrix< T > &src)
const std::vector< matrix< T > > & getComponentSigmas () const
const std::vector< vector< T > > & getComponentMus () const
const vector< T > & getAlpha () const
void getComponentSigmas (std::vector< matrix< T > > &sigs) const
void getComponentMus (std::vector< vector< T > > &ms) const
void getAlpha (vector< T > &a) const
gaussianMixtureModelcopy (const gaussianMixtureModel &other)
virtual functorclone () const
const parametersgetParameters () const
void setProgressInfo (progressInfo &pi)

Detailed Description

template<class T>
class lti::gaussianMixtureModel< T >

Functor which estimates a gaussian mixture model of a given data set.

See documentation of the apply() methods for details. Please note that, even though this is a template class, it does not make much sense to use it with anything but floating-point types. The higher the precision, the better. So, if you use gaussianMixtureModel<float> and get crappy results, you should not wonder. If you get reasonable results, you're just lucky. Other template arguments than float or double probably won't even compile.


Constructor & Destructor Documentation

template<class T >
lti::gaussianMixtureModel< T >::gaussianMixtureModel (  ) 

default constructor

template<class T >
lti::gaussianMixtureModel< T >::gaussianMixtureModel ( const gaussianMixtureModel< T > &  other  ) 

copy constructor

Parameters:
other the object to be copied
template<class T >
virtual lti::gaussianMixtureModel< T >::~gaussianMixtureModel (  )  [virtual]

destructor


Member Function Documentation

template<class T >
bool lti::gaussianMixtureModel< T >::apply ( const matrix< T > &  src  )  [inline]

Performs estimation of a gaussian mixture model for the given data matrix.

The matrix is interpreted as having a data point in each row. The method uses the Expectation Maximization method; for a really nice explanation of the algorithm, see the paper A Gentle Tutorial of the EM Algorithm and its Application to Parameter Estimation for Gaussian Mixture and Hidden Markov Models by Jeff Bilmes. (published as Technical Report TR-97-021 by the International Computer Science Institute). If the useSM parameter is true, the split-and-merge algorithm by Split-and-Merge EM algorithm by Ueda, Nakano, Ghahramani, and Hinton (Neural Computation 12(9), pp. 2109-2128) is used instead.

Parameters:
src matrix<T> with the source data, each row is considered a data point.
Returns:
true if the estimation was successfull.

References lti::gaussianMixtureModel< T >::estimate().

template<class T >
virtual functor* lti::gaussianMixtureModel< T >::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Reimplemented from lti::statisticsFunctor.

template<class T >
gaussianMixtureModel& lti::gaussianMixtureModel< T >::copy ( const gaussianMixtureModel< T > &  other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::statisticsFunctor.

template<class T >
bool lti::gaussianMixtureModel< T >::estimate ( const matrix< T > &  src  ) 

Equivalent to apply.

Parameters:
src matrix<T> with the source data, each row is considered a data point.
Returns:
true if the estimation was successfull.

Referenced by lti::gaussianMixtureModel< T >::apply().

template<class T >
void lti::gaussianMixtureModel< T >::getAlpha ( vector< T > &  a  )  const [inline]

Copies the mixing coefficients to the given parameter.

Each vector element is the a-priori probability of a model component.

Parameters:
a will receive the component mixture coefficients of the last estimation
template<class T >
const vector<T>& lti::gaussianMixtureModel< T >::getAlpha (  )  const [inline]

Returns the mixing coefficient vector.

Each element is the mixing coefficient of a model component. It can be viewed as a

Returns:
a reference to the mixing coefficients of the last estimation
template<class T >
void lti::gaussianMixtureModel< T >::getComponentMus ( std::vector< vector< T > > &  ms  )  const [inline]

Copies a std::vector of mean vectors of the components to the given parameter.

Each vector element is the mean vector of a model component.

Parameters:
ms will receive the component means of the last estimation
template<class T >
const std::vector< vector<T> >& lti::gaussianMixtureModel< T >::getComponentMus (  )  const [inline]

Returns a std::vector of mean vectors of the components.

Each vector element is the mean vector of a model component.

Returns:
a reference to the component means of the last estimation
template<class T >
void lti::gaussianMixtureModel< T >::getComponentSigmas ( std::vector< matrix< T > > &  sigs  )  const [inline]

Copies a std::vector of covariance matrices of the components to the given parameter.

Each vector element is the covariance matrix of a model component.

Parameters:
sigs will receive the component covariance matrices of the last estimation
template<class T >
const std::vector< matrix<T> >& lti::gaussianMixtureModel< T >::getComponentSigmas (  )  const [inline]

Returns a std::vector of covariance matrices of the components.

Each vector element is the covariance matrix of a model component.

Returns:
a reference to the component covariance matrices of the last estimation
template<class T >
const parameters& lti::gaussianMixtureModel< T >::getParameters (  )  const

returns used parameters

Reimplemented from lti::statisticsFunctor.

template<class T >
virtual const char* lti::gaussianMixtureModel< T >::getTypeName (  )  const [virtual]

returns the name of this type ("gaussianMixtureModel")

Reimplemented from lti::statisticsFunctor.

template<class T >
void lti::gaussianMixtureModel< T >::setProgressInfo ( progressInfo pi  ) 

Sets the progress info object.


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

Generated on Sat Apr 10 15:28:21 2010 for LTI-Lib by Doxygen 1.6.1