24 #ifndef __BOOSTING_MODEL_H__
25 #define __BOOSTING_MODEL_H__
27 #include "algorithms/weak_learner/weak_learner_model.h"
28 #include "algorithms/weak_learner/weak_learner_training_batch.h"
29 #include "algorithms/weak_learner/weak_learner_predict.h"
30 #include "algorithms/stump/stump_training_batch.h"
31 #include "algorithms/stump/stump_predict.h"
32 #include "algorithms/classifier/classifier_model.h"
60 struct DAAL_EXPORT Parameter :
public classifier::interface1::Parameter
70 Parameter(
const services::SharedPtr<weak_learner::training::Batch>& wlTrainForParameter,
71 const services::SharedPtr<weak_learner::prediction::Batch>& wlPredictForParameter);
74 Parameter(
const Parameter& other) : weakLearnerTraining(other.weakLearnerTraining),
75 weakLearnerPrediction(other.weakLearnerPrediction){}
78 services::SharedPtr<weak_learner::training::Batch> weakLearnerTraining;
81 services::SharedPtr<weak_learner::prediction::Batch> weakLearnerPrediction;
83 services::Status check() const DAAL_C11_OVERRIDE;
97 class DAAL_EXPORT Model : public classifier::Model
105 Model(
size_t nFeatures = 0) : _models(new data_management::DataCollection()), _nFeatures(nFeatures) {}
113 size_t getNumberOfWeakLearners()
const;
120 weak_learner::ModelPtr getWeakLearnerModel(
size_t idx)
const;
126 void addWeakLearnerModel(weak_learner::ModelPtr model);
128 void clearWeakLearnerModels();
134 size_t getNumberOfFeatures() const DAAL_C11_OVERRIDE {
return _nFeatures; }
138 data_management::DataCollectionPtr _models;
140 template<
typename Archive,
bool onDeserialize>
141 services::Status serialImpl(Archive *arch)
143 classifier::Model::serialImpl<Archive, onDeserialize>(arch);
144 arch->set(_nFeatures);
145 arch->setSharedPtrObj(_models);
147 return services::Status();
150 Model(
size_t nFeatures, services::Status &st);
152 typedef services::SharedPtr<Model> ModelPtr;
155 using interface1::Parameter;
156 using interface1::Model;
157 using interface1::ModelPtr;
162 #endif // __BOOSTING_MODEL_H__
daal::algorithms::boosting::interface1::Parameter::weakLearnerPrediction
services::SharedPtr< weak_learner::prediction::Batch > weakLearnerPrediction
Definition: boosting_model.h:81
daal::algorithms::boosting::interface1::Model::getNumberOfFeatures
size_t getNumberOfFeatures() const DAAL_C11_OVERRIDE
Definition: boosting_model.h:134
daal::algorithms::boosting::interface1::Model
Base class for boosting algorithm models. Contains a collection of weak learner models constructed du...
Definition: boosting_model.h:97
daal::algorithms::boosting::interface1::Parameter::Parameter
Parameter(const Parameter &other)
Definition: boosting_model.h:74
daal::algorithms::elastic_net::training::model
Definition: elastic_net_training_types.h:109
daal::algorithms::boosting::interface1::Model::Model
Model(size_t nFeatures=0)
Definition: boosting_model.h:105
daal::algorithms::classifier::interface1::Parameter
Base class for the parameters of the classification algorithm.
Definition: classifier_model.h:69
daal::algorithms::boosting::interface1::Parameter::weakLearnerTraining
services::SharedPtr< weak_learner::training::Batch > weakLearnerTraining
Definition: boosting_model.h:78
daal::algorithms::boosting::interface1::Parameter
Base class for parameters of the boosting algorithm
Definition: boosting_model.h:60