STK++ 0.9.13
STK_MixtureStrategy.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------*/
2/* Copyright (C) 2004-2016 Serge Iovleff
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this program; if not, write to the
16 Free Software Foundation, Inc.,
17 59 Temple Place,
18 Suite 330,
19 Boston, MA 02111-1307
20 USA
21
22 Contact : S..._DOT_I..._AT_stkpp.org (see copyright for ...)
23*/
24
25/*
26 * Project: stkpp::Clustering
27 * created on: 3 sept. 2013
28 * Author: iovleff, serge.iovleff@stkpp.org
29 * Originally created by Parmeet Bhatia <b..._DOT_p..._AT_gmail_Dot_com>
30 **/
31
38#ifndef STK_MIXTURESTRATEGY_H
39#define STK_MIXTURESTRATEGY_H
40
42
43namespace STK
44{
45// forward declaration
46class IMixtureAlgo;
47
60
65{
66 public:
77
79 inline virtual ~SimpleStrategy() { if (p_param_) delete p_param_;}
81 inline virtual SimpleStrategy* clone() const { return new SimpleStrategy(*this);}
85
87 virtual bool run();
88
89 protected:
91};
92
109
119{
120 public:
132 inline virtual ~XemStrategy() { if (p_param_) delete p_param_;}
134 inline virtual XemStrategy* clone() const { return new XemStrategy(*this);}
139
141 virtual bool run();
142
143 protected:
145};
146
151{
157 int nbInitRun_;
159 int nbShortRun_;
164};
165
175class FullStrategy: public IMixtureStrategy
176{
177 public:
189 inline virtual ~FullStrategy() { if (p_param_) delete p_param_;}
191 inline virtual FullStrategy* clone() const { return new FullStrategy(*this);}
196
198 virtual bool run();
199
200 protected:
207};
208
209} // namespace STK
210
211#endif /* STK_MIXTURESTRATEGY_H */
In this file we define the interface base class for strategies to use in order to estimate a mixture ...
A FullStrategy is based on the following paradigm:
virtual FullStrategy * clone() const
clone pattern
FullStrategy(IMixtureComposer *&p_model)
default constructor.
FullStrategyParam * p_param_
void setParam(FullStrategyParam *p_param)
set the parameters of the strategy
bool initStep(IMixtureComposer *&p_bestModel)
Perform the Initialization step Initialize nbInitRun_ (should be > 0) model and select the best model...
virtual ~FullStrategy()
destructor
virtual bool run()
run the strategy
FullStrategy(FullStrategy const &strategy)
copy constructor.
Interface base class for the algorithms.
Base class for Mixture (composed) model.
Interface base class for all the strategies.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
A SimpleStrategy is just nbTry long run.
virtual bool run()
run the strategy
virtual ~SimpleStrategy()
destructor
SimpleStrategyParam * p_param_
virtual SimpleStrategy * clone() const
clone pattern
SimpleStrategy(IMixtureComposer *&p_model)
default constructor.
SimpleStrategy(SimpleStrategy const &strategy)
copy constructor.
void setParam(SimpleStrategyParam *p_param)
set the parameters of the strategy
A XemStrategy is based on the following paradigm:
XemStrategy(IMixtureComposer *&p_model)
default constructor.
XemStrategy(XemStrategy const &strategy)
copy constructor.
void setParam(XemStrategyParam *p_param)
set the parameters of the strategy
virtual ~XemStrategy()
destructor
virtual bool run()
run the strategy
XemStrategyParam * p_param_
virtual XemStrategy * clone() const
clone pattern
The namespace STK is the main domain space of the Statistical ToolKit project.
helper structure encapsulating the parameters of the Full strategy
virtual ~FullStrategyParam()
destructor
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
helper structure encapsulating the parameters of the simple strategy
IMixtureAlgo * p_algo_
number of iterations in the Initialization
virtual ~SimpleStrategyParam()
destructor
helper structure encapsulating the parameters of the Xem strategy
virtual ~XemStrategyParam()
destructor
IMixtureAlgo * p_shortAlgo_
algorithm to use in short runs
IMixtureAlgo * p_longAlgo_
algorithm to use in long run
int nbShortRun_
number of short run to perform