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
119 classifier::training::Input input;
132 Batch(
const Batch<algorithmFPType, method> &other) : boosting::training::Batch(other),
133 parameter(other.parameter), input(other.input)
144 classifier::training::Input * getInput() DAAL_C11_OVERRIDE {
return &input; }
150 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
156 ResultPtr getResult()
158 return Result::cast(_result);
164 services::Status resetResult() DAAL_C11_OVERRIDE
166 _result.reset(
new Result());
167 DAAL_CHECK(_result, services::ErrorNullResult);
169 return services::Status();
177 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
179 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
183 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
185 return new Batch<algorithmFPType, method>(*this);
188 services::Status allocateResult() DAAL_C11_OVERRIDE
190 ResultPtr res = getResult();
191 DAAL_CHECK(res, services::ErrorNullResult);
192 services::Status s = res->template allocate<algorithmFPType>(&input, _par, method);
193 _res = _result.get();
199 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
202 _result.reset(
new Result());
207 using interface1::BatchContainer;
208 using interface1::Batch;
214 #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
Definition: algorithm_base_common.h:57
daal::batch
Definition: daal_defines.h:131
daal::algorithms::adaboost::training::interface1::Batch::parameter
Parameter parameter
Definition: adaboost_training_batch.h:118
daal::algorithms::adaboost::training::interface1::Batch::getInput
classifier::training::Input * getInput() DAAL_C11_OVERRIDE
Definition: adaboost_training_batch.h:144
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:164
daal::algorithms::adaboost::training::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: adaboost_training_batch.h:177
daal::algorithms::adaboost::training::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: adaboost_training_batch.h:132
daal::algorithms::adaboost::training::interface1::Batch::input
classifier::training::Input input
Definition: adaboost_training_batch.h:119
daal::algorithms::adaboost::training::interface1::Batch::getResult
ResultPtr getResult()
Definition: adaboost_training_batch.h:156
daal::algorithms::adaboost::training::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: adaboost_training_batch.h:150
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