24 #ifndef __DECISION_FOREST_REGRESSION_PREDICT_H__
25 #define __DECISION_FOREST_REGRESSION_PREDICT_H__
27 #include "algorithms/algorithm.h"
28 #include "algorithms/decision_forest/decision_forest_regression_predict_types.h"
29 #include "algorithms/regression/regression_predict.h"
35 namespace decision_forest
52 template<
typename algorithmFPType, Method method, CpuType cpu>
53 class BatchContainer :
public PredictionContainerIface
60 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_forest::regression::prediction::Input InputType;
92 typedef typename super::ParameterType ParameterType;
93 typedef algorithms::decision_forest::regression::prediction::Result ResultType;
96 ParameterType parameter;
110 Batch(
const Batch<algorithmFPType, method> &other) : input(other.input), parameter(other.parameter)
115 virtual InputType* getInput() DAAL_C11_OVERRIDE {
return &input; }
121 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
127 ResultPtr getResult() {
return ResultType::cast(_result); }
134 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
136 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
141 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
143 return new Batch<algorithmFPType, method>(*this);
146 services::Status allocateResult() DAAL_C11_OVERRIDE
148 services::Status s = getResult()->template allocate<algorithmFPType>(_in, 0, 0);
149 _res = _result.get();
155 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
158 _result.reset(
new ResultType());
163 using interface1::BatchContainer;
164 using interface1::Batch;
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_forest_regression_predict.h:110
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::input
InputType input
Definition: decision_forest_regression_predict.h:95
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::getResult
ResultPtr getResult()
Definition: decision_forest_regression_predict.h:127
daal::batch
Definition: daal_defines.h:112
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_forest_regression_predict.h:134
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::Batch
Batch()
Definition: decision_forest_regression_predict.h:99
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: decision_forest_regression_predict.h:96
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_forest::regression::prediction::interface1::BatchContainer
Class containing computation methods for decision forest model-based prediction.
Definition: decision_forest_regression_predict.h:53
daal::algorithms::decision_forest::regression::prediction::interface1::Batch
Provides methods to run implementations of the decision forest model-based prediction.
Definition: decision_forest_regression_predict.h:86
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_forest_regression_predict.h:121
daal::algorithms::decision_forest::regression::prediction::interface1::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::decision_forest::regression::prediction::interface1::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)