|
STK++ 0.9.13
|
Base class for the diagonal Gaussian models. More...
#include <STK_HDGaussianBase.h>

Public Types | |
| typedef IMixtureDensity< Derived > | Base |
Public Types inherited from STK::IMixtureDensity< Derived > | |
| typedef hidden::MixtureTraits< Derived >::Array | Array |
| typedef hidden::MixtureTraits< Derived >::Parameters | Parameters |
| typedef hidden::Traits< Array >::Type | Type |
Public Member Functions | |
| Real const & | mean (int k, int j) const |
| int const & | d (int k) const |
| Real const & | b (int k) const |
| Real const & | q (int k) const |
| Real const & | a (int j, int k) const |
| void | initializeModelImpl () |
| Initialize the parameters of the model. | |
| template<class Weights > | |
| Real | impute (int i, int j, Weights const &pk) const |
| Real | rand (int i, int j, int k) const |
| template<class Array > | |
| void | getParameters (Array ¶ms) const |
| This function is used in order to get the current values of the means and standard deviations. | |
| void | writeParameters (CArrayXX const *p_tik, ostream &os) const |
| This function can be used to write summary of parameters to the output stream. | |
| int | nbCluster () const |
| Array const *const & | p_data () const |
Public Member Functions inherited from STK::IMixtureDensity< Derived > | |
| ~IMixtureDensity () | |
| destructor | |
| int | nbCluster () const |
| int | nbSample () const |
| Real | lnNbSample () const |
| Array const *const & | p_data () const |
| Parameters const & | param () const |
| void | setData (Array const &data) |
| Set the data set. | |
| void | setData (Array const &data, int nbRow, int nbCol, bool byRow=true) |
| Set the data set and give dimensions. | |
| bool | initializeStep () |
| This function will be called at the beginning of the estimation process once the model is created and data is set. | |
| void | setParametersStep () |
| set the parameters obtained with the intermediate results and release the intermediate results. | |
| void | finalizeStep () |
| This function will be called once the model is estimated. | |
| template<class Weights > | |
| Type | sample (int i, int j, Weights const &tk) const |
Public Member Functions inherited from STK::IRecursiveTemplate< Derived > | |
| Derived & | asDerived () |
| static cast : return a reference of this with a cast to the derived class. | |
| Derived const & | asDerived () const |
| static cast : return a const reference of this with a cast to the derived class. | |
| Derived * | asPtrDerived () |
static cast : return a ptr on a Derived of this with a cast to the derived class. | |
| Derived const * | asPtrDerived () const |
static cast : return a ptr on a constant Derived of this with a cast to the derived class. | |
| Derived * | clone () const |
| create a leaf using the copy constructor of the Derived class. | |
| Derived * | clone (bool isRef) const |
| create a leaf using the copy constructor of the Derived class and a flag determining if the clone is a reference or not. | |
Public Attributes | |
| Parameters | param_ |
| parameters of the derived mixture model. | |
Protected Member Functions | |
| HDGaussianBase (int nbCluster) | |
| default constructor | |
| HDGaussianBase (HDGaussianBase const &model) | |
| copy constructor | |
| ~HDGaussianBase () | |
| destructor | |
| void | randomMean (CArrayXX const *p_tik) |
| sample randomly the mean of each component by sampling randomly a row of the data set. | |
| bool | updateMean (CArrayXX const *p_tik) |
| compute the weighted mean of a Gaussian mixture. | |
Protected Member Functions inherited from STK::IMixtureDensity< Derived > | |
| IMixtureDensity (int nbCluster) | |
| Default constructor. | |
| IMixtureDensity (IMixtureDensity const &model) | |
| copy constructor. | |
| void | initializeModel () |
| Initialize the model before its first use. | |
| bool | initializeStepImpl () |
| default implementation of initializeStepImpl (do nothing and return true) | |
| void | finalizeStepImpl () |
| default implementation of finalizeStepImpl (do nothing) | |
| void | setNbSample (int nbSample) |
| Set the number of sample of the model (needed by kernel models) | |
Protected Member Functions inherited from STK::IRecursiveTemplate< Derived > | |
| IRecursiveTemplate () | |
| constructor. | |
| ~IRecursiveTemplate () | |
| destructor. | |
Additional Inherited Members | |
Protected Attributes inherited from STK::IMixtureDensity< Derived > | |
| Parameters | param_ |
| parameters of the derived mixture model. | |
Base class for the diagonal Gaussian models.
Definition at line 55 of file STK_HDGaussianBase.h.
| typedef IMixtureDensity<Derived > STK::HDGaussianBase< Derived >::Base |
Definition at line 58 of file STK_HDGaussianBase.h.
|
inlineprotected |
default constructor
| nbCluster | number of cluster in the model |
Definition at line 67 of file STK_HDGaussianBase.h.
|
inlineprotected |
copy constructor
| model | The model to copy |
Definition at line 71 of file STK_HDGaussianBase.h.
|
inlineprotected |
|
inline |
Definition at line 85 of file STK_HDGaussianBase.h.
References STK::HDGaussianBase< Derived >::param_.
|
inline |
Definition at line 81 of file STK_HDGaussianBase.h.
References STK::HDGaussianBase< Derived >::param_.
|
inline |
Definition at line 79 of file STK_HDGaussianBase.h.
References STK::HDGaussianBase< Derived >::param_.
| void STK::HDGaussianBase< Derived >::getParameters | ( | Array & | params | ) | const |
This function is used in order to get the current values of the means and standard deviations.
| [out] | params | the array with the parameters of the mixture. |
Definition at line 169 of file STK_HDGaussianBase.h.
References STK::baseIdx, and STK::mean().
| Real STK::HDGaussianBase< Derived >::impute | ( | int | i, |
| int | j, | ||
| Weights const & | pk | ||
| ) | const |
| i,j | indexes of the data to impute |
| pk | the probabilities of each class for the ith individual |
Definition at line 123 of file STK_HDGaussianBase.h.
References STK::mean(), and STK::sum().
|
inline |
Initialize the parameters of the model.
Definition at line 88 of file STK_HDGaussianBase.h.
References STK::HDGaussianBase< Derived >::p_data(), and STK::HDGaussianBase< Derived >::param_.
|
inline |
Definition at line 77 of file STK_HDGaussianBase.h.
References STK::HDGaussianBase< Derived >::param_.
Referenced by STK::HDGaussianBase< Derived >::rand().
|
inline |
Definition at line 124 of file STK_IMixtureDensity.h.
|
inline |
Definition at line 131 of file STK_IMixtureDensity.h.
Referenced by STK::HDGaussianBase< Derived >::initializeModelImpl().
|
inline |
Definition at line 83 of file STK_HDGaussianBase.h.
References STK::HDGaussianBase< Derived >::param_.
|
inline |
| i,j,k | indexes of the data to simulate |
Definition at line 98 of file STK_HDGaussianBase.h.
References STK::HDGaussianBase< Derived >::mean(), and STK::Law::Normal::rand().
|
protected |
sample randomly the mean of each component by sampling randomly a row of the data set.
Definition at line 132 of file STK_HDGaussianBase.h.
References STK::Law::UniformDiscrete::rand().
|
protected |
compute the weighted mean of a Gaussian mixture.
Definition at line 153 of file STK_HDGaussianBase.h.
References STK::ICArray< Derived >::col().
| void STK::HDGaussianBase< Derived >::writeParameters | ( | CArrayXX const * | p_tik, |
| ostream & | os | ||
| ) | const |
This function can be used to write summary of parameters to the output stream.
| p_tik | a constant pointer on the posterior probabilities |
| os | Stream where you want to write the summary of parameters. |
Definition at line 189 of file STK_HDGaussianBase.h.
References _T, and STK::mean().
| Parameters STK::IMixtureDensity< Derived >::param_ |
parameters of the derived mixture model.
Should be an instance of the STK::ModelParameters struct.
Definition at line 180 of file STK_IMixtureDensity.h.
Referenced by STK::HDGaussianBase< Derived >::a(), STK::HDGaussianBase< Derived >::b(), STK::HDGaussianBase< Derived >::d(), STK::HDGaussianBase< Derived >::initializeModelImpl(), STK::HDGaussianBase< Derived >::mean(), and STK::HDGaussianBase< Derived >::q().