22 #ifndef __DECISION_TREE_REGRESSION_PREDICT_H__
23 #define __DECISION_TREE_REGRESSION_PREDICT_H__
25 #include "algorithms/algorithm.h"
26 #include "algorithms/decision_tree/decision_tree_regression_predict_types.h"
27 #include "algorithms/regression/regression_predict.h"
33 namespace decision_tree
51 template<
typename algorithmFPType, Method method, CpuType cpu>
52 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
59 BatchContainer(daal::services::Environment::env *daalEnv);
66 services::Status compute() DAAL_C11_OVERRIDE;
85 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
86 class Batch :
public algorithms::regression::prediction::Batch
89 typedef algorithms::regression::prediction::Batch super;
91 typedef algorithms::decision_tree::regression::prediction::Input InputType;
92 typedef algorithms::decision_tree::regression::Parameter ParameterType;
93 typedef algorithms::decision_tree::regression::prediction::Result ResultType;
96 ParameterType parameter;
110 Batch(
const Batch<algorithmFPType, method> & other) :
111 algorithms::regression::prediction::Batch(other), input(other.input), parameter(other.parameter)
116 virtual algorithms::regression::prediction::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 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
137 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
142 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
144 return new Batch<algorithmFPType, method>(*this);
147 services::Status allocateResult() DAAL_C11_OVERRIDE
149 services::Status s = getResult()->template allocate<algorithmFPType>(_in, ¶meter, (int)method);
150 _res = _result.get();
156 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
159 _result.reset(
new ResultType());
165 using interface1::BatchContainer;
166 using interface1::Batch;
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::getResult
ResultPtr getResult()
Definition: decision_tree_regression_predict.h:128
daal::algorithms::decision_tree::regression::prediction::prediction
Definition: decision_tree_regression_predict_types.h:94
daal
Definition: algorithm_base_common.h:31
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::Batch
Batch()
Definition: decision_tree_regression_predict.h:99
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:40
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_tree_regression_predict.h:122
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: decision_tree_regression_predict.h:96
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::input
InputType input
Definition: decision_tree_regression_predict.h:95
daal::batch
Definition: daal_defines.h:106
daal::algorithms::decision_tree::regression::prediction::interface1::BatchContainer
Class containing computation methods for Decision tree model-based prediction.
Definition: decision_tree_regression_predict.h:52
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:86
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_tree_regression_predict.h:135
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:76
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_tree_regression_predict.h:110