class GMM

Gaussian Mixture Model (GMM) class More...

Definition#include <HMM/include/gmm.h>
InheritsObject (data-flow)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Protected Members


Detailed Description

Gaussian Mixture Model (GMM) class

typedef enum GMM_Mode

vector<RCPtr<Gaussian> > gaussians

[protected]

STL vector containing all the gaussians in the GMM

vector<float> apriori

[protected]

STL vector containing all the apriori weights of the gaussians

int nb_gaussians

[protected]

Number of gaussians in the GMM

int mode

[protected]

Whether of not the GMM trained (like real/accum mode) (GMM_Mode)

int nb_frames_aligned

[protected]

Number of frames aligned to (used to train) the GMM

int dimensions

[protected]

Number of dimensions

bool using_gaussianIDs

[protected]

Was the gaussian loaded using indexes for mean

vector<int> gaussianIDs

[protected]

STL vector containing all the gaussian IDs in the GMM

 GMM (int nb_gauss, int dim, Covariance *(*cov_new)(int)) : gaussians(vector<RCPtr<Gaussian> >(nb_gauss)) , apriori (vector<float>(nb_gauss,0.0)) , nb_gaussians (nb_gauss) , mode(accum) , nb_frames_aligned(0) , dimensions (dim) , using_gaussianIDs(false)

Construct a GMM with nb_gauss gaussians, dim dimensions and a covariance pseudo-factory

 GMM () : gaussians(vector<RCPtr<Gaussian> >()) , nb_gaussians (0) , mode(accum) , nb_frames_aligned(0) , dimensions(1) , using_gaussianIDs(false)

void  save (string file)

int  get_nb_gaussians ()

[const]

Returns the number of gaussians in the GMM

Gaussiangaussian (int i)

[const]

Returns the i'th gaussian

void  accum_to_gaussian (int i, const float * fr)

Accumulates (adds) the frame to the i'th gaussian

void  init (vector<float * > frames)

Randomly init the GMM with a list (STL vector) of frames

void  kmeans1 (vector<float * > frames, int nb_iterations = 1)

Performs k-means training

void  split1 ()

splits the largest gaussian in two

void  kmeans2 (vector<float * > frames, GMM *gmm)

Performs k-means training (using another GMM to score)

void  adaptMAP (vector<float * > frame, GMM *gmm)

Perform MAP adaptation (using another GMM to score)

void  to_real ()

Converts the GMM from accum mode to real mode

void  reset_to_accum_mode ()

Converts the GMM from real mode to accum mode and set everything to zero

Score  minDistance (float * fr, Covariance *cov)

[const]

Score a frame against the GMM without using the covariances (nearest euclidian distance)

Score  score (float * fr)

[const]

Score a frame against the GMM

void  binary_split ()

Double the number of gaussians

vector<Score>  minDistance (vector <float *> fr)

[const]

Score a list (STL vector) of frames against the GMM without using the covariances (nearest euclidian distance)

vector<Score>  score (vector <float *> fr)

[const]

Score a list (STL vector) of frames against the GMM

void  toIDsUsing (GaussianSet & gauss)

void  toPtrsUsing (const GaussianSet & gauss)

DiagGMMcreateDiagGMM ()

Creates a DiagGMM object from a GMM

void  printOn (ostream &out=cout)

[const virtual]

print function used for operator <<

Reimplemented from Object.

void  readFrom (istream &in=cin)

Read function used for operator >>

Reimplemented from Object.

friend istream & operator >> (istream &in, GMM &gmm)

extractor for GMM

istream & operator >> (istream &in, GMM &gmm)


Generated by: jmvalin@usw-pr-shell2 on Mon Jun 24 00:06:40 2002, using kdoc 2.0a40.