48 #ifndef __BROWN_BOOST_TRAINING_BATCH_H__
49 #define __BROWN_BOOST_TRAINING_BATCH_H__
51 #include "algorithms/boosting/boosting_training_batch.h"
52 #include "algorithms/boosting/brownboost_training_types.h"
78 template<
typename algorithmFPType, Method method, CpuType cpu>
79 class DAAL_EXPORT BatchContainer :
public TrainingContainerIface<batch>
87 BatchContainer(daal::services::Environment::env *daalEnv);
93 services::Status compute() DAAL_C11_OVERRIDE;
113 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
114 class DAAL_EXPORT Batch :
public boosting::training::Batch
118 classifier::training::Input input;
131 Batch(
const Batch<algorithmFPType, method> &other) : boosting::training::Batch(other),
132 parameter(other.parameter), input(other.input)
143 classifier::training::Input * getInput() DAAL_C11_OVERRIDE {
return &input; }
149 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
155 ResultPtr getResult()
157 return Result::cast(_result);
163 services::Status resetResult() DAAL_C11_OVERRIDE
165 _result.reset(
new Result());
166 DAAL_CHECK(_result, services::ErrorNullResult);
168 return services::Status();
176 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
178 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
182 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
184 return new Batch<algorithmFPType, method>(*this);
187 services::Status allocateResult() DAAL_C11_OVERRIDE
189 ResultPtr res = getResult();
190 DAAL_CHECK(_result, services::ErrorNullResult);
191 services::Status s = res->template allocate<algorithmFPType>(&input, _par, method);
192 _res = _result.get();
198 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
201 _result.reset(
new Result());
206 using interface1::BatchContainer;
207 using interface1::Batch;
213 #endif // __BROWN_BOOST_TRAINING_BATCH_H__
daal::algorithms::brownboost::training::interface1::Batch
Trains model of the BrownBoost algorithms in the batch processing mode.
Definition: brownboost_training_batch.h:114
daal::algorithms::brownboost::training::interface1::Result
Provides methods to access final results obtained with the compute() method of the BrownBoost trainin...
Definition: brownboost_training_types.h:96
daal
Definition: algorithm_base_common.h:57
daal::algorithms::brownboost::training::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: brownboost_training_batch.h:149
daal::algorithms::brownboost::training::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: brownboost_training_batch.h:131
daal::batch
Definition: daal_defines.h:131
daal::algorithms::brownboost::training::interface1::Batch::resetResult
services::Status resetResult() DAAL_C11_OVERRIDE
Definition: brownboost_training_batch.h:163
daal::algorithms::brownboost::training::interface1::Batch::getResult
ResultPtr getResult()
Definition: brownboost_training_batch.h:155
daal::algorithms::brownboost::training::interface1::BatchContainer
Provides methods to run implementations of BrownBoost model-based training. This class is associated ...
Definition: brownboost_training_batch.h:79
daal::algorithms::brownboost::training::interface1::Batch::parameter
Parameter parameter
Definition: brownboost_training_batch.h:117
daal::algorithms::brownboost::training::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: brownboost_training_batch.h:176
daal::algorithms::brownboost::training::interface1::Batch::getInput
classifier::training::Input * getInput() DAAL_C11_OVERRIDE
Definition: brownboost_training_batch.h:143
daal::algorithms::brownboost::training::interface1::Batch::input
classifier::training::Input input
Definition: brownboost_training_batch.h:118
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