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
130 Batch(
const Batch<algorithmFPType, method> & other) :
131 algorithms::regression::prediction::Batch(other), input(other.input), parameter(other.parameter)
136 virtual algorithms::regression::prediction::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
142 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
148 ResultPtr getResult() {
return Result::cast(_result); }
155 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
157 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
162 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
164 return new Batch<algorithmFPType, method>(*this);
167 services::Status allocateResult() DAAL_C11_OVERRIDE
169 services::Status s = getResult()->template allocate<algorithmFPType>(_in, ¶meter, (int)method);
170 _res = _result.get();
176 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
179 _result.reset(
new Result());
185 using interface1::BatchContainer;
186 using interface1::Batch;
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::getResult
ResultPtr getResult()
Definition: decision_tree_regression_predict.h:148
daal::algorithms::decision_tree::regression::prediction::prediction
Definition: decision_tree_regression_predict_types.h:120
daal
Definition: algorithm_base_common.h:57
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::Batch
Batch()
Definition: decision_tree_regression_predict.h:119
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:142
daal::batch
Definition: daal_defines.h:131
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:155
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:102
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::parameter
Parameter parameter
Definition: decision_tree_regression_predict.h:116
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::input
Input input
Definition: decision_tree_regression_predict.h:115
daal::algorithms::decision_tree::regression::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_tree_regression_predict.h:130