STK++ 0.9.13
|
Implementation of the EM algorithm. More...
#include <STK_MixtureAlgo.h>
Public Member Functions | |
EMAlgo () | |
default constructor | |
EMAlgo (EMAlgo const &algo) | |
Copy constructor. | |
virtual | ~EMAlgo () |
destructor | |
virtual EMAlgo * | clone () const |
clone pattern | |
virtual bool | run () |
run the algorithm on the model calling the eStep and mStep of the model until the maximal number of iteration is reached or the variation of the lnLikelihood is less than epsilon. | |
![]() | |
virtual | ~IMixtureAlgo () |
destructor | |
int | nbIterMax () const |
int | epsilon () const |
Real | threshold () const |
void | setModel (IMixtureComposer *p_model) |
set model | |
void | setNbIterMax (int nbIterMax) |
set maximal number of iterations | |
void | setEpsilon (Real epsilon) |
set tolerance value | |
void | setThreshold (Real threshold) |
set threshold value | |
![]() | |
String const & | error () const |
get the last error message. | |
Additional Inherited Members | |
![]() | |
IMixtureAlgo () | |
default constructor | |
IMixtureAlgo (IMixtureAlgo const &algo) | |
Copy constructor. | |
![]() | |
IRunnerBase () | |
default constructor | |
IRunnerBase (IRunnerBase const &runner) | |
copy constructor | |
virtual | ~IRunnerBase () |
destructor | |
virtual void | update () |
update the runner. | |
![]() | |
IMixtureComposer * | p_model_ |
pointer on the mixture model | |
int | nbIterMax_ |
number of iterations of the algorithm | |
Real | epsilon_ |
tolerance of the algorithm. | |
Real | threshold_ |
Minimal number of individuals. | |
![]() | |
String | msg_error_ |
String with the last error message. | |
bool | hasRun_ |
true if run has been used, false otherwise | |
Implementation of the EM algorithm.
The EM algorithm call alternatively the steps:
Definition at line 51 of file STK_MixtureAlgo.h.
|
inline |
default constructor
Definition at line 55 of file STK_MixtureAlgo.h.
Referenced by clone().
Copy constructor.
algo | the algorithm to copy |
Definition at line 58 of file STK_MixtureAlgo.h.
|
inlinevirtual |
|
virtual |
run the algorithm on the model calling the eStep and mStep of the model until the maximal number of iteration is reached or the variation of the lnLikelihood is less than epsilon.
true
if no error occur, false
otherwise Implements STK::IRunnerBase.
Definition at line 105 of file STK_MixtureAlgo.cpp.
References _T, STK::IMixtureAlgo::epsilon_, STK::IRunnerBase::error(), STK::IMixtureComposer::eStep(), STK::Clust::exceptionToString(), STK::IMixtureStatModel::imputationStep(), STK::IStatModelBase::lnLikelihood(), STK::IRunnerBase::msg_error_, STK::IMixtureAlgo::nbIterMax_, STK::IMixtureAlgo::p_model_, STK::IMixtureComposer::paramUpdateStep(), STK::IMixtureComposer::pStep(), run(), stk_cout, STKERROR_1ARG, and STK::IMixtureAlgo::threshold_.
Referenced by run().