#include <multinormal.h>
Inheritance diagram for CLUS::MultiDimNormal:
Public Member Functions | |
MultiDimNormal (int InDim=0) | |
MultiDimNormal (int InDim, int) | |
MultiDimNormal (int InDim, double Alpha, Vector< double > &Mu, Fortran_Matrix< double > &SigmaChol) | |
Regressor * | CreateRegressor (void) |
Creates a class that can do the regression for this distribution if given the input. | |
void | DenormalizeParameters (MultiDimNormal *pD) |
Reverses the normalization transformation in the original space mu=pD.sigmaChol*mu+pD.mu; sigmaChol=pD.sigmaChol*sigmaChol;. | |
void | NormalizeData (const double *DataCache, double *X) |
Transform data such that it looks like a 0 centered sphere of radius 1. | |
double | LearnProbability (const double *DataCache) |
Probability that a point belongs to this distribution at learning, unnormalized. | |
double | InferProbability (const double *DataCache) |
Probability that a point belongs to this distribution at inference, unnormalized. | |
void | UpdateStatistics (const double *DataCache, double prob) |
double | NormalizeLearnProbability (double Coef, int nrClus=1) |
Normalizes the probability of belonging to this cluster, normalizing over the mixture Coef is sum alpha*P(x|distribution). | |
double | UpdateParameters (void) |
Computes the values of the new parameters from sufficient statistics. | |
void | AdjustYwithYoverD (double &y) |
Computes the output value for the distribution*probab. | |
void | RandomDistribution (int NrClusters) |
Random initialization of a distribution. | |
void | RandomDistribution (int NrClusters, MultiDimNormal &parent) |
For hierarchies or trees we need to produce offsprings close to the parent. | |
void | SaveToStream (ostream &out) |
Saves the state of the Distribution in a stream. | |
void | LoadFromStream (istream &in) |
Loads the state of the Distribution in a stream. | |
Static Public Member Functions | |
string | TypeName (void) |
Protected Member Functions | |
void | ComputeAlphas (void) |
Computes alpha_over_detChol_inDimp1 and alpha_over_detChol_inDim given sigmaChol. | |
bool | ComputeCCoef (Fortran_Matrix< double > &Sigma, bool isCholesky) |
Computes the equation of the hyperplane using Sigma=S_xxT. | |
Protected Attributes | |
Vector< double > | mu |
the expected value | |
Vector< double > | C |
the equation of the hyperplane | |
Fortran_Matrix< double > | sigmaChol |
the covariance matrix's cholesky, upper diagonal lower diagonal | |
double | alpha_over_detChol_inDimp1 |
the determinant of the cholesky factor of Sigma | |
double | alpha_over_detChol_inDim |
int | N |
number of datapoints | |
double | S |
sum probabilities | |
Vector< double > | S_x |
sum probab*x | |
Fortran_Matrix< double > | S_xxT |
sum prob*xx^T, upper symm diag | |
double | radius |
the radius of the distribution. Used to generate distributions close by |
Definition at line 52 of file multinormal.h.
|
Definition at line 213 of file multinormal.h. |
|
Definition at line 225 of file multinormal.h. |
|
Definition at line 237 of file multinormal.h. |
|
Computes the output value for the distribution*probab.
Reimplemented from CLUS::Distribution. Definition at line 485 of file multinormal.h. |
|
Computes alpha_over_detChol_inDimp1 and alpha_over_detChol_inDim given sigmaChol.
Definition at line 85 of file multinormal.h. Referenced by LoadFromStream(), MultiDimNormal(), RandomDistribution(), and UpdateParameters(). |
|
Computes the equation of the hyperplane using Sigma=S_xxT. Must be called when S_xxT contains Sigma not the partial sums only.
Definition at line 107 of file multinormal.h. Referenced by CreateRegressor(), and LoadFromStream(). |
|
Creates a class that can do the regression for this distribution if given the input.
Reimplemented from CLUS::Distribution. Definition at line 248 of file multinormal.h. |
|
Reverses the normalization transformation in the original space mu=pD.sigmaChol*mu+pD.mu; sigmaChol=pD.sigmaChol*sigmaChol;.
Definition at line 260 of file multinormal.h. |
|
Probability that a point belongs to this distribution at inference, unnormalized.
Reimplemented from CLUS::Distribution. Definition at line 344 of file multinormal.h. |
|
Probability that a point belongs to this distribution at learning, unnormalized.
Reimplemented from CLUS::Distribution. Definition at line 304 of file multinormal.h. |
|
Loads the state of the Distribution in a stream.
Reimplemented from CLUS::Distribution. Definition at line 584 of file multinormal.h. |
|
Transform data such that it looks like a 0 centered sphere of radius 1.
Reimplemented from CLUS::Distribution. Definition at line 287 of file multinormal.h. |
|
Normalizes the probability of belonging to this cluster, normalizing over the mixture Coef is sum alpha*P(x|distribution).
Reimplemented from CLUS::Distribution. Definition at line 384 of file multinormal.h. |
|
For hierarchies or trees we need to produce offsprings close to the parent.
Definition at line 541 of file multinormal.h. |
|
Random initialization of a distribution.
Reimplemented from CLUS::Distribution. Definition at line 499 of file multinormal.h. |
|
Saves the state of the Distribution in a stream.
Reimplemented from CLUS::Distribution. Definition at line 567 of file multinormal.h. |
|
Reimplemented from CLUS::Distribution. Definition at line 494 of file multinormal.h. |
|
Computes the values of the new parameters from sufficient statistics.
Reimplemented from CLUS::Distribution. Definition at line 394 of file multinormal.h. |
|
Definition at line 370 of file multinormal.h. Referenced by NormalizeLearnProbability(). |
|
Definition at line 67 of file multinormal.h. Referenced by ComputeAlphas(), InferProbability(), and MultiDimNormal(). |
|
the determinant of the cholesky factor of Sigma
Definition at line 66 of file multinormal.h. Referenced by ComputeAlphas(), LearnProbability(), and MultiDimNormal(). |
|
the equation of the hyperplane
Definition at line 59 of file multinormal.h. Referenced by AdjustYwithYoverD(), ComputeCCoef(), CreateRegressor(), MultiDimNormal(), and RandomDistribution(). |
|
the expected value
Definition at line 56 of file multinormal.h. Referenced by ComputeAlphas(), ComputeCCoef(), DenormalizeParameters(), InferProbability(), LearnProbability(), LoadFromStream(), MultiDimNormal(), NormalizeData(), RandomDistribution(), SaveToStream(), and UpdateParameters(). |
|
number of datapoints
Definition at line 70 of file multinormal.h. Referenced by MultiDimNormal(), UpdateParameters(), and UpdateStatistics(). |
|
the radius of the distribution. Used to generate distributions close by
Definition at line 82 of file multinormal.h. Referenced by ComputeCCoef(), and RandomDistribution(). |
|
sum probabilities
Definition at line 73 of file multinormal.h. Referenced by ComputeCCoef(), MultiDimNormal(), UpdateParameters(), and UpdateStatistics(). |
|
sum probab*x
Definition at line 76 of file multinormal.h. Referenced by MultiDimNormal(), UpdateParameters(), and UpdateStatistics(). |
|
sum prob*xx^T, upper symm diag
Definition at line 79 of file multinormal.h. Referenced by ComputeAlphas(), MultiDimNormal(), UpdateParameters(), and UpdateStatistics(). |
|
the covariance matrix's cholesky, upper diagonal lower diagonal
Definition at line 63 of file multinormal.h. Referenced by ComputeAlphas(), CreateRegressor(), DenormalizeParameters(), InferProbability(), LearnProbability(), LoadFromStream(), MultiDimNormal(), NormalizeData(), RandomDistribution(), SaveToStream(), and UpdateParameters(). |