48 #ifndef __BOOSTING_MODEL_H__ 49 #define __BOOSTING_MODEL_H__ 51 #include "algorithms/weak_learner/weak_learner_model.h" 52 #include "algorithms/weak_learner/weak_learner_training_batch.h" 53 #include "algorithms/weak_learner/weak_learner_predict.h" 54 #include "algorithms/stump/stump_training_batch.h" 55 #include "algorithms/stump/stump_predict.h" 56 #include "algorithms/classifier/classifier_model.h" 84 struct DAAL_EXPORT Parameter :
public classifier::Parameter
94 Parameter(
const services::SharedPtr<weak_learner::training::Batch>& wlTrainForParameter,
95 const services::SharedPtr<weak_learner::prediction::Batch>& wlPredictForParameter);
98 Parameter(
const Parameter& other) :weakLearnerTraining(other.weakLearnerTraining),
99 weakLearnerPrediction(other.weakLearnerPrediction){}
102 services::SharedPtr<weak_learner::training::Batch> weakLearnerTraining;
105 services::SharedPtr<weak_learner::prediction::Batch> weakLearnerPrediction;
107 services::Status check() const DAAL_C11_OVERRIDE;
121 class DAAL_EXPORT Model : public classifier::Model
129 Model(
size_t nFeatures = 0) : _models(new data_management::DataCollection()), _nFeatures(nFeatures) {}
137 size_t getNumberOfWeakLearners()
const;
144 weak_learner::ModelPtr getWeakLearnerModel(
size_t idx)
const;
150 void addWeakLearnerModel(weak_learner::ModelPtr model);
152 void clearWeakLearnerModels();
158 size_t getNumberOfFeatures() const DAAL_C11_OVERRIDE {
return _nFeatures; }
162 data_management::DataCollectionPtr _models;
164 template<
typename Archive,
bool onDeserialize>
165 services::Status serialImpl(Archive *arch)
167 classifier::Model::serialImpl<Archive, onDeserialize>(arch);
168 arch->set(_nFeatures);
169 arch->setSharedPtrObj(_models);
171 return services::Status();
174 Model(
size_t nFeatures, services::Status &st);
176 typedef services::SharedPtr<Model> ModelPtr;
179 using interface1::Parameter;
180 using interface1::Model;
181 using interface1::ModelPtr;
186 #endif // __BOOSTING_MODEL_H__ daal::services::interface1::Status
Class that holds the results of API calls. In case of API routine failure it contains the list of err...
Definition: error_handling.h:491
daal
Definition: algorithm_base_common.h:57
daal::algorithms::classifier::interface1::Parameter
Base class for the parameters of the classification algorithm.
Definition: classifier_model.h:81
daal::algorithms::boosting::interface1::Parameter::weakLearnerPrediction
services::SharedPtr< weak_learner::prediction::Batch > weakLearnerPrediction
Definition: boosting_model.h:105
daal::algorithms::boosting::interface1::Model::getNumberOfFeatures
size_t getNumberOfFeatures() const DAAL_C11_OVERRIDE
Definition: boosting_model.h:158
daal::algorithms::boosting::interface1::Parameter::Parameter
Parameter(const Parameter &other)
Definition: boosting_model.h:98
daal::algorithms::boosting::interface1::Model
Base class for boosting algorithm models. Contains a collection of weak learner models constructed du...
Definition: boosting_model.h:121
daal::algorithms::boosting::interface1::Parameter::weakLearnerTraining
services::SharedPtr< weak_learner::training::Batch > weakLearnerTraining
Definition: boosting_model.h:102
daal::services::interface1::SharedPtr
Shared pointer that retains shared ownership of an object through a pointer. Several SharedPtr object...
Definition: daal_shared_ptr.h:187
daal::algorithms::linear_regression::training::model
Definition: linear_regression_training_types.h:125
daal::algorithms::boosting::interface1::Parameter
Base class for parameters of the boosting algorithm
Definition: boosting_model.h:84
daal::algorithms::boosting::interface1::Model::Model
Model(size_t nFeatures=0)
Definition: boosting_model.h:129