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
113 typedef algorithms::regression::prediction::Batch super;
115 typedef algorithms::decision_forest::regression::prediction::Input InputType;
116 typedef typename super::ParameterType ParameterType;
117 typedef algorithms::decision_forest::regression::prediction::Result ResultType;
120 ParameterType parameter;
134 Batch(
const Batch<algorithmFPType, method> &other) : input(other.input), parameter(other.parameter)
139 virtual InputType* getInput() DAAL_C11_OVERRIDE {
return &input; }
145 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
151 ResultPtr getResult() {
return ResultType::cast(_result); }
158 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const 160 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
165 virtual Batch<algorithmFPType, method> * cloneImpl()
const DAAL_C11_OVERRIDE
167 return new Batch<algorithmFPType, method>(*this);
170 services::Status allocateResult() DAAL_C11_OVERRIDE
172 services::Status s = getResult()->template allocate<algorithmFPType>(_in, 0, 0);
173 _res = _result.get();
179 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
182 _result.reset(
new ResultType());
187 using interface1::BatchContainer;
188 using interface1::Batch;
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_forest::regression::prediction::interface1::Result
Provides interface for the result of decision forest model-based prediction.
Definition: decision_forest_regression_predict_types.h:174
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::algorithms::decision_forest::regression::prediction::interface1::Batch::input
InputType input
Definition: decision_forest_regression_predict.h:119
daal::batch
Definition: daal_defines.h:132
daal::algorithms::interface1::Parameter
Base class to represent computation parameters. Algorithm-specific parameters are represented as deri...
Definition: algorithm_types.h:86
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_forest_regression_predict.h:145
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_forest::regression::prediction::interface1::Batch::Batch
Batch()
Definition: decision_forest_regression_predict.h:123
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_forest_regression_predict.h:134
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: decision_forest_regression_predict.h:120
daal::algorithms::decision_forest::regression::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_forest_regression_predict.h:158
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_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:151