latest version v1.9 - last update 10 Apr 2010 |
Functor which estimates a gaussian mixture model of a given data set. More...
#include <ltiGaussianMixtureModel.h>
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 |
gaussianMixtureModel & | copy (const gaussianMixtureModel &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
void | setProgressInfo (progressInfo &pi) |
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.
lti::gaussianMixtureModel< T >::gaussianMixtureModel | ( | ) |
default constructor
lti::gaussianMixtureModel< T >::gaussianMixtureModel | ( | const gaussianMixtureModel< T > & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::gaussianMixtureModel< T >::~gaussianMixtureModel | ( | ) | [virtual] |
destructor
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.
src | matrix<T> with the source data, each row is considered a data point. |
References lti::gaussianMixtureModel< T >::estimate().
virtual functor* lti::gaussianMixtureModel< T >::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Reimplemented from lti::statisticsFunctor.
gaussianMixtureModel& lti::gaussianMixtureModel< T >::copy | ( | const gaussianMixtureModel< T > & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::statisticsFunctor.
bool lti::gaussianMixtureModel< T >::estimate | ( | const matrix< T > & | src | ) |
Equivalent to apply.
src | matrix<T> with the source data, each row is considered a data point. |
Referenced by lti::gaussianMixtureModel< T >::apply().
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.
a | will receive the component mixture coefficients of the last estimation |
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
void lti::gaussianMixtureModel< T >::getComponentMus | ( | std::vector< vector< T > > & | ms | ) | const [inline] |
const std::vector< vector<T> >& lti::gaussianMixtureModel< T >::getComponentMus | ( | ) | const [inline] |
void lti::gaussianMixtureModel< T >::getComponentSigmas | ( | std::vector< matrix< T > > & | sigs | ) | const [inline] |
const std::vector< matrix<T> >& lti::gaussianMixtureModel< T >::getComponentSigmas | ( | ) | const [inline] |
const parameters& lti::gaussianMixtureModel< T >::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::statisticsFunctor.
virtual const char* lti::gaussianMixtureModel< T >::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("gaussianMixtureModel")
Reimplemented from lti::statisticsFunctor.
void lti::gaussianMixtureModel< T >::setProgressInfo | ( | progressInfo & | pi | ) |
Sets the progress info object.