46#ifdef STK_MIXTURE_VERY_VERBOSE
47 stk_cout <<
_T(
"Entering CEMAlgo::run() with:\n")
60#ifdef STK_MIXTURE_VERBOSE
72#ifdef STK_MIXTURE_VERBOSE
80#ifdef STK_MIXTURE_VERY_VERBOSE
81 stk_cout <<
_T(
"Terminating CEMAlgo::run() with:\n")
82 <<
_T(
"iter = ") << iter <<
_T(
"\n")
89#ifdef STK_MIXTURE_VERBOSE
90 stk_cout <<
_T(
"In EMAlgo::run() iteration ") << iter <<
_T(
"terminated.\n")
97#ifdef STK_MIXTURE_VERBOSE
107#ifdef STK_MIXTURE_VERY_VERBOSE
108 stk_cout <<
_T(
"----------------------------\n");
109 stk_cout <<
_T(
"Entering EMAlgo::run() with:\n")
127#ifdef STK_MIXTURE_VERBOSE
136#ifdef STK_MIXTURE_VERY_VERBOSE
137 stk_cout <<
_T(
"Terminating EMAlgo::run() with:\n")
138 <<
_T(
"iter = ") << iter <<
_T(
"\n")
145#ifdef STK_MIXTURE_VERBOSE
146 stk_cout <<
_T(
"In EMAlgo::run() iteration ") << iter <<
_T(
"terminated.\n")
153#ifdef STK_MIXTURE_VERBOSE
163#ifdef STK_MIXTURE_VERY_VERBOSE
164 stk_cout <<
_T(
"-----------------------------\n");
165 stk_cout <<
_T(
"Entering SEMAlgo::run() with:\n")
179#ifdef STK_MIXTURE_VERBOSE
192#ifdef STK_MIXTURE_VERBOSE
200#ifdef STK_MIXTURE_VERBOSE
201 stk_cout <<
_T(
"In SEMAlgo::run() iterations terminated.\n")
208#ifdef STK_MIXTURE_VERBOSE
217#ifdef STK_MIXTURE_VERY_VERBOSE
218 stk_cout <<
_T(
"\nIn SEMAlgo::run(), setParameters done.\n")
224#ifdef STK_MIXTURE_VERY_VERBOSE
225 stk_cout <<
_T(
"Terminating SEMAlgo::run()\n");
226 stk_cout <<
_T(
"--------------------------\n");
233#ifdef STK_MIXTURE_VERY_VERBOSE
234 stk_cout <<
_T(
"---------------------------------\n");
235 stk_cout <<
_T(
"Entering SemiSEMAlgo::run() with:\n")
252#ifdef STK_MIXTURE_VERBOSE
260#ifdef STK_MIXTURE_VERBOSE
261 stk_cout <<
_T(
"In SemiSEMAlgo::run() iteration ") << iter <<
_T(
"terminated.\n")
268#ifdef STK_MIXTURE_VERBOSE
277#ifdef STK_MIXTURE_VERY_VERBOSE
278 stk_cout <<
_T(
"\nIn SemiSEMAlgo::run(), setParameters done.\n")
284#ifdef STK_MIXTURE_VERY_VERBOSE
285 stk_cout <<
_T(
"Terminating SemiSEMAlgo::run()\n");
286 stk_cout <<
_T(
"------------------------------\n");
In this file we define the abstract base class for mixture models.
#define STKERROR_NO_ARG(Where, Error)
#define STKERROR_1ARG(Where, Arg, Error)
In this file we define mixture algorithms.
#define stk_cout
Standard stk output stream.
#define _T(x)
Let x unmodified.
This file include all the other header files of the project Sdk.
virtual bool run()
run the algorithm on the model calling cStep, mStep and eStep of the model until the maximal number o...
virtual bool run()
run the algorithm on the model calling the eStep and mStep of the model until the maximal number of i...
int nbIterMax_
number of iterations of the algorithm
IMixtureComposer * p_model_
pointer on the mixture model
Real epsilon_
tolerance of the algorithm.
Real threshold_
Minimal number of individuals.
virtual int cStep()
Replace tik by zik.
virtual void pStep()
Compute proportions using the ML estimates, default implementation.
virtual Real eStep()
compute the zi, the lnLikelihood of the current estimates and the next value of the tik.
virtual int sStep()
Simulate zi accordingly to tik and replace tik by zik by calling cStep().
virtual void paramUpdateStep()=0
Compute the proportions and the model parameters given the current tik mixture parameters.
virtual void imputationStep()
Impute the missing values.
virtual void setParametersStep()
Utility method allowing to signal to a mixture to set its parameters.
virtual void releaseIntermediateResults()
This step can be used to signal to the mixtures that they must release the stored results.
virtual void storeIntermediateResults(int iteration)
This step can be used to signal to the mixtures that they must store results.
virtual void samplingStep()
Simulation of all the latent variables and/or missing data excluding class labels.
String msg_error_
String with the last error message.
String const & error() const
get the last error message.
Real lnLikelihood() const
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
virtual bool run()
run the algorithm on the model calling sStep, mStep and eStep of the model until the maximal number o...
virtual bool run()
run the algorithm on the model calling sStep, mStep and eStep of the model until the maximal number o...
String exceptionToString(exceptions const &type)
convert a Clust::exceptions to a String.
exceptions
Specific exceptions allowing to handle the erroros that can occur in the estimation process.
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.