24 #ifndef __DECISION_TREE_REGRESSION_TRAINING_BATCH_H__
25 #define __DECISION_TREE_REGRESSION_TRAINING_BATCH_H__
27 #include "algorithms/algorithm.h"
28 #include "algorithms/decision_tree/decision_tree_regression_training_types.h"
29 #include "algorithms/decision_tree/decision_tree_regression_model.h"
30 #include "algorithms/regression/regression_training_batch.h"
36 namespace decision_tree
54 template <
typename algorithmFPType, Method method, CpuType cpu>
55 class BatchContainer :
public TrainingContainerIface<batch>
62 DAAL_DEPRECATED BatchContainer(daal::services::Environment::env * daalEnv);
65 DAAL_DEPRECATED ~BatchContainer();
70 DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE;
88 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
89 class DAAL_EXPORT Batch :
public algorithms::regression::training::Batch
92 typedef algorithms::regression::training::Batch super;
94 typedef algorithms::decision_tree::regression::training::Input InputType;
95 typedef algorithms::decision_tree::regression::Parameter ParameterType;
96 typedef algorithms::decision_tree::regression::training::Result ResultType;
99 ParameterType parameter;
102 DAAL_DEPRECATED Batch()
112 DAAL_DEPRECATED Batch(
const Batch<algorithmFPType, method> & other) :
113 algorithms::regression::training::Batch(other), input(other.input), parameter(other.parameter)
118 DAAL_DEPRECATED_VIRTUAL
virtual algorithms::regression::training::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
124 DAAL_DEPRECATED_VIRTUAL
virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
130 DAAL_DEPRECATED ResultPtr getResult() {
return ResultType::cast(_result); }
135 DAAL_DEPRECATED services::Status resetResult() DAAL_C11_OVERRIDE
137 _result.reset(
new ResultType());
138 DAAL_CHECK(_result, services::ErrorNullResult);
140 return services::Status();
149 DAAL_DEPRECATED services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
151 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
155 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
157 return new Batch<algorithmFPType, method>(*this);
160 services::Status allocateResult() DAAL_C11_OVERRIDE
162 services::Status s = getResult()->template allocate<algorithmFPType>(&input, ¶meter, method);
163 _res = _result.get();
170 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
172 _result.reset(
new ResultType());
190 template <
typename algorithmFPType, Method method, CpuType cpu>
191 class BatchContainer :
public TrainingContainerIface<batch>
198 BatchContainer(daal::services::Environment::env * daalEnv);
206 services::Status compute() DAAL_C11_OVERRIDE;
224 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
225 class DAAL_EXPORT Batch :
public algorithms::regression::training::Batch
228 typedef algorithms::regression::training::Batch super;
230 typedef algorithms::decision_tree::regression::training::Input InputType;
231 typedef algorithms::decision_tree::regression::Parameter ParameterType;
232 typedef algorithms::decision_tree::regression::training::Result ResultType;
235 ParameterType parameter;
248 Batch(
const Batch<algorithmFPType, method> & other) :
249 algorithms::regression::training::Batch(other), input(other.input), parameter(other.parameter)
254 virtual algorithms::regression::training::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
260 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
266 ResultPtr getResult() {
return ResultType::cast(_result); }
271 services::Status resetResult() DAAL_C11_OVERRIDE
273 _result.reset(
new ResultType());
274 DAAL_CHECK(_result, services::ErrorNullResult)
276 return services::Status();
285 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
287 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
291 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
293 return new Batch<algorithmFPType, method>(*this);
296 services::Status allocateResult() DAAL_C11_OVERRIDE
298 services::Status s = getResult()->template allocate<algorithmFPType>(&input, ¶meter, method);
299 _res = _result.get();
306 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
308 _result.reset(
new ResultType());
314 using interface2::BatchContainer;
315 using interface2::Batch;
daal::algorithms::decision_tree::regression::training::interface1::Batch::Batch
DAAL_DEPRECATED Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_tree_regression_training_batch.h:112
daal::algorithms::decision_tree::regression::training::interface1::BatchContainer::BatchContainer
DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::decision_tree::regression::training::interface2::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_tree_regression_training_batch.h:248
daal::algorithms::decision_tree::regression::training::interface1::Batch::getResult
DAAL_DEPRECATED ResultPtr getResult()
Definition: decision_tree_regression_training_batch.h:130
daal::batch
Definition: daal_defines.h:112
daal::algorithms::decision_tree::regression::training::interface1::Batch
Provides methods for Decision tree model-based training in the batch processing mode.
Definition: decision_tree_regression_training_batch.h:89
daal::algorithms::decision_tree::regression::training::interface2::Batch::getResult
ResultPtr getResult()
Definition: decision_tree_regression_training_batch.h:266
daal::algorithms::decision_tree::regression::training::interface1::Batch::Batch
DAAL_DEPRECATED Batch()
Definition: decision_tree_regression_training_batch.h:102
daal::algorithms::decision_tree::regression::training::interface2::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_tree_regression_training_batch.h:285
daal::algorithms::decision_tree::regression::training::interface1::Batch::input
InputType input
Definition: decision_tree_regression_training_batch.h:98
daal::algorithms::decision_tree::regression::training::interface1::Batch::clone
DAAL_DEPRECATED services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_tree_regression_training_batch.h:149
daal::services::ErrorNullResult
Definition: error_indexes.h:98
daal::algorithms::decision_tree::regression::training::interface1::BatchContainer::~BatchContainer
DAAL_DEPRECATED ~BatchContainer()
daal::algorithms::decision_tree::regression::training::interface2::Batch::parameter
ParameterType parameter
Definition: decision_tree_regression_training_batch.h:235
daal::algorithms::decision_tree::regression::training::interface2::Batch
Provides methods for Decision tree model-based training in the batch processing mode.
Definition: decision_tree_regression_training_batch.h:225
daal::algorithms::decision_tree::regression::training::interface2::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::decision_tree::regression::training::interface1::BatchContainer::compute
DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::decision_tree::regression::training::interface2::BatchContainer
Class containing methods for Decision tree model-based training using algorithmFPType precision arith...
Definition: decision_tree_regression_training_batch.h:191
daal::algorithms::decision_tree::regression::training::interface1::Batch::getMethod
virtual DAAL_DEPRECATED_VIRTUAL int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_tree_regression_training_batch.h:124
daal::algorithms::decision_tree::regression::training::interface2::Batch::resetResult
services::Status resetResult() DAAL_C11_OVERRIDE
Definition: decision_tree_regression_training_batch.h:271
daal::algorithms::decision_tree::regression::training::interface1::BatchContainer
Class containing methods for Decision tree model-based training using algorithmFPType precision arith...
Definition: decision_tree_regression_training_batch.h:55
daal::algorithms::decision_tree::regression::training::interface2::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_tree_regression_training_batch.h:260
daal::algorithms::decision_tree::regression::training::interface2::Batch::input
InputType input
Definition: decision_tree_regression_training_batch.h:234
daal::algorithms::decision_tree::regression::training::interface2::Batch::Batch
Batch()
Definition: decision_tree_regression_training_batch.h:238
daal::algorithms::decision_tree::regression::training::interface1::Batch::resetResult
DAAL_DEPRECATED services::Status resetResult() DAAL_C11_OVERRIDE
Definition: decision_tree_regression_training_batch.h:135
daal::algorithms::decision_tree::regression::training::interface2::BatchContainer::~BatchContainer
~BatchContainer()
daal::algorithms::decision_tree::regression::training::interface2::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::TrainingContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the model...
Definition: training.h:52
daal::algorithms::decision_tree::regression::training::interface1::Batch::parameter
ParameterType parameter
Definition: decision_tree_regression_training_batch.h:99