22 #ifndef __DECISION_TREE_CLASSIFICATION_PREDICT_H__
23 #define __DECISION_TREE_CLASSIFICATION_PREDICT_H__
25 #include "algorithms/algorithm.h"
26 #include "algorithms/decision_tree/decision_tree_classification_predict_types.h"
27 #include "algorithms/decision_tree/decision_tree_classification_model.h"
28 #include "algorithms/classifier/classifier_predict.h"
29 #include "data_management/data/homogen_numeric_table.h"
35 namespace decision_tree
37 namespace classification
53 template<
typename algorithmFPType, Method method, CpuType cpu>
54 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
61 BatchContainer(daal::services::Environment::env *daalEnv);
68 services::Status compute() DAAL_C11_OVERRIDE;
87 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
88 class Batch :
public classifier::prediction::Batch
91 typedef classifier::prediction::Batch super;
93 typedef algorithms::decision_tree::classification::prediction::Input InputType;
94 typedef algorithms::decision_tree::classification::Parameter ParameterType;
95 typedef typename super::ResultType ResultType;
98 ParameterType parameter;
101 Batch() : classifier::prediction::Batch(), input(), parameter()
112 Batch(
const Batch<algorithmFPType, method> & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter)
121 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
127 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
134 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
136 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
140 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
142 return new Batch<algorithmFPType, method>(*this);
145 services::Status allocateResult() DAAL_C11_OVERRIDE
147 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, (int)method);
148 _res = _result.get();
155 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
163 using interface1::BatchContainer;
164 using interface1::Batch;
daal
Definition: algorithm_base_common.h:31
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_tree_classification_predict.h:134
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_tree::classification::prediction::interface1::Batch::input
InputType input
Definition: decision_tree_classification_predict.h:97
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: decision_tree_classification_predict.h:121
daal::batch
Definition: daal_defines.h:106
daal::algorithms::decision_tree::classification::prediction::interface1::Batch
Provides methods to run implementations of the Decision tree model-based prediction.
Definition: decision_tree_classification_predict.h:88
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_tree_classification_predict.h:127
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:76
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_tree_classification_predict.h:112
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::Batch
Batch()
Definition: decision_tree_classification_predict.h:101
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: decision_tree_classification_predict.h:98
daal::algorithms::decision_tree::classification::prediction::interface1::BatchContainer
Class containing computation methods for Decision tree model-based prediction.
Definition: decision_tree_classification_predict.h:54