STK++ 0.9.13
|
facade design pattern. More...
#include <STK_MixtureFacade.h>
Public Member Functions | |
LearnFacade (IMixtureLearner *p_model) | |
constructor. | |
virtual | ~LearnFacade () |
destructor. | |
void | setModel (IMixtureLearner *p_model) |
set model in case we want to use the strategy again | |
void | createImputeAlgo (Clust::algoLearnType algo, int nbIter, Real epsilon) |
create an imputation algorithm | |
void | createSimulAlgo (Clust::algoLearnType algo, int nblongIter) |
create a simulation algorithm | |
virtual bool | run () |
run algorithm | |
![]() | |
String const & | error () const |
get the last error message. | |
Protected Attributes | |
IMixtureLearner * | p_model_ |
the mixture model to learn | |
IMixtureAlgoLearn * | p_algo_ |
the algorithm to use for learning | |
![]() | |
String | msg_error_ |
String with the last error message. | |
bool | hasRun_ |
true if run has been used, false otherwise | |
Additional Inherited Members | |
![]() | |
IRunnerBase () | |
default constructor | |
IRunnerBase (IRunnerBase const &runner) | |
copy constructor | |
virtual | ~IRunnerBase () |
destructor | |
virtual void | update () |
update the runner. | |
facade design pattern.
LearnFacade allows to create the algorithms for learning a mixture model with less effort
Definition at line 95 of file STK_MixtureFacade.h.
|
inline |
constructor.
p_model | a reference on the current model |
Definition at line 101 of file STK_MixtureFacade.h.
|
virtual |
void STK::LearnFacade::createImputeAlgo | ( | Clust::algoLearnType | algo, |
int | nbIter, | ||
Real | epsilon | ||
) |
create an imputation algorithm
Definition at line 105 of file STK_MixtureFacade.cpp.
References STK::Clust::createLearnAlgo(), p_algo_, p_model_, and STK::IMixtureAlgoLearn::setModel().
void STK::LearnFacade::createSimulAlgo | ( | Clust::algoLearnType | algo, |
int | nblongIter | ||
) |
create a simulation algorithm
Definition at line 112 of file STK_MixtureFacade.cpp.
References STK::Clust::createLearnAlgo(), p_algo_, p_model_, and STK::IMixtureAlgoLearn::setModel().
|
virtual |
run algorithm
Implements STK::IRunnerBase.
Definition at line 118 of file STK_MixtureFacade.cpp.
References _T, STK::IRunnerBase::error(), STK::IMixtureStatModel::finalizeStep(), STK::IMixtureStatModel::initializeStep(), STK::IStatModelBase::lnLikelihood(), STK::IRunnerBase::msg_error_, p_algo_, p_model_, STK::StrategyFacade::run(), STK::IRunnerBase::run(), stk_cout, and STKERROR_NO_ARG.
|
inline |
set model in case we want to use the strategy again
p_model | the model to set |
Definition at line 109 of file STK_MixtureFacade.h.
References p_model_.
|
protected |
the algorithm to use for learning
Definition at line 121 of file STK_MixtureFacade.h.
Referenced by createImputeAlgo(), createSimulAlgo(), run(), and ~LearnFacade().
|
protected |
the mixture model to learn
Definition at line 119 of file STK_MixtureFacade.h.
Referenced by createImputeAlgo(), createSimulAlgo(), run(), and setModel().