48 #ifndef __DECISION_FOREST_REGRESSION_PREDICT_H__
49 #define __DECISION_FOREST_REGRESSION_PREDICT_H__
51 #include "algorithms/algorithm.h"
52 #include "algorithms/decision_forest/decision_forest_regression_predict_types.h"
53 #include "algorithms/regression/regression_predict.h"
59 namespace decision_forest
76 template<
typename algorithmFPType, Method method, CpuType cpu>
77 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
84 BatchContainer(daal::services::Environment::env *daalEnv);
90 services::Status compute() DAAL_C11_OVERRIDE;
109 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
110 class Batch :
public algorithms::regression::prediction::Batch
128 Batch(
const Batch<algorithmFPType, method> &other) : input(other.input), parameter(other.parameter)
133 virtual algorithms::regression::prediction::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
139 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
145 ResultPtr getResult() {
return Result::cast(_result); }
152 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
154 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
159 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
161 return new Batch<algorithmFPType, method>(*this);
164 services::Status allocateResult() DAAL_C11_OVERRIDE
166 services::Status s = getResult()->template allocate<algorithmFPType>(_in, 0, 0);
167 _res = _result.get();
173 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
176 _result.reset(
new Result());
181 using interface1::BatchContainer;
182 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:152
daal
Definition: algorithm_base_common.h:57
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::input
Input input
Definition: decision_forest_regression_predict.h:113
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_forest::regression::prediction::interface1::BatchContainer
Class containing computation methods for decision forest model-based prediction.
Definition: decision_forest_regression_predict.h:77
daal::batch
Definition: daal_defines.h:131
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_forest_regression_predict.h:139
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::Batch
Batch()
Definition: decision_forest_regression_predict.h:117
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::parameter
Parameter parameter
Definition: decision_forest_regression_predict.h:114
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_forest_regression_predict.h:128
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:102
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:110
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::getResult
ResultPtr getResult()
Definition: decision_forest_regression_predict.h:145