49 #ifndef __ADA_BOOST_TRAINING_BATCH_H__ 50 #define __ADA_BOOST_TRAINING_BATCH_H__ 52 #include "algorithms/boosting/boosting_training_batch.h" 53 #include "algorithms/boosting/adaboost_training_types.h" 80 template<
typename algorithmFPType, Method method, CpuType cpu>
81 class DAAL_EXPORT BatchContainer :
public TrainingContainerIface<batch>
88 BatchContainer(daal::services::Environment::env *daalEnv);
94 services::Status compute() DAAL_C11_OVERRIDE;
114 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
115 class DAAL_EXPORT Batch :
public boosting::training::Batch
118 typedef boosting::training::Batch super;
120 typedef typename super::InputType InputType;
121 typedef algorithms::adaboost::Parameter ParameterType;
122 typedef algorithms::adaboost::training::Result ResultType;
124 ParameterType parameter;
138 Batch(
const Batch<algorithmFPType, method> &other) : boosting::training::Batch(other),
139 parameter(other.parameter), input(other.input)
150 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
156 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
162 ResultPtr getResult()
164 return ResultType::cast(_result);
170 services::Status resetResult() DAAL_C11_OVERRIDE
172 _result.reset(
new ResultType());
173 DAAL_CHECK(_result, services::ErrorNullResult);
175 return services::Status();
183 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const 185 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
189 virtual Batch<algorithmFPType, method> * cloneImpl()
const DAAL_C11_OVERRIDE
191 return new Batch<algorithmFPType, method>(*this);
194 services::Status allocateResult() DAAL_C11_OVERRIDE
196 ResultPtr res = getResult();
197 DAAL_CHECK(res, services::ErrorNullResult);
198 services::Status s = res->template allocate<algorithmFPType>(&input, _par, method);
199 _res = _result.get();
205 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
208 _result.reset(
new ResultType());
213 using interface1::BatchContainer;
214 using interface1::Batch;
220 #endif // __ADA_BOOST_TRAINING_BATCH_H__
daal::algorithms::adaboost::training::interface1::BatchContainer
Provides methods to run implementations of AdaBoost model-based training. It is associated with daal:...
Definition: adaboost_training_batch.h:81
daal::services::interface1::Environment::_envStruct
The environment structure.
Definition: env_detect.h:95
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::boosting::training::interface1::Batch
Base class for training models of boosting algorithms in the batch processing mode ...
Definition: boosting_training_batch.h:95
daal::batch
Definition: daal_defines.h:132
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::services::interface1::SharedPtr::get
T * get() const
Definition: daal_shared_ptr.h:332
daal::algorithms::adaboost::training::interface1::Batch
Trains model of the AdaBoost algorithms in batch mode.
Definition: adaboost_training_batch.h:115
daal::algorithms::adaboost::training::interface1::Batch::resetResult
services::Status resetResult() DAAL_C11_OVERRIDE
Definition: adaboost_training_batch.h:170
daal::algorithms::adaboost::interface1::Parameter
AdaBoost algorithm parameters.
Definition: adaboost_model.h:80
daal::algorithms::adaboost::training::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: adaboost_training_batch.h:138
daal::algorithms::adaboost::training::interface1::Batch::parameter
ParameterType parameter
Definition: adaboost_training_batch.h:124
daal::algorithms::adaboost::training::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: adaboost_training_batch.h:150
daal::algorithms::adaboost::training::interface1::Batch::getResult
ResultPtr getResult()
Definition: adaboost_training_batch.h:162
daal::algorithms::adaboost::training::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: adaboost_training_batch.h:183
daal::algorithms::adaboost::training::interface1::Batch::input
InputType input
Definition: adaboost_training_batch.h:125
daal::algorithms::adaboost::training::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: adaboost_training_batch.h:156
daal::services::ErrorNullResult
Definition: error_indexes.h:122
daal::algorithms::TrainingContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the model...
Definition: training.h:76
daal::algorithms::adaboost::training::interface1::Result
Provides methods to access final results obtained with the compute() method of the AdaBoost training ...
Definition: adaboost_training_types.h:96