22 #ifndef __DECISION_TREE_REGRESSION_TRAINING_BATCH_H__
23 #define __DECISION_TREE_REGRESSION_TRAINING_BATCH_H__
25 #include "algorithms/algorithm.h"
26 #include "algorithms/decision_tree/decision_tree_regression_training_types.h"
27 #include "algorithms/decision_tree/decision_tree_regression_model.h"
28 #include "algorithms/regression/regression_training_batch.h"
34 namespace decision_tree
52 template <
typename algorithmFPType, Method method, CpuType cpu>
53 class DAAL_EXPORT BatchContainer :
public TrainingContainerIface<batch>
60 BatchContainer(daal::services::Environment::env * daalEnv);
68 services::Status compute() DAAL_C11_OVERRIDE;
86 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
87 class DAAL_EXPORT Batch :
public algorithms::regression::training::Batch
90 typedef algorithms::regression::training::Batch super;
92 typedef algorithms::decision_tree::regression::training::Input InputType;
93 typedef algorithms::decision_tree::regression::Parameter ParameterType;
94 typedef algorithms::decision_tree::regression::training::Result ResultType;
97 ParameterType parameter;
110 Batch(
const Batch<algorithmFPType, method> & other) :
111 algorithms::regression::training::Batch(other), input(other.input), parameter(other.parameter)
116 virtual algorithms::regression::training::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
122 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
128 ResultPtr getResult() {
return ResultType::cast(_result); }
135 _result.reset(
new ResultType());
145 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
147 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
151 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
153 return new Batch<algorithmFPType, method>(*this);
156 services::Status allocateResult() DAAL_C11_OVERRIDE
158 services::Status s = getResult()->template allocate<algorithmFPType>(&input, ¶meter, method);
159 _res = _result.get();
166 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
168 _result.reset(
new ResultType());
174 using interface1::BatchContainer;
175 using interface1::Batch;
daal::algorithms::decision_tree::regression::training::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_tree_regression_training_batch.h:145
daal::algorithms::decision_tree::regression::training::interface1::Batch::parameter
ParameterType parameter
Definition: decision_tree_regression_training_batch.h:97
daal
Definition: algorithm_base_common.h:31
daal::algorithms::decision_tree::regression::training::interface1::Batch::resetResult
void resetResult()
Definition: decision_tree_regression_training_batch.h:133
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:53
daal::algorithms::decision_tree::regression::training::interface1::Batch::input
InputType input
Definition: decision_tree_regression_training_batch.h:96
daal::algorithms::decision_tree::regression::training::interface1::Batch::getResult
ResultPtr getResult()
Definition: decision_tree_regression_training_batch.h:128
daal::batch
Definition: daal_defines.h:106
daal::algorithms::decision_tree::regression::training::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_tree_regression_training_batch.h:110
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:87
daal::algorithms::decision_tree::regression::training::interface1::Batch::Batch
Batch()
Definition: decision_tree_regression_training_batch.h:100
daal::algorithms::TrainingContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the model...
Definition: training.h:50
daal::algorithms::decision_tree::regression::training::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_tree_regression_training_batch.h:122