22 #ifndef __BROWN_BOOST_TRAINING_BATCH_H__
23 #define __BROWN_BOOST_TRAINING_BATCH_H__
25 #include "algorithms/boosting/boosting_training_batch.h"
26 #include "algorithms/boosting/brownboost_training_types.h"
52 template<
typename algorithmFPType, Method method, CpuType cpu>
53 class DAAL_EXPORT BatchContainer :
public TrainingContainerIface<batch>
61 BatchContainer(daal::services::Environment::env *daalEnv);
67 services::Status compute() DAAL_C11_OVERRIDE;
87 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
88 class DAAL_EXPORT Batch :
public boosting::training::Batch
91 typedef boosting::training::Batch super;
93 typedef typename super::InputType InputType;
94 typedef algorithms::brownboost::Parameter ParameterType;
95 typedef algorithms::brownboost::training::Result ResultType;
97 ParameterType parameter;
111 Batch(
const Batch<algorithmFPType, method> &other) : boosting::training::Batch(other),
112 parameter(other.parameter), input(other.input)
123 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
129 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
135 ResultPtr getResult()
137 return ResultType::cast(_result);
143 services::Status resetResult() DAAL_C11_OVERRIDE
145 _result.reset(
new ResultType());
146 DAAL_CHECK(_result, services::ErrorNullResult);
148 return services::Status();
156 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
158 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
162 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
164 return new Batch<algorithmFPType, method>(*this);
167 services::Status allocateResult() DAAL_C11_OVERRIDE
169 ResultPtr res = getResult();
170 DAAL_CHECK(_result, services::ErrorNullResult);
171 services::Status s = res->template allocate<algorithmFPType>(&input, _par, method);
172 _res = _result.get();
178 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
181 _result.reset(
new ResultType());
186 using interface1::BatchContainer;
187 using interface1::Batch;
193 #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:88
daal
Definition: algorithm_base_common.h:31
daal::algorithms::brownboost::training::interface1::Batch::input
InputType input
Definition: brownboost_training_batch.h:98
daal::algorithms::brownboost::training::interface1::Batch::parameter
ParameterType parameter
Definition: brownboost_training_batch.h:97
daal::algorithms::brownboost::training::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: brownboost_training_batch.h:129
daal::algorithms::brownboost::training::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: brownboost_training_batch.h:111
daal::batch
Definition: daal_defines.h:106
daal::algorithms::brownboost::training::interface1::Batch::resetResult
services::Status resetResult() DAAL_C11_OVERRIDE
Definition: brownboost_training_batch.h:143
daal::algorithms::brownboost::training::interface1::Batch::getResult
ResultPtr getResult()
Definition: brownboost_training_batch.h:135
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:53
daal::algorithms::brownboost::training::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: brownboost_training_batch.h:156
daal::algorithms::brownboost::training::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: brownboost_training_batch.h:123
daal::services::ErrorNullResult
Definition: error_indexes.h:96
daal::algorithms::TrainingContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the model...
Definition: training.h:50