48 #ifndef __DECISION_TREE_REGRESSION_PREDICT_H__ 49 #define __DECISION_TREE_REGRESSION_PREDICT_H__ 51 #include "algorithms/algorithm.h" 52 #include "algorithms/decision_tree/decision_tree_regression_predict_types.h" 53 #include "algorithms/regression/regression_predict.h" 59 namespace decision_tree
77 template<
typename algorithmFPType, Method method, CpuType cpu>
78 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
85 BatchContainer(daal::services::Environment::env *daalEnv);
92 services::Status compute() DAAL_C11_OVERRIDE;
111 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
112 class Batch :
public algorithms::regression::prediction::Batch
115 typedef algorithms::regression::prediction::Batch super;
117 typedef algorithms::decision_tree::regression::prediction::Input InputType;
118 typedef algorithms::decision_tree::regression::Parameter ParameterType;
119 typedef algorithms::decision_tree::regression::prediction::Result ResultType;
122 ParameterType parameter;
136 Batch(
const Batch<algorithmFPType, method> & other) :
137 algorithms::regression::prediction::Batch(other), input(other.input), parameter(other.parameter)
142 virtual algorithms::regression::prediction::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
148 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
154 ResultPtr getResult() {
return ResultType::cast(_result); }
161 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const 163 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
168 virtual Batch<algorithmFPType, method> * cloneImpl()
const DAAL_C11_OVERRIDE
170 return new Batch<algorithmFPType, method>(*this);
173 services::Status allocateResult() DAAL_C11_OVERRIDE
175 services::Status s = getResult()->template allocate<algorithmFPType>(_in, ¶meter, (int)method);
176 _res = _result.get();
182 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
185 _result.reset(
new ResultType());
191 using interface1::BatchContainer;
192 using interface1::Batch;
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::getResult
ResultPtr getResult()
Definition: decision_tree_regression_predict.h:154
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::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:79
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::Batch
Batch()
Definition: decision_tree_regression_predict.h:125
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:66
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_tree_regression_predict.h:148
daal::algorithms::decision_tree::regression::interface1::Parameter
Decision tree algorithm parameters.
Definition: decision_tree_regression_model.h:96
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: decision_tree_regression_predict.h:122
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::input
InputType input
Definition: decision_tree_regression_predict.h:121
daal::algorithms::decision_tree::regression::prediction::prediction
Definition: decision_tree_regression_predict_types.h:120
daal::batch
Definition: daal_defines.h:132
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::decision_tree::regression::prediction::interface1::BatchContainer
Class containing computation methods for Decision tree model-based prediction.
Definition: decision_tree_regression_predict.h:78
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:112
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_tree_regression_predict.h:161
daal::algorithms::decision_tree::regression::prediction::interface1::Result
Provides interface for the result of decision tree model-based prediction.
Definition: decision_tree_regression_predict_types.h:180
daal::algorithms::regression::prediction::interface1::Batch
Provides methods to run implementations of the regression model-based prediction. ...
Definition: regression_predict.h:77
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_tree_regression_predict.h:136