25 #ifndef __MULTI_CLASS_CLASSIFIER_PREDICT_H__
26 #define __MULTI_CLASS_CLASSIFIER_PREDICT_H__
28 #include "algorithms/algorithm.h"
29 #include "data_management/data/numeric_table.h"
30 #include "services/daal_defines.h"
31 #include "algorithms/classifier/classifier_predict.h"
32 #include "algorithms/multi_class_classifier/multi_class_classifier_predict_types.h"
33 #include "algorithms/multi_class_classifier/multi_class_classifier_train_types.h"
39 namespace multi_class_classifier
65 template<
typename algorithmFPType, prediction::Method pmethod, training::Method tmethod, CpuType cpu>
66 class BatchContainer :
public PredictionContainerIface
74 DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv);
76 DAAL_DEPRECATED ~BatchContainer();
82 DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE;
106 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, prediction::Method pmethod = defaultDense, training::Method tmethod = training::oneAgainstOne>
107 class Batch :
public classifier::prediction::interface1::Batch
110 typedef classifier::prediction::interface1::Batch super;
112 typedef algorithms::multi_class_classifier::prediction::Input InputType;
113 typedef algorithms::multi_class_classifier::interface1::Parameter ParameterType;
114 typedef typename super::ResultType ResultType;
117 ParameterType parameter;
123 DAAL_DEPRECATED Batch() : parameter(0)
132 DAAL_DEPRECATED Batch(
size_t nClasses) : parameter(nClasses)
143 DAAL_DEPRECATED Batch(
const Batch<algorithmFPType, pmethod, tmethod> &other) : classifier::prediction::interface1::Batch(other),
144 parameter(other.parameter), input(other.input)
149 DAAL_DEPRECATED_VIRTUAL
virtual ~Batch() {}
155 DAAL_DEPRECATED InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
161 DAAL_DEPRECATED_VIRTUAL
virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)pmethod; }
168 DAAL_DEPRECATED services::SharedPtr<Batch<algorithmFPType, pmethod, tmethod> > clone()
const
170 return services::SharedPtr<Batch<algorithmFPType, pmethod, tmethod> >(cloneImpl());
174 virtual Batch<algorithmFPType, pmethod, tmethod> * cloneImpl() const DAAL_C11_OVERRIDE
176 return new Batch<algorithmFPType, pmethod, tmethod>(*this);
179 services::Status allocateResult() DAAL_C11_OVERRIDE
181 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, (int) pmethod);
182 _res = _result.get();
189 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, pmethod, tmethod)(&_env);
214 template<
typename algorithmFPType, prediction::Method pmethod, training::Method tmethod, CpuType cpu>
215 class BatchContainer :
public PredictionContainerIface
223 BatchContainer(daal::services::Environment::env *daalEnv);
231 services::Status compute() DAAL_C11_OVERRIDE;
255 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, prediction::Method pmethod = defaultDense, training::Method tmethod = training::oneAgainstOne>
256 class Batch :
public classifier::prediction::Batch
259 typedef classifier::prediction::Batch super;
261 typedef algorithms::multi_class_classifier::prediction::Input InputType;
262 typedef algorithms::multi_class_classifier::Parameter ParameterType;
263 typedef typename super::ResultType ResultType;
266 ParameterType parameter;
272 DAAL_DEPRECATED Batch() : parameter(0)
281 Batch(
size_t nClasses) : parameter(nClasses)
292 Batch(
const Batch<algorithmFPType, pmethod, tmethod> &other) : classifier::prediction::Batch(other),
293 parameter(other.parameter), input(other.input)
304 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
310 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)pmethod; }
317 services::SharedPtr<Batch<algorithmFPType, pmethod, tmethod> > clone()
const
319 return services::SharedPtr<Batch<algorithmFPType, pmethod, tmethod> >(cloneImpl());
324 virtual Batch<algorithmFPType, pmethod, tmethod> * cloneImpl() const DAAL_C11_OVERRIDE
326 return new Batch<algorithmFPType, pmethod, tmethod>(*this);
329 services::Status allocateResult() DAAL_C11_OVERRIDE
331 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, (int) pmethod);
332 _res = _result.get();
339 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, pmethod, tmethod)(&_env);
345 using interface2::BatchContainer;
346 using interface2::Batch;
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: multi_class_classifier_predict.h:117
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::getInput
DAAL_DEPRECATED InputType * getInput() DAAL_C11_OVERRIDE
Definition: multi_class_classifier_predict.h:155
daal::algorithms::multi_class_classifier::prediction::interface1::BatchContainer::~BatchContainer
DAAL_DEPRECATED ~BatchContainer()
daal::batch
Definition: daal_defines.h:112
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::Batch
DAAL_DEPRECATED Batch()
Definition: multi_class_classifier_predict.h:123
daal::algorithms::multi_class_classifier::prediction::interface2::Batch::Batch
Batch(const Batch< algorithmFPType, pmethod, tmethod > &other)
Definition: multi_class_classifier_predict.h:292
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::Batch
DAAL_DEPRECATED Batch(const Batch< algorithmFPType, pmethod, tmethod > &other)
Definition: multi_class_classifier_predict.h:143
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::Batch
DAAL_DEPRECATED Batch(size_t nClasses)
Definition: multi_class_classifier_predict.h:132
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::input
InputType input
Definition: multi_class_classifier_predict.h:116
daal::algorithms::multi_class_classifier::prediction::interface2::Batch::Batch
Batch(size_t nClasses)
Definition: multi_class_classifier_predict.h:281
daal::algorithms::multi_class_classifier::prediction::interface2::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: multi_class_classifier_predict.h:310
daal::algorithms::classifier::prediction::interface1::Input
Input objects in the prediction stage of the classification algorithm.
Definition: classifier_predict_types.h:111
daal::algorithms::multi_class_classifier::prediction::interface2::Batch::clone
services::SharedPtr< Batch< algorithmFPType, pmethod, tmethod > > clone() const
Definition: multi_class_classifier_predict.h:317
daal::algorithms::multi_class_classifier::prediction::interface2::Batch::Batch
DAAL_DEPRECATED Batch()
Definition: multi_class_classifier_predict.h:272
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:42
daal::algorithms::multi_class_classifier::prediction::interface2::Batch
Provides methods to run implementations of the multi-class classifier prediction algorithm.
Definition: multi_class_classifier_predict.h:256
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::multi_class_classifier::prediction::interface1::BatchContainer
Provides methods to run implementations of the multi-class classifier prediction algorithm.
Definition: multi_class_classifier_predict.h:66
daal::algorithms::multi_class_classifier::prediction::interface2::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: multi_class_classifier_predict.h:304
daal::algorithms::multi_class_classifier::prediction::interface1::BatchContainer::BatchContainer
DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::multi_class_classifier::prediction::interface2::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::multi_class_classifier::prediction::interface1::Batch
Provides methods to run implementations of the multi-class classifier prediction algorithm.
Definition: multi_class_classifier_predict.h:107
daal::algorithms::classifier::interface1::Parameter
Base class for the parameters of the classification algorithm.
Definition: classifier_model.h:69
daal::algorithms::multi_class_classifier::interface1::Parameter
Optional multi-class classifier algorithm parameters that are used with the MultiClassClassifierWu pr...
Definition: multi_class_classifier_model.h:80
daal::algorithms::multi_class_classifier::prediction::interface2::BatchContainer::~BatchContainer
~BatchContainer()
daal::algorithms::multi_class_classifier::prediction::interface1::BatchContainer::compute
DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::multi_class_classifier::prediction::interface2::Batch::input
InputType input
Definition: multi_class_classifier_predict.h:265
daal::algorithms::multi_class_classifier::prediction::interface2::Batch::parameter
ParameterType parameter
Definition: multi_class_classifier_predict.h:266
daal::algorithms::multi_class_classifier::prediction::interface2::BatchContainer
Provides methods to run implementations of the multi-class classifier prediction algorithm.
Definition: multi_class_classifier_predict.h:215
daal::algorithms::multi_class_classifier::prediction::interface2::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::classifier::prediction::interface1::Batch
Base class for making predictions based on the model of the classification algorithms.
Definition: classifier_predict.h:61
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::clone
DAAL_DEPRECATED services::SharedPtr< Batch< algorithmFPType, pmethod, tmethod > > clone() const
Definition: multi_class_classifier_predict.h:168
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::getMethod
virtual DAAL_DEPRECATED_VIRTUAL int getMethod() const DAAL_C11_OVERRIDE
Definition: multi_class_classifier_predict.h:161