58#ifdef STK_MIXTURE_DEBUG
62#ifdef STK_MIXTURE_DEBUG
66#ifdef STK_MIXTURE_VERBOSE
88#ifdef STK_MIXTURE_VERBOSE
90 <<
_T(
", init step failed\n");
97#ifdef STK_MIXTURE_VERY_VERBOSE
98 stk_cout <<
_T(
"In FullStrategy::run(), entering short run steps\n")
99 <<
_T(
"iTyry =") <<
iTry <<
_T(
"\n");
104#ifdef STK_MIXTURE_VERY_VERBOSE
112#ifdef STK_MIXTURE_VERBOSE
114 <<
_T(
", init step failed\n");
124#ifdef STK_MIXTURE_VERY_VERBOSE
127 <<
_T(
", get better value in short run. valueBest =") <<
valueBest <<
_T(
"\n");
136#ifdef STK_MIXTURE_VERY_VERBOSE
137 stk_cout <<
_T(
"In FullStrategy::run() all short run done") <<
_T(
", iTyry =") <<
iTry <<
_T(
" terminated.\n")
148#ifdef STK_MIXTURE_VERBOSE
149 stk_cout <<
_T(
"In FullStrategy::run(): Long Algo failed\n");
152#ifdef STK_MIXTURE_VERY_VERBOSE
153 stk_cout <<
_T(
"In FullStrategy::run() long run") <<
_T(
", iTyry =") <<
iTry <<
_T(
" terminated.\n")
163#ifdef STK_MIXTURE_VERBOSE
164 stk_cout <<
_T(
"In FullStrategy::run(), iTry =") <<
iTry <<
_T(
" failed\n");
180#ifdef STK_MIXTURE_VERBOSE
181 stk_cout <<
"FullStrategy::run() terminated. \n";
198#ifdef STK_MIXTURE_VERBOSE
200 stk_cout <<
_T(
"Entering FullStrategy::initStep\n");
216#ifdef STK_MIXTURE_VERBOSE
218 <<
_T(
", initialization failed:\n");
231#ifdef STK_MIXTURE_VERY_VERBOSE
233 <<
_T(
", get a better model with value =") <<
valueBest <<
_T(
"\n");
246#ifdef STK_MIXTURE_VERBOSE
247 stk_cout <<
_T(
"In FullStrategy::initStep() shortAlgo failed:\n");
261#ifdef STK_MIXTURE_DEBUG_CREATE
262 stk_cout <<
_T(
"FullStrategy::initStep terminated. Deleting p_initModel.\n");
265#ifdef STK_MIXTURE_DEBUG_CREATE
266 stk_cout <<
_T(
"FullStrategy::initStep p_initModel deleted.\n");
267 stk_cout <<
_T(
"p_bestModel->writeParameters\n");
271#ifdef STK_MIXTURE_VERBOSE
272 stk_cout <<
_T(
"FullStrategy::initStep done\n");
In this file we define the class implementing the full strategy class.
In this file we define the abstract base class for mixture models.
#define STKERROR_NO_ARG(Where, Error)
In this file we define mixture algorithms.
In this file we define the interface base class for initialization methods.
#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.
Sdk class for all library Exceptions.
virtual bool run()
run the strategy
FullStrategyParam * p_param_
bool initStep(IMixtureComposer *&p_bestModel)
Perform the Initialization step Initialize nbInitRun_ (should be > 0) model and select the best model...
void setModel(IMixtureComposer *p_model)
set model
Base class for Mixture (composed) model.
void setState(Clust::modelState state)
set the state of the model : should be used by any strategy
void randomFuzzyInit()
Initialize randomly the posterior probabilities tik of the model, then compute the zi values with map...
virtual IMixtureComposer * clone() const =0
clone pattern
virtual IMixtureComposer * create() const =0
create pattern
void setModel(IMixtureComposer *p_model)
set a new model
virtual void writeParameters(ostream &os) const
write the parameters of the model in the stream os.
int nbTry_
number of tries of each strategies (1 by default)
IMixtureInit * p_init_
initialization method
IMixtureComposer *& p_model_
reference on the main model
String msg_error_
String with the last error message.
virtual bool run()=0
run the computations.
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...
bool isFinite(Type const &x)
utility method allowing to know if a value is a finite value
@ modelInitialized_
the model is initialized and its parameters are initialized to default values
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.
Arithmetic properties of STK fundamental types.
IMixtureAlgo * p_longAlgo_
algorithm to use in long run
IMixtureAlgo * p_shortAlgo_
algorithm to use in short runs
int nbShortRun_
number of short run to perform
int nbInitRun_
number of initialization run to perform
virtual ~FullStrategyParam()
destructor