24 #ifndef __LOGIT_BOOST_MODEL_H__
25 #define __LOGIT_BOOST_MODEL_H__
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/homogen_numeric_table.h"
29 #include "algorithms/boosting/boosting_model.h"
30 #include "algorithms/classifier/classifier_model.h"
31 #include "algorithms/regression/regression_model.h"
32 #include "algorithms/regression/regression_training_batch.h"
33 #include "algorithms/regression/regression_predict.h"
61 struct DAAL_EXPORT Parameter :
public boosting::Parameter
64 DAAL_DEPRECATED Parameter();
76 DAAL_DEPRECATED Parameter(
const services::SharedPtr<weak_learner::training::Batch>& wlTrainForParameter,
77 const services::SharedPtr<weak_learner::prediction::Batch>& wlPredictForParameter,
78 double acc = 0.0,
size_t maxIter = 10,
size_t nC = 0,
double wThr = 1e-10,
double zThr = 1e-10);
80 double accuracyThreshold;
83 double weightsDegenerateCasesThreshold;
84 double responsesDegenerateCasesThreshold;
86 DAAL_DEPRECATED services::Status check() const DAAL_C11_OVERRIDE;
98 class DAAL_EXPORT Model : public boosting::Model
101 DECLARE_MODEL(Model, classifier::Model)
111 template <
typename modelFPType>
112 DAAL_EXPORT DAAL_DEPRECATED Model(
size_t nFeatures,
const Parameter *par, modelFPType dummy);
118 DAAL_DEPRECATED Model() : boosting::Model(), _nIterations(0) { }
126 DAAL_DEPRECATED
static services::SharedPtr<Model> create(
size_t nFeatures,
const Parameter *par,
127 services::Status *stat = NULL);
129 DAAL_DEPRECATED_VIRTUAL
virtual ~Model() { }
135 DAAL_DEPRECATED
void setIterations(
size_t nIterations);
141 DAAL_DEPRECATED
size_t getIterations()
const;
146 template<
typename Archive,
bool onDeserialize>
147 services::Status serialImpl(Archive *arch)
149 services::Status st = boosting::Model::serialImpl<Archive, onDeserialize>(arch);
152 arch->set(_nIterations);
157 Model(
size_t nFeatures,
const Parameter *par, services::Status &st);
159 typedef services::SharedPtr<Model> ModelPtr;
179 struct DAAL_EXPORT Parameter :
public classifier::Parameter
194 Parameter(
const services::SharedPtr<regression::training::Batch>& wlTrainForParameter,
195 const services::SharedPtr<regression::prediction::Batch>& wlPredictForParameter,
196 double acc = 0.0,
size_t maxIter = 10,
size_t nC = 0,
double wThr = 1e-10,
double zThr = 1e-10);
198 services::SharedPtr<regression::training::Batch> weakLearnerTraining;
199 services::SharedPtr<regression::prediction::Batch> weakLearnerPrediction;
200 double accuracyThreshold;
201 size_t maxIterations;
202 double weightsDegenerateCasesThreshold;
203 double responsesDegenerateCasesThreshold;
204 services::Status check() const DAAL_C11_OVERRIDE;
216 class DAAL_EXPORT Model : public classifier::Model
219 DECLARE_MODEL(Model, classifier::Model)
229 template <
typename modelFPType>
230 DAAL_EXPORT Model(
size_t nFeatures,
const Parameter *par, modelFPType dummy);
236 Model(
size_t nFeatures = 0) : _models(new data_management::DataCollection()), _nFeatures(nFeatures), _nIterations(0) { }
244 static services::SharedPtr<Model> create(
size_t nFeatures,
const Parameter *par,
245 services::Status *stat = NULL);
253 size_t getNumberOfWeakLearners()
const;
260 regression::ModelPtr getWeakLearnerModel(
size_t idx)
const;
266 void addWeakLearnerModel(regression::ModelPtr model);
271 void clearWeakLearnerModels();
277 size_t getNumberOfFeatures() const DAAL_C11_OVERRIDE {
return _nFeatures; }
283 void setIterations(
size_t nIterations);
289 size_t getIterations()
const;
293 data_management::DataCollectionPtr _models;
296 template<
typename Archive,
bool onDeserialize>
297 services::Status serialImpl(Archive *arch)
300 DAAL_CHECK_STATUS(st, (classifier::Model::serialImpl<Archive, onDeserialize>(arch)));
301 arch->set(_nFeatures);
302 arch->setSharedPtrObj(_models);
303 arch->set(_nIterations);
308 Model(
size_t nFeatures,
const Parameter *par, services::Status &st);
310 typedef services::SharedPtr<Model> ModelPtr;
313 using interface2::Parameter;
314 using interface2::Model;
315 using interface2::ModelPtr;
daal::algorithms::logitboost::interface1::Model::Model
DAAL_DEPRECATED Model()
Definition: logitboost_model.h:118
daal::algorithms::logitboost::interface1::Parameter::accuracyThreshold
double accuracyThreshold
Definition: logitboost_model.h:80
daal::algorithms::logitboost::interface2::Parameter::weightsDegenerateCasesThreshold
double weightsDegenerateCasesThreshold
Definition: logitboost_model.h:202
daal::algorithms::logitboost::interface2::Parameter::responsesDegenerateCasesThreshold
double responsesDegenerateCasesThreshold
Definition: logitboost_model.h:203
daal::algorithms::logitboost::interface2::Model::Model
Model(size_t nFeatures=0)
Definition: logitboost_model.h:236
daal::algorithms::elastic_net::training::model
Definition: elastic_net_training_types.h:109
daal::algorithms::logitboost::interface2::Model::getNumberOfFeatures
size_t getNumberOfFeatures() const DAAL_C11_OVERRIDE
Definition: logitboost_model.h:277
daal::algorithms::logitboost::interface1::Parameter::responsesDegenerateCasesThreshold
double responsesDegenerateCasesThreshold
Definition: logitboost_model.h:84
daal::algorithms::logitboost::interface2::Parameter::weakLearnerTraining
services::SharedPtr< regression::training::Batch > weakLearnerTraining
Definition: logitboost_model.h:198
daal::algorithms::logitboost::interface2::Parameter::maxIterations
size_t maxIterations
Definition: logitboost_model.h:201
daal::algorithms::logitboost::interface1::Parameter::nClasses
size_t nClasses
Definition: logitboost_model.h:82
daal::algorithms::logitboost::interface2::Parameter::weakLearnerPrediction
services::SharedPtr< regression::prediction::Batch > weakLearnerPrediction
Definition: logitboost_model.h:199
daal::algorithms::logitboost::interface1::Model
Model of the classifier trained by the logitboost::training::Batch algorithm.
Definition: logitboost_model.h:98
daal::algorithms::logitboost::interface1::Parameter
LogitBoost algorithm parameters.
Definition: logitboost_model.h:61
daal::algorithms::logitboost::interface2::Parameter::accuracyThreshold
double accuracyThreshold
Definition: logitboost_model.h:200
daal::algorithms::logitboost::interface1::Parameter::weightsDegenerateCasesThreshold
double weightsDegenerateCasesThreshold
Definition: logitboost_model.h:83
daal::algorithms::em_gmm::nIterations
Definition: em_gmm_types.h:99
daal::algorithms::logitboost::interface1::Parameter::maxIterations
size_t maxIterations
Definition: logitboost_model.h:81