Main Page | Namespace List | Class Hierarchy | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

CLUS::Distribution Class Reference

Base class for all the continuous distributions that have sufficient statistics. More...

#include <distribution.h>

Inheritance diagram for CLUS::Distribution:

Inheritance graph
[legend]

Public Member Functions

 Distribution (int InDim=0)
RegressorCreateRegressor (void)
 Creates a class that can do the regression for this distribution if given the input.

bool HasZeroWeight (void)
 Returns true if weitht=0. In this case the distribution should not be used.

void RandomCluster (void)
 Initializes the parameters of the distribution randomly.

void NormalizeData (const double *DataCache, double *X)
 Perform distribution dependent transformations on the data.

void DenormalizeParameters (Distribution *pD)
 Reverse the normalization transformation in original space.

double InferProbability (const double *DataCache)
 Probability that a point belongs to this distribution at inference, unnormalized.

double LearnProbability (const double *DataCache)
 Probability that a point belongs to this distribution at learning, unnormalized.

double Probability (const double *DataCache)
 Probability that a point belongs to this distribution (unnormalized). Same as learn probability.

double LastInferProbability (void)
 Returns the last Inference probability.

double LastLearnProbability (void)
 Returns the last Learning probability.

double LastProbability (void)
double NormalizeInferProbability (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 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 NormalizeProbability (double Coef, int nrClus=1)
 Makes the simple normalization of the probability not more sophisticated version that can be later added.

void InitializeStatistics (void)
 Prepares the distribution for learning.

void UpdateStatistics (double prob)
 Updates the sufficient statistics.

double UpdateParameters (void)
 Computes the values of the new parameters from sufficient statistics.

bool SetOptionDbl (char *optName, double value)
void AdjustYwithYoverD (double &y)
 Computes the output value for the distribution*probab.

void RandomDistribution (int NrClusters)
 Random initialization of a distribution.

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 Attributes

int inDim
 The dimentionality of the input space.

const double * dataCache
 Used for optimization purpses. Is the last parameter passed to Infer or Learn.

double probabilityInfer
 Cached values for the last probabilities of belonging to the cluster.

double probabilityLearn
 Cached values for the last probabilities of belonging to the cluster.

double weight
 The weight in the sum of distributions.


Detailed Description

Base class for all the continuous distributions that have sufficient statistics.

Definition at line 51 of file distribution.h.


Constructor & Destructor Documentation

CLUS::Distribution::Distribution int  InDim = 0  )  [inline]
 

Definition at line 68 of file distribution.h.


Member Function Documentation

void CLUS::Distribution::AdjustYwithYoverD double &  y  )  [inline]
 

Computes the output value for the distribution*probab.

Reimplemented in CLUS::MultiDimNormal, and CLUS::SkinyMultiDimNormal.

Definition at line 195 of file distribution.h.

Regressor* CLUS::Distribution::CreateRegressor void   )  [inline]
 

Creates a class that can do the regression for this distribution if given the input.

Reimplemented in CLUS::MultiDimNormal, and CLUS::SkinyMultiDimNormal.

Definition at line 74 of file distribution.h.

void CLUS::Distribution::DenormalizeParameters Distribution pD  )  [inline]
 

Reverse the normalization transformation in original space.

Definition at line 98 of file distribution.h.

bool CLUS::Distribution::HasZeroWeight void   )  [inline]
 

Returns true if weitht=0. In this case the distribution should not be used.

Definition at line 80 of file distribution.h.

double CLUS::Distribution::InferProbability const double *  DataCache  )  [inline]
 

Probability that a point belongs to this distribution at inference, unnormalized.

Reimplemented in CLUS::MultiDimNormal, and CLUS::SkinyMultiDimNormal.

Definition at line 103 of file distribution.h.

void CLUS::Distribution::InitializeStatistics void   )  [inline]
 

Prepares the distribution for learning.

Definition at line 166 of file distribution.h.

double CLUS::Distribution::LastInferProbability void   )  [inline]
 

Returns the last Inference probability.

Definition at line 121 of file distribution.h.

double CLUS::Distribution::LastLearnProbability void   )  [inline]
 

Returns the last Learning probability.

Definition at line 127 of file distribution.h.

double CLUS::Distribution::LastProbability void   )  [inline]
 

Definition at line 132 of file distribution.h.

double CLUS::Distribution::LearnProbability const double *  DataCache  )  [inline]
 

Probability that a point belongs to this distribution at learning, unnormalized.

Reimplemented in CLUS::MultiDimNormal, CLUS::SimpleNormalDistribution, and CLUS::SkinyMultiDimNormal.

Definition at line 109 of file distribution.h.

Referenced by Probability().

void CLUS::Distribution::LoadFromStream istream &  in  )  [inline]
 

Loads the state of the Distribution in a stream.

Reimplemented in CLUS::MultiDimNormal, and CLUS::SkinyMultiDimNormal.

Definition at line 207 of file distribution.h.

void CLUS::Distribution::NormalizeData const double *  DataCache,
double *  X
[inline]
 

Perform distribution dependent transformations on the data.

Reimplemented in CLUS::MultiDimNormal, and CLUS::SkinyMultiDimNormal.

Definition at line 90 of file distribution.h.

double CLUS::Distribution::NormalizeInferProbability double  Coef,
int  nrClus = 1
[inline]
 

Normalizes the probability of belonging to this cluster, normalizing over the mixture Coef is sum alpha*P(x|distribution).

Definition at line 139 of file distribution.h.

double CLUS::Distribution::NormalizeLearnProbability double  Coef,
int  nrClus = 1
[inline]
 

Normalizes the probability of belonging to this cluster, normalizing over the mixture Coef is sum alpha*P(x|distribution).

Reimplemented in CLUS::MultiDimNormal, CLUS::SimpleNormalDistribution, and CLUS::SkinyMultiDimNormal.

Definition at line 149 of file distribution.h.

Referenced by NormalizeProbability().

double CLUS::Distribution::NormalizeProbability double  Coef,
int  nrClus = 1
[inline]
 

Makes the simple normalization of the probability not more sophisticated version that can be later added.

Reimplemented in CLUS::SimpleNormalDistribution.

Definition at line 160 of file distribution.h.

double CLUS::Distribution::Probability const double *  DataCache  )  [inline]
 

Probability that a point belongs to this distribution (unnormalized). Same as learn probability.

Reimplemented in CLUS::SimpleNormalDistribution.

Definition at line 115 of file distribution.h.

void CLUS::Distribution::RandomCluster void   )  [inline]
 

Initializes the parameters of the distribution randomly.

Definition at line 86 of file distribution.h.

void CLUS::Distribution::RandomDistribution int  NrClusters  )  [inline]
 

Random initialization of a distribution.

Reimplemented in CLUS::MultiDimNormal, CLUS::SimpleNormalDistribution, and CLUS::SkinyMultiDimNormal.

Definition at line 199 of file distribution.h.

void CLUS::Distribution::SaveToStream ostream &  out  )  [inline]
 

Saves the state of the Distribution in a stream.

Reimplemented in CLUS::MultiDimNormal, and CLUS::SkinyMultiDimNormal.

Definition at line 203 of file distribution.h.

bool CLUS::Distribution::SetOptionDbl char *  optName,
double  value
[inline]
 

Definition at line 184 of file distribution.h.

string CLUS::Distribution::TypeName void   )  [inline, static]
 

Reimplemented in CLUS::MultiDimNormal, CLUS::SimpleNormalDistribution, and CLUS::SkinyMultiDimNormal.

Definition at line 179 of file distribution.h.

double CLUS::Distribution::UpdateParameters void   )  [inline]
 

Computes the values of the new parameters from sufficient statistics.

Reimplemented in CLUS::MultiDimNormal, CLUS::SimpleNormalDistribution, and CLUS::SkinyMultiDimNormal.

Definition at line 174 of file distribution.h.

void CLUS::Distribution::UpdateStatistics double  prob  )  [inline]
 

Updates the sufficient statistics.

Definition at line 170 of file distribution.h.


Field Documentation

const double* CLUS::Distribution::dataCache [protected]
 

Used for optimization purpses. Is the last parameter passed to Infer or Learn.

Definition at line 59 of file distribution.h.

Referenced by CLUS::MultiDimNormal::AdjustYwithYoverD(), Distribution(), CLUS::MultiDimNormal::InferProbability(), CLUS::SimpleNormalDistribution::LearnProbability(), CLUS::MultiDimNormal::LearnProbability(), CLUS::SimpleNormalDistribution::NormalizeLearnProbability(), and CLUS::MultiDimNormal::NormalizeLearnProbability().

int CLUS::Distribution::inDim [protected]
 

The dimentionality of the input space.

Definition at line 55 of file distribution.h.

Referenced by CLUS::MultiDimNormal::AdjustYwithYoverD(), CLUS::MultiDimNormal::ComputeAlphas(), CLUS::MultiDimNormal::ComputeCCoef(), CLUS::MultiDimNormal::DenormalizeParameters(), Distribution(), CLUS::MultiDimNormal::InferProbability(), CLUS::MultiDimNormal::LearnProbability(), CLUS::MultiDimNormal::LoadFromStream(), CLUS::MultiDimNormal::NormalizeData(), NormalizeData(), CLUS::MultiDimNormal::RandomDistribution(), CLUS::MultiDimNormal::SaveToStream(), CLUS::SimpleNormalDistribution::UpdateParameters(), CLUS::MultiDimNormal::UpdateParameters(), and CLUS::MultiDimNormal::UpdateStatistics().

double CLUS::Distribution::probabilityInfer [protected]
 

Cached values for the last probabilities of belonging to the cluster.

Definition at line 62 of file distribution.h.

Referenced by CLUS::MultiDimNormal::AdjustYwithYoverD(), Distribution(), CLUS::SkinyMultiDimNormal::InferProbability(), CLUS::MultiDimNormal::InferProbability(), LastInferProbability(), and NormalizeInferProbability().

double CLUS::Distribution::probabilityLearn [protected]
 

Cached values for the last probabilities of belonging to the cluster.

Definition at line 62 of file distribution.h.

Referenced by Distribution(), LastLearnProbability(), LastProbability(), CLUS::SkinyMultiDimNormal::LearnProbability(), CLUS::SimpleNormalDistribution::LearnProbability(), CLUS::MultiDimNormal::LearnProbability(), and NormalizeLearnProbability().

double CLUS::Distribution::weight [protected]
 

The weight in the sum of distributions.

Definition at line 65 of file distribution.h.

Referenced by CLUS::MultiDimNormal::ComputeAlphas(), CLUS::MultiDimNormal::ComputeCCoef(), Distribution(), HasZeroWeight(), CLUS::MultiDimNormal::InferProbability(), CLUS::SimpleNormalDistribution::LearnProbability(), CLUS::MultiDimNormal::LearnProbability(), CLUS::MultiDimNormal::LoadFromStream(), CLUS::MultiDimNormal::MultiDimNormal(), CLUS::SimpleNormalDistribution::RandomDistribution(), CLUS::MultiDimNormal::RandomDistribution(), CLUS::MultiDimNormal::SaveToStream(), SetOptionDbl(), CLUS::SimpleNormalDistribution::UpdateANOVAElements(), CLUS::SimpleNormalDistribution::UpdateParameters(), and CLUS::MultiDimNormal::UpdateParameters().


The documentation for this class was generated from the following file:
Generated on Mon Jul 21 16:57:48 2003 for SECRET by doxygen 1.3.2