GClasses
|
This class uses Expectency Maximization to find the mixture of Gaussians that best approximates the data in a specified real attribute of a data set. More...
#include <GMixtureOfGaussians.h>
Public Member Functions | |
GMixtureOfGaussians (int nKernelCount, GMatrix *pData, int nAttribute, double minVariance, GRand *pRand) | |
virtual | ~GMixtureOfGaussians () |
double | iterate () |
Returns the log likelihood of the current parameters. | |
void | params (int nKernel, double *pMean, double *pVariance, double *pWeight) |
Returns the current parameters of the specified kernel. | |
Static Public Member Functions | |
static void | test () |
Performs unit tests for this class. Throws an exception if there is a failure. | |
static GMixtureOfGaussians * | stochasticHammer (int nMinKernelCount, int nMaxKernelCount, int nItters, int nTrials, GMatrix *pData, int nAttribute, double minVariance, GRand *pRand) |
This tries to fit the data from several random starting points, and returns the best model it finds. | |
Protected Member Functions | |
double | evalKernel (double x, int nKernel) |
double | likelihoodOfEachCategoryGivenThisFeature (double x) |
Protected Attributes | |
int | m_nKernelCount |
int | m_nAttribute |
double * | m_pArrMeanVarWeight |
double * | m_pCatLikelihoods |
double * | m_pTemp |
GMatrix * | m_pData |
GNormalDistribution | m_dist |
double | m_dMinVariance |
This class uses Expectency Maximization to find the mixture of Gaussians that best approximates the data in a specified real attribute of a data set.
GClasses::GMixtureOfGaussians::GMixtureOfGaussians | ( | int | nKernelCount, |
GMatrix * | pData, | ||
int | nAttribute, | ||
double | minVariance, | ||
GRand * | pRand | ||
) |
virtual GClasses::GMixtureOfGaussians::~GMixtureOfGaussians | ( | ) | [virtual] |
double GClasses::GMixtureOfGaussians::evalKernel | ( | double | x, |
int | nKernel | ||
) | [protected] |
double GClasses::GMixtureOfGaussians::iterate | ( | ) |
Returns the log likelihood of the current parameters.
double GClasses::GMixtureOfGaussians::likelihoodOfEachCategoryGivenThisFeature | ( | double | x | ) | [protected] |
void GClasses::GMixtureOfGaussians::params | ( | int | nKernel, |
double * | pMean, | ||
double * | pVariance, | ||
double * | pWeight | ||
) |
Returns the current parameters of the specified kernel.
static GMixtureOfGaussians* GClasses::GMixtureOfGaussians::stochasticHammer | ( | int | nMinKernelCount, |
int | nMaxKernelCount, | ||
int | nItters, | ||
int | nTrials, | ||
GMatrix * | pData, | ||
int | nAttribute, | ||
double | minVariance, | ||
GRand * | pRand | ||
) | [static] |
This tries to fit the data from several random starting points, and returns the best model it finds.
static void GClasses::GMixtureOfGaussians::test | ( | ) | [static] |
Performs unit tests for this class. Throws an exception if there is a failure.
double GClasses::GMixtureOfGaussians::m_dMinVariance [protected] |
int GClasses::GMixtureOfGaussians::m_nAttribute [protected] |
int GClasses::GMixtureOfGaussians::m_nKernelCount [protected] |
double* GClasses::GMixtureOfGaussians::m_pArrMeanVarWeight [protected] |
double* GClasses::GMixtureOfGaussians::m_pCatLikelihoods [protected] |
GMatrix* GClasses::GMixtureOfGaussians::m_pData [protected] |
double* GClasses::GMixtureOfGaussians::m_pTemp [protected] |