48 #ifndef __STUMP_PREDICT_H__ 49 #define __STUMP_PREDICT_H__ 51 #include "algorithms/algorithm.h" 52 #include "algorithms/weak_learner/weak_learner_predict.h" 53 #include "algorithms/stump/stump_predict_types.h" 94 template<
typename algorithmFPType, Method method, CpuType cpu>
95 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
102 BatchContainer(daal::services::Environment::env *daalEnv);
108 services::Status compute() DAAL_C11_OVERRIDE;
131 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
132 class Batch :
public weak_learner::prediction::Batch
135 typedef weak_learner::prediction::Batch super;
137 typedef algorithms::stump::prediction::Input InputType;
138 typedef typename super::ParameterType ParameterType;
139 typedef typename super::ResultType ResultType;
154 Batch(
const Batch<algorithmFPType, method> &other) : weak_learner::prediction::Batch(other), input(other.input)
165 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
171 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
178 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const 180 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
184 using weak_learner::prediction::Batch::_result;
186 virtual Batch<algorithmFPType, method> * cloneImpl()
const DAAL_C11_OVERRIDE
188 return new Batch<algorithmFPType, method>(*this);
191 services::Status allocateResult() DAAL_C11_OVERRIDE
193 services::Status s = _result->allocate<algorithmFPType>(&input, 0, 0);
194 _res = _result.get();
201 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
206 using interface1::BatchContainer;
207 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::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::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:95
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:79
daal::algorithms::stump::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: stump_predict.h:171
daal::algorithms::stump::prediction::interface1::Batch
Predicts results of the decision stump classification.
Definition: stump_predict.h:132
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:66
daal::algorithms::stump::prediction::interface1::Batch::input
InputType input
Definition: stump_predict.h:141
daal::algorithms::weak_learner::prediction::interface1::Batch
Base class for making predictions based on the weak learner model
Definition: weak_learner_predict.h:96
daal::algorithms::stump::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: stump_predict.h:154
daal::batch
Definition: daal_defines.h:132
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::stump::prediction::Method
Method
Definition: stump_predict.h:75
daal::algorithms::stump::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: stump_predict.h:178
daal::algorithms::stump::prediction::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: stump_predict.h:165
daal::algorithms::stump::prediction::defaultDense
Definition: stump_predict.h:77