|
STK++ 0.9.13
|
specialization of the composer for the fixed proportion case. More...
#include <STK_MixtureComposer.h>

Public Member Functions | |
| MixtureComposerFixedProp (int nbSample, int nbCluster) | |
| Constructor. | |
| MixtureComposerFixedProp (MixtureComposer const &model) | |
| copy constructor. | |
| virtual | ~MixtureComposerFixedProp () |
| destructor | |
| virtual MixtureComposerFixedProp * | create () const |
| Create a composer, but reinitialize the mixtures parameters. | |
| virtual MixtureComposerFixedProp * | clone () const |
| Create a clone of the current model, with mixtures parameters preserved. | |
| virtual void | pStep () |
| overloading of the computePropotions() method. | |
Public Member Functions inherited from STK::MixtureComposer | |
| MixtureComposer (int nbSample, int nbCluster) | |
| Constructor. | |
| MixtureComposer (MixtureComposer const &composer) | |
| copy constructor. | |
| virtual | ~MixtureComposer () |
| The registered mixtures will be deleted there. | |
| virtual Real | lnComponentProbability (int i, int k) const |
| virtual void | writeParameters (ostream &os) const |
| write the parameters of the model in the stream os. | |
| virtual void | randomInit () |
| initialize randomly the parameters of the components of the model | |
| virtual void | paramUpdateStep () |
| Compute the proportions and the model parameters given the current tik mixture parameters. | |
| virtual void | imputationStep () |
| Impute the missing values. | |
| virtual void | samplingStep () |
| Simulation of all the latent variables and/or missing data excluding class labels. | |
| virtual void | storeIntermediateResults (int iteration) |
| This step can be used to signal to the mixtures that they must store results. | |
| virtual void | releaseIntermediateResults () |
| This step can be used to signal to the mixtures that they must release the stored results. | |
| virtual void | setParametersStep () |
| Utility method allowing to signal to a mixture to set its parameters. | |
| virtual void | finalizeStep () |
| This step can be used by developer to finalize any thing. | |
Public Member Functions inherited from STK::IMixtureComposer | |
| virtual | ~IMixtureComposer () |
| destructor | |
| Clust::modelState | state () const |
| void | setState (Clust::modelState state) |
| set the state of the model : should be used by any strategy | |
| virtual int | cStep () |
| Replace tik by zik. | |
| virtual int | sStep () |
| Simulate zi accordingly to tik and replace tik by zik by calling cStep(). | |
| virtual Real | eStep () |
| compute the zi, the lnLikelihood of the current estimates and the next value of the tik. | |
| virtual void | mapStep () |
| Compute zi using the Map estimate. | |
| virtual void | initializeStep () |
| Initialize the model before its first use. | |
| void | randomClassInit () |
| Initialize randomly the labels zi of the model. | |
| void | randomFuzzyInit () |
| Initialize randomly the posterior probabilities tik of the model, then compute the zi values with mapStep, compute the initial parameter values using paramUpdateStep, and compute the tik using eStep(). | |
Public Member Functions inherited from STK::IMixtureStatModel | |
| virtual | ~IMixtureStatModel () |
| destructor | |
| int | nbCluster () const |
| CPointX const & | pk () const |
| CArrayXX const & | tik () const |
| CPointX const & | tk () const |
| CVectorXi const & | zi () const |
| std::vector< IMixture * > const & | v_mixtures () const |
| Real | computeLnLikelihood (int i) const |
| Real | computeLikelihood (int i) const |
| Real | computeLnLikelihood () const |
| Real | computeICL () const |
| IMixture * | getMixture (String const &idData) const |
| Utility lookup function allowing to find a Mixture from its idData. | |
| void | registerMixture (IMixture *p_mixture) |
| register a mixture to the composer. | |
| void | releaseMixture (String const &idData) |
| release a mixture from the composer. | |
| int | computeNbFreeParameters () const |
| compute the number of free parameters of the model. | |
| int | computeNbMissingValues () const |
| compute the missing values of the model. | |
| template<class Array > | |
| void | setMixtureParameters (Array const &tik) |
| set the mixture parameters using an array of posterior probabilities. | |
| template<class Array , class RowVector > | |
| void | setMixtureParameters (Array const &tik, RowVector const &pk) |
| set the mixture parameters giving the posterior probabilities and the proportions. | |
| template<class RowVector > | |
| void | setProportions (RowVector const &pk) |
| Set proportions of each classes. | |
| template<class Manager , class Parameters > | |
| void | setParameters (IMixtureManager< Manager > const &manager, String const &idData, Parameters const ¶m) |
| Utility method allowing to set the parameters to a specific mixture. | |
| template<class Manager > | |
| void | createMixture (IMixtureManager< Manager > &manager) |
| Utility method allowing to create all the mixtures registered in the data handler of a mixture manager and to register them. | |
| template<class Manager > | |
| IMixture * | createMixture (IMixtureManager< Manager > &manager, String const &idData) |
| Utility method allowing to create a mixture with a given data set and register it. | |
| template<class Manager > | |
| void | removeMixture (IMixtureManager< Manager > &manager, String const &idData) |
| Utility method allowing to release completely a mixture with its data set. | |
| template<class Manager , class Parameters > | |
| void | getParameters (IMixtureManager< Manager > const &manager, String const &idData, Parameters ¶m) const |
| Utility method allowing to get the parameters of a specific mixture. | |
| template<class Manager , class MissingValues > | |
| void | getMissingValues (IMixtureManager< Manager > const &manager, String const &idData, MissingValues &missing) const |
| Utility method allowing to get the missing values of a specific mixture. | |
| template<class DataHandler > | |
| void | createMixture (IMixtureManager< DataHandler > &manager) |
Public Member Functions inherited from STK::IStatModelBase | |
| int | nbSample () const |
| Real | lnNbSample () const |
| int | nbVariable () const |
| Real | lnLikelihood () const |
| Real | likelihood () const |
| int | nbFreeParameter () const |
| Real | computeBIC () const |
| Real | computeAIC () const |
| Real | computeML () const |
Additional Inherited Members | |
Public Types inherited from STK::MixtureComposer | |
| typedef std::vector< IMixture * >::const_iterator | ConstMixtIterator |
| typedef std::vector< IMixture * >::iterator | MixtIterator |
Public Types inherited from STK::IMixtureStatModel | |
| typedef std::vector< IMixture * >::const_iterator | ConstMixtIterator |
| typedef std::vector< IMixture * >::iterator | MixtIterator |
Protected Member Functions inherited from STK::MixtureComposer | |
| void | createComposer (std::vector< IMixture * > const &v_mixtures_) |
| Create the composer using existing data handler and mixtures. | |
Protected Member Functions inherited from STK::IMixtureComposer | |
| IMixtureComposer (int nbSample, int nbCluster) | |
| Constructor. | |
| IMixtureComposer (IMixtureComposer const &model) | |
| copy constructor. | |
| void | sStep (int i) |
| Simulate zi accordingly to tik. | |
| void | cStep (int i) |
| Replace tik by zik. | |
| Real | eStep (int i) |
| compute one zi and the next value of the tik for i fixed | |
| void | mapStep (int i) |
| Compute zi using the Map estimate for i fixed. | |
| virtual void | initializeMixtureParameters () |
| Create the mixture model parameters pk_ and tik_. | |
| virtual int | randomTik () |
| generate random tik_ | |
| virtual int | randomZi () |
| generate random zi_ | |
Protected Member Functions inherited from STK::IMixtureStatModel | |
| IMixtureStatModel (int nbSample, int nbCluster) | |
| Constructor. | |
| IMixtureStatModel (IMixtureStatModel const &model) | |
| copy constructor. | |
| void | setNbCluster (int nbCluster) |
| set the number of cluster of the model | |
Protected Member Functions inherited from STK::IStatModelBase | |
| IStatModelBase () | |
| Default constructor. | |
| IStatModelBase (int nbSample) | |
| Constructor with specified dimension. | |
| IStatModelBase (int nbSample, int nbVariable) | |
| Constructor with specified dimension. | |
| IStatModelBase (IStatModelBase const &model) | |
| Copy constructor. | |
| ~IStatModelBase () | |
| destructor | |
| void | setNbFreeParameter (int const &nbFreeParameter) |
| set the number of free parameters of the model | |
| void | setNbSample (int const &nbSample) |
| set the number of samples of the model | |
| void | setNbVariable (int const &nbVariable) |
| set the number of variables of the model | |
| void | setLnLikelihood (Real const &lnLikelihood) |
| set the log-likelihood of the model | |
| void | initialize (int nbSample, int nbVariable) |
| set the dimensions of the parameters of the model | |
Protected Attributes inherited from STK::MixtureComposer | |
| Real | meanlnLikelihood_ |
| averaged lnLikelihood values. | |
Protected Attributes inherited from STK::IMixtureStatModel | |
| int | nbCluster_ |
| number of cluster. | |
| CPointX | pk_ |
| The proportions of each mixtures. | |
| CArrayXX | tik_ |
| The tik probabilities. | |
| CPointX | tk_ |
| The sum of the columns of tik_. | |
| CVectorXi | zi_ |
| The zi class label. | |
| std::vector< IMixture * > | v_mixtures_ |
| vector of pointers to the mixtures components | |
specialization of the composer for the fixed proportion case.
Definition at line 143 of file STK_MixtureComposer.h.
Constructor.
| nbCluster,nbSample | number of clusters and samples |
Definition at line 204 of file STK_MixtureComposer.cpp.
References STK::IStatModelBase::setNbFreeParameter().
| STK::MixtureComposerFixedProp::MixtureComposerFixedProp | ( | MixtureComposer const & | model | ) |
copy constructor.
| model | the model to copy |
Definition at line 211 of file STK_MixtureComposer.cpp.
|
inlinevirtual |
|
virtual |
Create a clone of the current model, with mixtures parameters preserved.
Reimplemented from STK::MixtureComposer.
Definition at line 223 of file STK_MixtureComposer.cpp.
|
virtual |
Create a composer, but reinitialize the mixtures parameters.
Reimplemented from STK::MixtureComposer.
Definition at line 215 of file STK_MixtureComposer.cpp.
References STK::MixtureComposer::createComposer(), STK::IMixtureStatModel::nbCluster(), STK::IStatModelBase::nbFreeParameter(), STK::IStatModelBase::nbSample(), STK::IStatModelBase::setNbFreeParameter(), and STK::IMixtureStatModel::v_mixtures_.
|
virtual |
overloading of the computePropotions() method.
Let them initialized to 1/K.
Reimplemented from STK::IMixtureComposer.
Definition at line 228 of file STK_MixtureComposer.cpp.