Public Member Functions | |
MixtureModel (int n) | |
Class constructor. | |
double | density (Parameter x) |
Computes the density value of a mixture model. | |
void | normalizeWeights () |
Normalizes the weights of the mixture models such as . | |
String | toString () |
Method toString. | |
MixtureModel | getRandomSubMixtureModel (int m) |
Creates a sub-mixture by randomly picking components in the instance. | |
MixtureModel | clone () |
Creates and returns a copy of the instance. | |
int | getDimension () |
Return the dimension of the parameters of the mixture model. | |
PVector[] | drawRandomPoints (int m) |
Draws points from the considered mixture model. | |
Static Public Member Functions | |
static void | save (MixtureModel mm, String fileName) |
Saves a mixture model in a specified output file. | |
static MixtureModel | load (String fileName) |
Loads a mixture model from an input file. | |
static double | KLDMC (MixtureModel f, MixtureModel g, int n) |
Estimates the Kullback-Leibler divergence using a Monte-Carlo method. | |
static double | KLDMC (MixtureModel f, MixtureModel g, PVector[] points) |
Estimates the Kullback-Leibler divergence using a Monte-Carlo method. | |
Public Attributes | |
ExponentialFamily | EF |
Exponential family of the mixture model. | |
int | size |
Number of components in the mixture model. | |
double[] | weight |
Array containing the weights of the mixture components. | |
Parameter[] | param |
Array containing the parameters of the mixture components. |
where denotes the weight of the mixture component such as . The MixtureModel class provides a convenient way to create and manage mixture of exponential families.
jMEF.MixtureModel.MixtureModel | ( | int | n | ) |
Class constructor.
n | number of components in the mixture models. |
MixtureModel jMEF.MixtureModel.clone | ( | ) |
Creates and returns a copy of the instance.
double jMEF.MixtureModel.density | ( | Parameter | x | ) |
Computes the density value of a mixture model.
x | a point |
PVector [] jMEF.MixtureModel.drawRandomPoints | ( | int | m | ) |
Draws points from the considered mixture model.
m | number of points to draw |
int jMEF.MixtureModel.getDimension | ( | ) |
Return the dimension of the parameters of the mixture model.
MixtureModel jMEF.MixtureModel.getRandomSubMixtureModel | ( | int | m | ) |
Creates a sub-mixture by randomly picking components in the instance.
m | number of components in the the sub mixture |
static double jMEF.MixtureModel.KLDMC | ( | MixtureModel | f, | |
MixtureModel | g, | |||
PVector[] | points | |||
) | [static] |
Estimates the Kullback-Leibler divergence using a Monte-Carlo method.
f | mixture model | |
g | mixture model | |
points | points drawn from f |
static double jMEF.MixtureModel.KLDMC | ( | MixtureModel | f, | |
MixtureModel | g, | |||
int | n | |||
) | [static] |
Estimates the Kullback-Leibler divergence using a Monte-Carlo method.
f | mixture model | |
g | mixture model | |
n | number of points drawn from f |
static MixtureModel jMEF.MixtureModel.load | ( | String | fileName | ) | [static] |
Loads a mixture model from an input file.
fileName | file name where the mixture model is stored |
void jMEF.MixtureModel.normalizeWeights | ( | ) |
Normalizes the weights of the mixture models such as .
static void jMEF.MixtureModel.save | ( | MixtureModel | mm, | |
String | fileName | |||
) | [static] |
Saves a mixture model in a specified output file.
mm | mixture model to be saved | |
fileName | file name where the mixture model has to be saved |
String jMEF.MixtureModel.toString | ( | ) |
Method toString.
ExponentialFamily jMEF.MixtureModel.EF |
Exponential family of the mixture model.
Array containing the parameters of the mixture components.
Number of components in the mixture model.
double [] jMEF.MixtureModel.weight |
Array containing the weights of the mixture components.