24 #ifndef __STUMP_PREDICT_H__
25 #define __STUMP_PREDICT_H__
27 #include "algorithms/algorithm.h"
28 #include "algorithms/weak_learner/weak_learner_predict.h"
29 #include "algorithms/stump/stump_predict_types.h"
70 template<
typename algorithmFPType, Method method, CpuType cpu>
71 class BatchContainer :
public PredictionContainerIface
78 BatchContainer(daal::services::Environment::env *daalEnv);
84 services::Status compute() DAAL_C11_OVERRIDE;
107 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
108 class Batch :
public weak_learner::prediction::Batch
111 typedef weak_learner::prediction::Batch super;
113 typedef algorithms::stump::prediction::Input InputType;
114 typedef typename super::ParameterType ParameterType;
115 typedef typename super::ResultType ResultType;
130 Batch(
const Batch<algorithmFPType, method> &other) : weak_learner::prediction::Batch(other), input(other.input)
141 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
147 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
154 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
156 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
160 using weak_learner::prediction::Batch::_result;
162 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
164 return new Batch<algorithmFPType, method>(*this);
167 services::Status allocateResult() DAAL_C11_OVERRIDE
169 services::Status s = _result->allocate<algorithmFPType>(&input, 0, 0);
170 _res = _result.get();
177 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
182 using interface1::BatchContainer;
183 using interface1::Batch;
daal::algorithms::stump::prediction::defaultDense
Definition: stump_predict.h:53
daal::batch
Definition: daal_defines.h:112
daal::algorithms::stump::prediction::interface1::Batch
Predicts results of the decision stump classification.
Definition: stump_predict.h:108
daal::algorithms::stump::prediction::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: stump_predict.h:141
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::stump::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: stump_predict.h:147
daal::algorithms::stump::prediction::interface1::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::stump::prediction::interface1::BatchContainer::~BatchContainer
~BatchContainer()
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::prediction::Method
Method
Definition: stump_predict.h:51
daal::algorithms::stump::prediction::interface1::Batch::input
InputType input
Definition: stump_predict.h:117
daal::algorithms::stump::prediction::interface1::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
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:71
daal::algorithms::stump::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: stump_predict.h:130
daal::algorithms::stump::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: stump_predict.h:154