22 #ifndef __SVM_PREDICT_H__
23 #define __SVM_PREDICT_H__
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "algorithms/classifier/classifier_predict.h"
28 #include "algorithms/svm/svm_predict_types.h"
57 template<
typename algorithmFPType, Method method, CpuType cpu>
58 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
65 BatchContainer(daal::services::Environment::env *daalEnv);
73 services::Status compute() DAAL_C11_OVERRIDE;
93 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
94 class Batch :
public classifier::prediction::Batch
97 typedef classifier::prediction::Batch super;
99 typedef algorithms::svm::prediction::Input InputType;
100 typedef algorithms::svm::Parameter ParameterType;
101 typedef typename super::ResultType ResultType;
104 ParameterType parameter;
118 Batch(
const Batch<algorithmFPType, method> &other) : classifier::prediction::Batch(other),
119 input(other.input), parameter(other.parameter)
130 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
136 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
144 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
146 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
151 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
153 return new Batch<algorithmFPType, method>(*this);
156 services::Status allocateResult() DAAL_C11_OVERRIDE
158 services::Status s = _result->allocate<algorithmFPType>(&input, 0, 0);
159 _res = _result.get();
166 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
172 using interface1::BatchContainer;
173 using interface1::Batch;
daal
Definition: algorithm_base_common.h:31
daal::algorithms::svm::prediction::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: svm_predict.h:130
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:40
daal::algorithms::svm::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: svm_predict.h:118
daal::batch
Definition: daal_defines.h:106
daal::algorithms::svm::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: svm_predict.h:104
daal::algorithms::svm::prediction::interface1::Batch::Batch
Batch()
Definition: svm_predict.h:107
daal::algorithms::svm::prediction::interface1::Batch
Algorithm class for making predictions based on the SVM model
Definition: svm_predict.h:94
daal::algorithms::svm::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: svm_predict.h:144
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:76
daal::algorithms::svm::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: svm_predict.h:136
daal::algorithms::svm::prediction::interface1::Batch::input
InputType input
Definition: svm_predict.h:103
daal::algorithms::svm::prediction::interface1::BatchContainer
Provides methods to run implementations of the SVM algorithm. It is associated with the Prediction cl...
Definition: svm_predict.h:58