24 #ifndef __DECISION_TREE_CLASSIFICATION_PREDICT_H__
25 #define __DECISION_TREE_CLASSIFICATION_PREDICT_H__
27 #include "algorithms/algorithm.h"
28 #include "algorithms/decision_tree/decision_tree_classification_predict_types.h"
29 #include "algorithms/decision_tree/decision_tree_classification_model.h"
30 #include "algorithms/classifier/classifier_predict.h"
31 #include "data_management/data/homogen_numeric_table.h"
37 namespace decision_tree
39 namespace classification
55 template<
typename algorithmFPType, Method method, CpuType cpu>
56 class BatchContainer :
public PredictionContainerIface
63 DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv);
65 DAAL_DEPRECATED ~BatchContainer();
70 DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE;
89 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
90 class Batch :
public classifier::prediction::interface1::Batch
93 typedef classifier::prediction::interface1::Batch super;
95 typedef algorithms::decision_tree::classification::prediction::Input InputType;
96 typedef algorithms::decision_tree::classification::interface1::Parameter ParameterType;
97 typedef typename super::ResultType ResultType;
100 ParameterType parameter;
103 DAAL_DEPRECATED Batch() : classifier::prediction::interface1::Batch(), input(), parameter()
114 DAAL_DEPRECATED Batch(
const Batch<algorithmFPType, method> & other) : classifier::prediction::interface1::Batch(other), input(other.input), parameter(other.parameter)
123 DAAL_DEPRECATED InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
129 DAAL_DEPRECATED_VIRTUAL
virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
136 DAAL_DEPRECATED services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
138 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
142 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
144 return new Batch<algorithmFPType, method>(*this);
147 services::Status allocateResult() DAAL_C11_OVERRIDE
149 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, (int)method);
150 _res = _result.get();
157 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
177 template<
typename algorithmFPType, Method method, CpuType cpu>
178 class BatchContainer :
public PredictionContainerIface
185 BatchContainer(daal::services::Environment::env *daalEnv);
192 services::Status compute() DAAL_C11_OVERRIDE;
211 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
212 class Batch :
public classifier::prediction::Batch
215 typedef classifier::prediction::Batch super;
217 typedef algorithms::decision_tree::classification::prediction::Input InputType;
218 typedef algorithms::decision_tree::classification::Parameter ParameterType;
219 typedef typename super::ResultType ResultType;
222 ParameterType parameter;
225 Batch(
size_t nClasses = 2) : classifier::prediction::Batch(), input(), parameter(nClasses)
236 Batch(
const Batch<algorithmFPType, method> & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter)
245 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
251 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
258 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
260 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
264 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
266 return new Batch<algorithmFPType, method>(*this);
269 services::Status allocateResult() DAAL_C11_OVERRIDE
271 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, (int)method);
272 _res = _result.get();
279 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
287 using interface2::BatchContainer;
288 using interface2::Batch;
daal::algorithms::decision_tree::classification::prediction::interface2::Batch::parameter
ParameterType parameter
Definition: decision_tree_classification_predict.h:222
daal::algorithms::decision_tree::classification::prediction::interface2::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_tree_classification_predict.h:251
daal::batch
Definition: daal_defines.h:112
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::Batch
DAAL_DEPRECATED Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_tree_classification_predict.h:114
daal::algorithms::decision_tree::classification::prediction::interface2::BatchContainer
Class containing computation methods for Decision tree model-based prediction.
Definition: decision_tree_classification_predict.h:178
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::decision_tree::classification::prediction::interface2::Batch
Provides methods to run implementations of the Decision tree model-based prediction.
Definition: decision_tree_classification_predict.h:212
daal::algorithms::decision_tree::classification::prediction::interface1::BatchContainer::BatchContainer
DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::decision_tree::classification::prediction::interface2::Batch::input
InputType input
Definition: decision_tree_classification_predict.h:221
daal::algorithms::decision_tree::classification::interface1::Parameter
Decision tree algorithm parameters.
Definition: decision_tree_classification_model.h:84
daal::algorithms::decision_tree::classification::prediction::interface1::BatchContainer::compute
DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::decision_tree::classification::prediction::interface2::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::classifier::prediction::interface1::Input
Input objects in the prediction stage of the classification algorithm.
Definition: classifier_predict_types.h:111
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::Batch
DAAL_DEPRECATED Batch()
Definition: decision_tree_classification_predict.h:103
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::input
InputType input
Definition: decision_tree_classification_predict.h:99
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:42
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::getInput
DAAL_DEPRECATED InputType * getInput() DAAL_C11_OVERRIDE
Definition: decision_tree_classification_predict.h:123
daal::algorithms::classifier::prediction::interface1::Result
Provides methods to access prediction results obtained with the compute() method of the classifier pr...
Definition: classifier_predict_types.h:168
daal::algorithms::decision_tree::classification::prediction::interface2::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::classifier::interface1::Parameter
Base class for the parameters of the classification algorithm.
Definition: classifier_model.h:69
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::clone
DAAL_DEPRECATED services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_tree_classification_predict.h:136
daal::algorithms::decision_tree::classification::prediction::interface2::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_tree_classification_predict.h:258
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: decision_tree_classification_predict.h:100
daal::algorithms::decision_tree::classification::prediction::interface2::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_tree_classification_predict.h:236
daal::algorithms::decision_tree::classification::prediction::interface2::Batch::Batch
Batch(size_t nClasses=2)
Definition: decision_tree_classification_predict.h:225
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:90
daal::algorithms::decision_tree::classification::prediction::interface2::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: decision_tree_classification_predict.h:245
daal::algorithms::decision_tree::classification::prediction::interface1::Batch::getMethod
virtual DAAL_DEPRECATED_VIRTUAL int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_tree_classification_predict.h:129
daal::algorithms::decision_tree::classification::prediction::interface1::BatchContainer
Class containing computation methods for Decision tree model-based prediction.
Definition: decision_tree_classification_predict.h:56
daal::algorithms::classifier::prediction::interface1::Batch
Base class for making predictions based on the model of the classification algorithms.
Definition: classifier_predict.h:61