22 #ifndef __DECISION_FOREST_REGRESSION_PREDICT_H__
23 #define __DECISION_FOREST_REGRESSION_PREDICT_H__
25 #include "algorithms/algorithm.h"
26 #include "algorithms/decision_forest/decision_forest_regression_predict_types.h"
27 #include "algorithms/regression/regression_predict.h"
33 namespace decision_forest
50 template<
typename algorithmFPType, Method method, CpuType cpu>
51 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
58 BatchContainer(daal::services::Environment::env *daalEnv);
64 services::Status compute() DAAL_C11_OVERRIDE;
83 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
84 class Batch :
public algorithms::regression::prediction::Batch
87 typedef algorithms::regression::prediction::Batch super;
89 typedef algorithms::decision_forest::regression::prediction::Input InputType;
90 typedef typename super::ParameterType ParameterType;
91 typedef algorithms::decision_forest::regression::prediction::Result ResultType;
94 ParameterType parameter;
108 Batch(
const Batch<algorithmFPType, method> &other) : input(other.input), parameter(other.parameter)
113 virtual InputType* getInput() DAAL_C11_OVERRIDE {
return &input; }
119 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
125 ResultPtr getResult() {
return ResultType::cast(_result); }
132 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
134 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
139 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
141 return new Batch<algorithmFPType, method>(*this);
144 services::Status allocateResult() DAAL_C11_OVERRIDE
146 services::Status s = getResult()->template allocate<algorithmFPType>(_in, 0, 0);
147 _res = _result.get();
153 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
156 _result.reset(
new ResultType());
161 using interface1::BatchContainer;
162 using interface1::Batch;
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_forest_regression_predict.h:132
daal
Definition: algorithm_base_common.h:31
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_forest::regression::prediction::interface1::BatchContainer
Class containing computation methods for decision forest model-based prediction.
Definition: decision_forest_regression_predict.h:51
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::input
InputType input
Definition: decision_forest_regression_predict.h:93
daal::batch
Definition: daal_defines.h:106
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_forest_regression_predict.h:119
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::Batch
Batch()
Definition: decision_forest_regression_predict.h:97
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_forest_regression_predict.h:108
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: decision_forest_regression_predict.h:94
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:76
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:84
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::getResult
ResultPtr getResult()
Definition: decision_forest_regression_predict.h:125