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
117 typedef boosting::training::Batch super;
119 typedef typename super::InputType InputType;
120 typedef algorithms::brownboost::Parameter ParameterType;
121 typedef algorithms::brownboost::training::Result ResultType;
123 ParameterType parameter;
137 Batch(
const Batch<algorithmFPType, method> &other) : boosting::training::Batch(other),
138 parameter(other.parameter), input(other.input)
149 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
155 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
161 ResultPtr getResult()
163 return ResultType::cast(_result);
169 services::Status resetResult() DAAL_C11_OVERRIDE
171 _result.reset(
new ResultType());
172 DAAL_CHECK(_result, services::ErrorNullResult);
174 return services::Status();
182 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const 184 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
188 virtual Batch<algorithmFPType, method> * cloneImpl()
const DAAL_C11_OVERRIDE
190 return new Batch<algorithmFPType, method>(*this);
193 services::Status allocateResult() DAAL_C11_OVERRIDE
195 ResultPtr res = getResult();
196 DAAL_CHECK(_result, services::ErrorNullResult);
197 services::Status s = res->template allocate<algorithmFPType>(&input, _par, method);
198 _res = _result.get();
204 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
207 _result.reset(
new ResultType());
212 using interface1::BatchContainer;
213 using interface1::Batch;
219 #endif // __BROWN_BOOST_TRAINING_BATCH_H__ daal::algorithms::brownboost::training::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: brownboost_training_batch.h:182
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::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::brownboost::training::interface1::Batch::input
InputType input
Definition: brownboost_training_batch.h:124
daal::algorithms::brownboost::training::interface1::Batch::parameter
ParameterType parameter
Definition: brownboost_training_batch.h:123
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::algorithms::brownboost::training::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: brownboost_training_batch.h:155
daal::algorithms::brownboost::training::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: brownboost_training_batch.h:137
daal::batch
Definition: daal_defines.h:132
daal::algorithms::brownboost::training::interface1::Batch::resetResult
services::Status resetResult() DAAL_C11_OVERRIDE
Definition: brownboost_training_batch.h:169
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::brownboost::training::interface1::Batch::getResult
ResultPtr getResult()
Definition: brownboost_training_batch.h:161
daal::services::interface1::SharedPtr::get
T * get() const
Definition: daal_shared_ptr.h:332
daal::algorithms::classifier::training::interface1::Batch
Algorithm class for training the classifier model.
Definition: classifier_training_batch.h:82
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::boosting::interface1::Parameter
Base class for parameters of the boosting algorithm
Definition: boosting_model.h:84
daal::algorithms::classifier::training::interface1::Result
Provides methods to access final results obtained with the compute() method in the batch processing m...
Definition: classifier_training_types.h:222
daal::algorithms::brownboost::interface1::Parameter
BrownBoost algorithm parameters.
Definition: brownboost_model.h:81
daal::algorithms::brownboost::training::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: brownboost_training_batch.h:149
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