|
GCOP
1.0
|
#include <gmm.h>
Public Types | |
| typedef Matrix< double, _n, 1 > | Vectornd |
| typedef Matrix< double, _n, _n > | Matrixnd |
Public Member Functions | |
| Gmm (int n, int k=1) | |
| virtual | ~Gmm () |
| bool | Update () |
| double | L (const Vectornd &x) const |
| double | Sample (Vectornd &x) |
| void | Init (const Vectornd &xlb, const Vectornd &xub) |
| void | Fit (const vector< pair< Vectornd, double > > &xps, double a=1, int iter=50, const Matrixnd *S=0) |
Public Attributes | |
| int | k |
| number of mixture components | |
| vector< Normal< _n > > | ns |
| normal distribution for each component | |
| vector< double > | ws |
| component weights | |
| vector< double > | cdf |
| CDF. | |
| double | tol |
Protected Attributes | |
| Vectornd | t2 |
| Matrixnd | t3 |
Gaussian mixture model
Author: Marin Kobilarov marin(at)jhu.edu
Construct a GMM with dimension n and k clusters
| n | dimension k number of modes |
References gcop::Gmm< _n >::cdf, gcop::Gmm< _n >::k, gcop::Gmm< _n >::ns, gcop::Gmm< _n >::t2, gcop::Gmm< _n >::t3, gcop::Gmm< _n >::tol, and gcop::Gmm< _n >::ws.
| void gcop::Gmm< _n >::Fit | ( | const vector< pair< Vectornd, double > > & | xps, |
| double | a = 1, |
||
| int | iter = 50, |
||
| const Matrixnd * | S = 0 |
||
| ) |
Fit a GMM to data
| xps | data (pairs of vectors and weights), weights should add to one |
| a | smoothing factor for updating the parameter v according to [ v_new = a*v_est + (1-a)*v_old ]; it set to 1 by default |
| iter | maximum number of EM iterations (only applies for multiple mixtures) |
| S | use additional noise matrix during EM for stability |
CDF.
Referenced by gcop::Gmm< _n >::Gmm().
number of mixture components
Referenced by gcop::Gmm< _n >::Gmm().
normal distribution for each component
Referenced by gcop::Gmm< _n >::Gmm().
Referenced by gcop::Gmm< _n >::Gmm().
Referenced by gcop::Gmm< _n >::Gmm().
Referenced by gcop::Gmm< _n >::Gmm().
component weights
Referenced by gcop::Gmm< _n >::Gmm().
1.7.6.1