|
STK++ 0.9.13
|
The diagonal Gaussian mixture model DiagGaussian_sj have a density function of the form. More...
#include <STK_DiagGaussian_sj.h>

Public Types | |
| typedef DiagGaussianBase< DiagGaussian_sj< Array > > | Base |
Public Types inherited from STK::DiagGaussianBase< DiagGaussian_sj< Array > > | |
| typedef IMixtureDensity< DiagGaussian_sj< Array > > | 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 | |
| DiagGaussian_sj (int nbCluster) | |
| default constructor | |
| DiagGaussian_sj (DiagGaussian_sj const &model) | |
| copy constructor | |
| ~DiagGaussian_sj () | |
| destructor | |
| void | randomInit (CArrayXX const *const &p_tik, CPointX const *const &p_tk) |
| Initialize randomly the parameters of the Gaussian mixture. | |
| bool | run (CArrayXX const *const &p_tik, CPointX const *const &p_tk) |
| Compute the weighted mean and the common standard deviation. | |
| int | computeNbFreeParameters () const |
Public Member Functions inherited from STK::DiagGaussianBase< DiagGaussian_sj< Array > > | |
| Real const & | mean (int k, int j) const |
| Real const & | sigma (int k, int j) const |
| void | initializeModelImpl () |
| Initialize the parameters of the model. | |
| Real | lnComponentProbability (int i, int k) const |
| Real | impute (int i, int j, Weights const &pk) const |
| Real | rand (int i, int j, int k) const |
| 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 |
| int | nbSample () 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. | |
Additional Inherited Members | |
Public Attributes inherited from STK::DiagGaussianBase< DiagGaussian_sj< Array > > | |
| Parameters | param_ |
| parameters of the derived mixture model. | |
Protected Member Functions inherited from STK::DiagGaussianBase< DiagGaussian_sj< Array > > | |
| DiagGaussianBase (int nbCluster) | |
| default constructor | |
| DiagGaussianBase (DiagGaussianBase const &model) | |
| copy constructor | |
| ~DiagGaussianBase () | |
| 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. | |
Protected Attributes inherited from STK::IMixtureDensity< Derived > | |
| Parameters | param_ |
| parameters of the derived mixture model. | |
The diagonal Gaussian mixture model DiagGaussian_sj have a density function of the form.
![\[
f(\mathbf{x}|\theta) = \sum_{k=1}^K p_k \prod_{j=1}^d
\frac{1}{\sqrt{2\pi}\sigma_j} \exp\left\{-\frac{(x^j-\mu^j_k)^2}{2\sigma_j^2}\right\}.
\]](form_150.png)
Definition at line 69 of file STK_DiagGaussian_sj.h.
| typedef DiagGaussianBase<DiagGaussian_sj<Array> > STK::DiagGaussian_sj< Array >::Base |
Definition at line 72 of file STK_DiagGaussian_sj.h.
|
inline |
default constructor
| nbCluster | number of cluster in the model |
Definition at line 79 of file STK_DiagGaussian_sj.h.
|
inline |
copy constructor
| model | The model to copy |
Definition at line 83 of file STK_DiagGaussian_sj.h.
|
inline |
|
inline |
Definition at line 96 of file STK_DiagGaussian_sj.h.
References STK::DiagGaussianBase< DiagGaussian_sj< Array > >::nbCluster(), and STK::DiagGaussianBase< DiagGaussian_sj< Array > >::p_data().
| void STK::DiagGaussian_sj< Array >::randomInit | ( | CArrayXX const *const & | p_tik, |
| CPointX const *const & | p_tk | ||
| ) |
Initialize randomly the parameters of the Gaussian mixture.
The centers will be selected randomly among the data set and the standard-deviation will be set to 1.
Definition at line 105 of file STK_DiagGaussian_sj.h.
References _T, STK::ICArray< Derived >::col(), and stk_cout.
| bool STK::DiagGaussian_sj< Array >::run | ( | CArrayXX const *const & | p_tik, |
| CPointX const *const & | p_tk | ||
| ) |
Compute the weighted mean and the common standard deviation.
Definition at line 127 of file STK_DiagGaussian_sj.h.
References STK::ICArray< Derived >::col().