24 #ifndef __DECISION_TREE_REGRESSION_PREDICT_H__
25 #define __DECISION_TREE_REGRESSION_PREDICT_H__
27 #include "algorithms/algorithm.h"
28 #include "algorithms/decision_tree/decision_tree_regression_predict_types.h"
29 #include "algorithms/regression/regression_predict.h"
35 namespace decision_tree
53 template<
typename algorithmFPType, Method method, CpuType cpu>
54 class BatchContainer :
public PredictionContainerIface
61 DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv);
63 DAAL_DEPRECATED ~BatchContainer();
68 DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE;
87 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
88 class Batch :
public algorithms::regression::prediction::Batch
91 typedef algorithms::regression::prediction::Batch super;
93 typedef algorithms::decision_tree::regression::prediction::Input InputType;
94 typedef algorithms::decision_tree::regression::Parameter ParameterType;
95 typedef algorithms::decision_tree::regression::prediction::Result ResultType;
98 ParameterType parameter;
101 DAAL_DEPRECATED Batch()
112 DAAL_DEPRECATED Batch(
const Batch<algorithmFPType, method> & other) :
113 algorithms::regression::prediction::Batch(other), input(other.input), parameter(other.parameter)
118 DAAL_DEPRECATED_VIRTUAL
virtual algorithms::regression::prediction::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); }
137 DAAL_DEPRECATED services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
139 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
143 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
145 return new Batch<algorithmFPType, method>(*this);
148 services::Status allocateResult() DAAL_C11_OVERRIDE
150 services::Status s = getResult()->template allocate<algorithmFPType>(_in, ¶meter, (int)method);
151 _res = _result.get();
157 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
160 _result.reset(
new ResultType());
178 template<
typename algorithmFPType, Method method, CpuType cpu>
179 class BatchContainer :
public PredictionContainerIface
186 BatchContainer(daal::services::Environment::env *daalEnv);
193 services::Status compute() DAAL_C11_OVERRIDE;
212 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
213 class Batch :
public algorithms::regression::prediction::Batch
216 typedef algorithms::regression::prediction::Batch super;
218 typedef algorithms::decision_tree::regression::prediction::Input InputType;
219 typedef algorithms::decision_tree::regression::Parameter ParameterType;
220 typedef algorithms::decision_tree::regression::prediction::Result ResultType;
223 ParameterType parameter;
237 Batch(
const Batch<algorithmFPType, method> & other) :
238 algorithms::regression::prediction::Batch(other), input(other.input), parameter(other.parameter)
243 virtual algorithms::regression::prediction::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
249 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
255 ResultPtr getResult() {
return ResultType::cast(_result); }
262 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
264 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
268 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
270 return new Batch<algorithmFPType, method>(*this);
273 services::Status allocateResult() DAAL_C11_OVERRIDE
275 services::Status s = getResult()->template allocate<algorithmFPType>(_in, ¶meter, (int)method);
276 _res = _result.get();
282 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
285 _result.reset(
new ResultType());
291 using interface2::BatchContainer;
292 using interface2::Batch;
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::Batch
DAAL_DEPRECATED Batch()
Definition: decision_tree_regression_predict.h:101
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::input
InputType input
Definition: decision_tree_regression_predict.h:97
daal::batch
Definition: daal_defines.h:112
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::Batch
DAAL_DEPRECATED Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_tree_regression_predict.h:112
daal::algorithms::decision_tree::regression::prediction::interface2::Batch::input
InputType input
Definition: decision_tree_regression_predict.h:222
daal::algorithms::decision_tree::regression::prediction::interface2::Batch::Batch
Batch()
Definition: decision_tree_regression_predict.h:226
daal::algorithms::decision_tree::regression::prediction::interface1::BatchContainer::compute
DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::clone
DAAL_DEPRECATED services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_tree_regression_predict.h:137
daal::algorithms::decision_tree::regression::prediction::interface2::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::decision_tree::regression::prediction::interface2::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_tree_regression_predict.h:249
daal::algorithms::decision_tree::regression::prediction::interface1::Batch
Provides methods to run implementations of the Decision tree model-based prediction.
Definition: decision_tree_regression_predict.h:88
daal::algorithms::decision_tree::regression::prediction::interface1::BatchContainer::BatchContainer
DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::getMethod
virtual DAAL_DEPRECATED_VIRTUAL int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_tree_regression_predict.h:124
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:42
daal::algorithms::decision_tree::regression::prediction::interface2::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_tree_regression_predict.h:262
daal::algorithms::decision_tree::regression::prediction::interface2::Batch::getResult
ResultPtr getResult()
Definition: decision_tree_regression_predict.h:255
daal::algorithms::decision_tree::regression::prediction::interface2::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_tree_regression_predict.h:237
daal::algorithms::decision_tree::regression::prediction::interface2::Batch::parameter
ParameterType parameter
Definition: decision_tree_regression_predict.h:223
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: decision_tree_regression_predict.h:98
daal::algorithms::decision_tree::regression::prediction::interface1::BatchContainer
Class containing computation methods for Decision tree model-based prediction.
Definition: decision_tree_regression_predict.h:54
daal::algorithms::decision_tree::regression::prediction::prediction
Definition: decision_tree_regression_predict_types.h:96
daal::algorithms::decision_tree::regression::prediction::interface2::Batch
Provides methods to run implementations of the Decision tree model-based prediction.
Definition: decision_tree_regression_predict.h:213
daal::algorithms::decision_tree::regression::prediction::interface2::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::decision_tree::regression::prediction::interface2::BatchContainer
Class containing computation methods for Decision tree model-based prediction.
Definition: decision_tree_regression_predict.h:179
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::getResult
DAAL_DEPRECATED ResultPtr getResult()
Definition: decision_tree_regression_predict.h:130