22 #ifndef __DECISION_FOREST_CLASSIFICATION_PREDICT_H__
23 #define __DECISION_FOREST_CLASSIFICATION_PREDICT_H__
25 #include "algorithms/algorithm.h"
26 #include "algorithms/classifier/classifier_predict.h"
27 #include "algorithms/decision_forest/decision_forest_classification_model.h"
28 #include "algorithms/decision_forest/decision_forest_classification_predict_types.h"
34 namespace decision_forest
36 namespace classification
71 template<
typename algorithmFPType, Method method, CpuType cpu>
72 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
79 BatchContainer(daal::services::Environment::env *daalEnv);
86 services::Status compute() DAAL_C11_OVERRIDE;
109 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
110 class Batch :
public classifier::prediction::Batch
113 typedef classifier::prediction::Batch super;
115 typedef algorithms::decision_forest::classification::prediction::Input InputType;
116 typedef typename super::ParameterType ParameterType;
117 typedef typename super::ResultType ResultType;
120 ParameterType parameter;
126 Batch(
size_t nClasses): parameter(nClasses)
137 Batch(
const Batch<algorithmFPType, method> &other) : classifier::prediction::Batch(other),
138 input(other.input), parameter(other.parameter)
149 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
155 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
162 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
164 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
168 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
170 return new Batch<algorithmFPType, method>(*this);
173 services::Status allocateResult() DAAL_C11_OVERRIDE
175 services::Status s = _result->allocate<algorithmFPType>(&input, 0, 0);
176 _res = _result.get();
183 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
189 using interface1::BatchContainer;
190 using interface1::Batch;
daal::algorithms::decision_forest::classification::prediction::interface1::BatchContainer
Provides methods to run implementations of the decision_forest algorithm. This class is associated wi...
Definition: decision_forest_classification_predict.h:72
daal::algorithms::decision_forest::classification::prediction::interface1::Batch::input
InputType input
Definition: decision_forest_classification_predict.h:119
daal::algorithms::decision_forest::classification::prediction::Method
Method
Definition: decision_forest_classification_predict.h:52
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::classification::prediction::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: decision_forest_classification_predict.h:149
daal::batch
Definition: daal_defines.h:110
daal::algorithms::decision_forest::classification::prediction::interface1::Batch::Batch
Batch(size_t nClasses)
Definition: decision_forest_classification_predict.h:126
daal::algorithms::decision_forest::classification::prediction::defaultDense
Definition: decision_forest_classification_predict.h:54
daal::algorithms::decision_forest::classification::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_forest_classification_predict.h:155
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:76
daal::algorithms::decision_forest::classification::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_forest_classification_predict.h:162
daal::algorithms::decision_forest::classification::prediction::interface1::Batch
Predicts decision_forest classification results.
Definition: decision_forest_classification_predict.h:110
daal::algorithms::decision_forest::classification::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_forest_classification_predict.h:137
daal::algorithms::decision_forest::classification::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: decision_forest_classification_predict.h:120