23 #ifndef __MULTI_CLASS_CLASSIFIER_PREDICT_H__
24 #define __MULTI_CLASS_CLASSIFIER_PREDICT_H__
26 #include "algorithms/algorithm.h"
27 #include "data_management/data/numeric_table.h"
28 #include "services/daal_defines.h"
29 #include "algorithms/classifier/classifier_predict.h"
30 #include "algorithms/multi_class_classifier/multi_class_classifier_predict_types.h"
31 #include "algorithms/multi_class_classifier/multi_class_classifier_train_types.h"
37 namespace multi_class_classifier
63 template<
typename algorithmFPType, prediction::Method pmethod, training::Method tmethod, CpuType cpu>
64 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
72 BatchContainer(daal::services::Environment::env *daalEnv);
80 services::Status compute() DAAL_C11_OVERRIDE;
104 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, prediction::Method pmethod = defaultDense, training::Method tmethod = training::oneAgainstOne>
105 class Batch :
public classifier::prediction::Batch
108 typedef classifier::prediction::Batch super;
110 typedef algorithms::multi_class_classifier::prediction::Input InputType;
111 typedef algorithms::multi_class_classifier::Parameter ParameterType;
112 typedef typename super::ResultType ResultType;
115 ParameterType parameter;
121 DAAL_DEPRECATED Batch() : parameter(0)
130 Batch(
size_t nClasses) : parameter(nClasses)
141 Batch(
const Batch<algorithmFPType, pmethod, tmethod> &other) : classifier::prediction::Batch(other),
142 parameter(other.parameter), input(other.input)
153 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
159 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)pmethod; }
166 services::SharedPtr<Batch<algorithmFPType, pmethod, tmethod> > clone()
const
168 return services::SharedPtr<Batch<algorithmFPType, pmethod, tmethod> >(cloneImpl());
173 virtual Batch<algorithmFPType, pmethod, tmethod> * cloneImpl() const DAAL_C11_OVERRIDE
175 return new Batch<algorithmFPType, pmethod, tmethod>(*this);
178 services::Status allocateResult() DAAL_C11_OVERRIDE
180 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, (int) pmethod);
181 _res = _result.get();
188 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, pmethod, tmethod)(&_env);
194 using interface1::BatchContainer;
195 using interface1::Batch;
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: multi_class_classifier_predict.h:115
daal
Definition: algorithm_base_common.h:31
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:64
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::input
InputType input
Definition: multi_class_classifier_predict.h:114
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:40
daal::batch
Definition: daal_defines.h:110
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: multi_class_classifier_predict.h:159
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::Batch
DAAL_DEPRECATED Batch()
Definition: multi_class_classifier_predict.h:121
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, pmethod, tmethod > > clone() const
Definition: multi_class_classifier_predict.h:166
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:76
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::Batch
Batch(size_t nClasses)
Definition: multi_class_classifier_predict.h:130
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:105
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: multi_class_classifier_predict.h:153
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, pmethod, tmethod > &other)
Definition: multi_class_classifier_predict.h:141