24 #ifndef __STUMP_CLASSIFICATION_PREDICT_H__
25 #define __STUMP_CLASSIFICATION_PREDICT_H__
27 #include "algorithms/algorithm.h"
28 #include "algorithms/classifier/classifier_predict.h"
29 #include "algorithms/stump/stump_classification_predict_types.h"
37 namespace classification
72 template<
typename algorithmFPType, Method method, CpuType cpu>
73 class BatchContainer :
public PredictionContainerIface
80 BatchContainer(daal::services::Environment::env *daalEnv);
86 services::Status compute() DAAL_C11_OVERRIDE;
109 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
110 class DAAL_EXPORT Batch :
public classifier::prediction::Batch
113 typedef classifier::prediction::Batch super;
115 typedef algorithms::stump::classification::prediction::Input InputType;
116 typedef typename super::ParameterType ParameterType;
117 typedef typename super::ResultType ResultType;
121 Batch(
size_t nClasses = 2);
129 Batch(
const Batch<algorithmFPType, method> &other);
140 ParameterType& parameter() {
return *
static_cast<ParameterType*
>(_par); }
146 const ParameterType& parameter()
const {
return *
static_cast<const ParameterType*
>(_par); }
152 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
158 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
165 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
167 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
171 using classifier::prediction::Batch::_result;
173 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
175 return new Batch<algorithmFPType, method>(*this);
178 services::Status allocateResult() DAAL_C11_OVERRIDE
180 services::Status s = _result->allocate<algorithmFPType>(&input, _par, (int)method);
181 _res = _result.get();
187 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
192 using interface1::BatchContainer;
193 using interface1::Batch;
daal::algorithms::stump::classification::prediction::interface1::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::batch
Definition: daal_defines.h:112
daal::algorithms::stump::classification::prediction::interface1::BatchContainer
Provides methods to run implementations of the decision stump prediction algorithm. It is associated with the daal::algorithms::stump::classification::prediction::interface1::Batch class and supports methods to run based on the decision stump model.
Definition: stump_classification_predict.h:73
daal::algorithms::stump::classification::prediction::interface1::Batch
Predicts results of the decision stump classification.
Definition: stump_classification_predict.h:110
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::stump::classification::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: stump_classification_predict.h:165
daal::algorithms::stump::classification::prediction::interface1::BatchContainer::~BatchContainer
~BatchContainer()
daal::algorithms::stump::classification::prediction::interface1::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::stump::classification::prediction::interface1::Batch::parameter
ParameterType & parameter()
Definition: stump_classification_predict.h:140
daal::algorithms::stump::classification::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: stump_classification_predict.h:158
daal::algorithms::stump::classification::prediction::Method
Method
Definition: stump_classification_predict.h:53
daal::algorithms::stump::classification::prediction::interface1::Batch::parameter
const ParameterType & parameter() const
Definition: stump_classification_predict.h:146
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:42
daal::algorithms::stump::classification::prediction::defaultDense
Definition: stump_classification_predict.h:55
daal::algorithms::stump::classification::prediction::interface1::Batch::input
InputType input
Definition: stump_classification_predict.h:119
daal::algorithms::stump::classification::prediction::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: stump_classification_predict.h:152