w2img::GaussianMixtureModel Class Reference

List of all members.

Detailed Description

Reports parameters of the best-fit Gaussian Mixture Model to a set of data:.

        P(x,y) =  wi N(x,y given xi,yi,sxi,syi)
     
where P is the final density function; xi,yi,sxi,syi are the mean and standard deviation of a Gaussian; N(x,y) is the value of the Gaussian at x,y; wi is the weight of this Gaussian

Author:
Lakshman
Version:
Id
w2img_GaussianMixtureModel.h,v 1.15 2010/06/23 21:33:50 lakshman Exp


Static Public Member Functions

static void init_gmm (const std::vector< float > &x, const std::vector< float > &y, int n_models, std::vector< GaussianComponent > &mixture)
 simply slices the input and initializes a GMM fit to each slice.
static void init_gmm (const std::vector< float > &x, const std::vector< float > &y, const std::vector< int > &startindex, int desired_n_models, std::vector< GaussianComponent > &mixture)
 Uses user-defined slices and initializes a GMM fit.
static float tune_gmm_em (const std::vector< float > &x, const std::vector< float > &y, std::vector< GaussianComponent > &mixture, const float min_improvement=0.05, const int max_iter=10)
 Tunes an initialized GMM using the Expectation-Minimization algorithm.
static float fit (const std::vector< float > &x, const std::vector< float > &y, std::vector< GaussianComponent > &mixture, int max_n_models=-1)
 Uses the Bayesian Information Criterion to come up with a reasonable number for number of models.

Classes

class  GaussianComponent


Member Function Documentation

static float w2img::GaussianMixtureModel::fit ( const std::vector< float > &  x,
const std::vector< float > &  y,
std::vector< GaussianComponent > &  mixture,
int  max_n_models = -1 
) [static]

Uses the Bayesian Information Criterion to come up with a reasonable number for number of models.

Returns:
log(likelihood) of the complete fit.
If max_n_models is not specified, x.size()/5 (no reduction) is used.

static void w2img::GaussianMixtureModel::init_gmm ( const std::vector< float > &  x,
const std::vector< float > &  y,
const std::vector< int > &  startindex,
int  desired_n_models,
std::vector< GaussianComponent > &  mixture 
) [static]

Uses user-defined slices and initializes a GMM fit.

The startindex provides the starting index for each slice. Slices will be combined/split to match the desired number of models.

Returns:
log(likelihood) of the complete fit.

static void w2img::GaussianMixtureModel::init_gmm ( const std::vector< float > &  x,
const std::vector< float > &  y,
int  n_models,
std::vector< GaussianComponent > &  mixture 
) [static]

simply slices the input and initializes a GMM fit to each slice.

Returns:
log(likelihood) of the complete fit.

static float w2img::GaussianMixtureModel::tune_gmm_em ( const std::vector< float > &  x,
const std::vector< float > &  y,
std::vector< GaussianComponent > &  mixture,
const float  min_improvement = 0.05,
const int  max_iter = 10 
) [static]

Tunes an initialized GMM using the Expectation-Minimization algorithm.

Returns:
log(likelihood) of the complete fit.
Parameters:
min_improvement If improvement in log(likelihood) is less than this ratio (0.05 indicates 5%), EM process is stopped.
max_iter Maximum number of EM iterations


Generated on Fri May 4 13:40:23 2012 for WDSS-IIw2algs by  doxygen 1.4.7