22 #ifndef __STUMP_PREDICT_H__
23 #define __STUMP_PREDICT_H__
25 #include "algorithms/algorithm.h"
26 #include "algorithms/weak_learner/weak_learner_predict.h"
27 #include "algorithms/stump/stump_predict_types.h"
68 template<
typename algorithmFPType, Method method, CpuType cpu>
69 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
76 BatchContainer(daal::services::Environment::env *daalEnv);
82 services::Status compute() DAAL_C11_OVERRIDE;
105 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
106 class Batch :
public weak_learner::prediction::Batch
109 typedef weak_learner::prediction::Batch super;
111 typedef algorithms::stump::prediction::Input InputType;
112 typedef typename super::ParameterType ParameterType;
113 typedef typename super::ResultType ResultType;
128 Batch(
const Batch<algorithmFPType, method> &other) : weak_learner::prediction::Batch(other), input(other.input)
139 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
145 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
152 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
154 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
158 using weak_learner::prediction::Batch::_result;
160 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
162 return new Batch<algorithmFPType, method>(*this);
165 services::Status allocateResult() DAAL_C11_OVERRIDE
167 services::Status s = _result->allocate<algorithmFPType>(&input, 0, 0);
168 _res = _result.get();
175 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
180 using interface1::BatchContainer;
181 using interface1::Batch;
daal
Definition: algorithm_base_common.h:31
daal::algorithms::stump::prediction::interface1::BatchContainer
Provides methods to run implementations of the decision stump prediction algorithm. It is associated with the daal::algorithms::stump::prediction::interface1::Batch class and supports methods to run based on the decision stump model.
Definition: stump_predict.h:69
daal::algorithms::stump::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: stump_predict.h:145
daal::algorithms::stump::prediction::interface1::Batch
Predicts results of the decision stump classification.
Definition: stump_predict.h:106
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:40
daal::algorithms::stump::prediction::interface1::Batch::input
InputType input
Definition: stump_predict.h:115
daal::algorithms::stump::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: stump_predict.h:152
daal::algorithms::stump::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: stump_predict.h:128
daal::batch
Definition: daal_defines.h:106
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:76
daal::algorithms::stump::prediction::defaultDense
Definition: stump_predict.h:51
daal::algorithms::stump::prediction::Method
Method
Definition: stump_predict.h:49
daal::algorithms::stump::prediction::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: stump_predict.h:139