49 #ifndef __MULTI_CLASS_CLASSIFIER_PREDICT_H__ 50 #define __MULTI_CLASS_CLASSIFIER_PREDICT_H__ 52 #include "algorithms/algorithm.h" 53 #include "data_management/data/numeric_table.h" 54 #include "services/daal_defines.h" 55 #include "algorithms/classifier/classifier_predict.h" 56 #include "algorithms/multi_class_classifier/multi_class_classifier_predict_types.h" 57 #include "algorithms/multi_class_classifier/multi_class_classifier_train_types.h" 63 namespace multi_class_classifier
89 template<
typename algorithmFPType, prediction::Method pmethod, training::Method tmethod, CpuType cpu>
90 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
98 BatchContainer(daal::services::Environment::env *daalEnv);
106 services::Status compute() DAAL_C11_OVERRIDE;
130 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, prediction::Method pmethod = defaultDense, training::Method tmethod = training::oneAgainstOne>
131 class Batch :
public classifier::prediction::Batch
134 typedef classifier::prediction::Batch super;
136 typedef algorithms::multi_class_classifier::prediction::Input InputType;
137 typedef algorithms::multi_class_classifier::Parameter ParameterType;
138 typedef typename super::ResultType ResultType;
141 ParameterType parameter;
147 DAAL_DEPRECATED Batch() : parameter(0)
156 Batch(
size_t nClasses) : parameter(nClasses)
167 Batch(
const Batch<algorithmFPType, pmethod, tmethod> &other) : classifier::prediction::Batch(other),
168 parameter(other.parameter), input(other.input)
179 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
185 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)pmethod; }
192 services::SharedPtr<Batch<algorithmFPType, pmethod, tmethod> > clone()
const 194 return services::SharedPtr<Batch<algorithmFPType, pmethod, tmethod> >(cloneImpl());
199 virtual Batch<algorithmFPType, pmethod, tmethod> * cloneImpl()
const DAAL_C11_OVERRIDE
201 return new Batch<algorithmFPType, pmethod, tmethod>(*this);
204 services::Status allocateResult() DAAL_C11_OVERRIDE
206 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, (int) pmethod);
207 _res = _result.get();
214 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, pmethod, tmethod)(&_env);
220 using interface1::BatchContainer;
221 using interface1::Batch;
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:190
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: multi_class_classifier_predict.h:141
daal::services::interface1::Environment::_envStruct
The environment structure.
Definition: env_detect.h:95
daal::services::interface1::Status
Class that holds the results of API calls. In case of API routine failure it contains the list of err...
Definition: error_handling.h:491
daal
Definition: algorithm_base_common.h:57
daal::algorithms::classifier::interface1::Parameter
Base class for the parameters of the classification algorithm.
Definition: classifier_model.h:81
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:90
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::input
InputType input
Definition: multi_class_classifier_predict.h:140
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:79
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:104
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:66
daal::algorithms::classifier::prediction::interface1::Batch
Base class for making predictions based on the model of the classification algorithms.
Definition: classifier_predict.h:85
daal::batch
Definition: daal_defines.h:132
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: multi_class_classifier_predict.h:185
daal::services::interface1::SharedPtr
Shared pointer that retains shared ownership of an object through a pointer. Several SharedPtr object...
Definition: daal_shared_ptr.h:187
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, pmethod, tmethod > > clone() const
Definition: multi_class_classifier_predict.h:192
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::Batch
Batch(size_t nClasses)
Definition: multi_class_classifier_predict.h:156
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:131
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: multi_class_classifier_predict.h:179
daal::algorithms::multi_class_classifier::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, pmethod, tmethod > &other)
Definition: multi_class_classifier_predict.h:167