22 #ifndef __GBT_CLASSIFICATION_PREDICT_H__
23 #define __GBT_CLASSIFICATION_PREDICT_H__
25 #include "algorithms/algorithm.h"
26 #include "algorithms/classifier/classifier_predict.h"
27 #include "algorithms/gradient_boosted_trees/gbt_classification_model.h"
28 #include "algorithms/gradient_boosted_trees/gbt_classification_predict_types.h"
36 namespace classification
63 template<
typename algorithmFPType, Method method, CpuType cpu>
64 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
71 BatchContainer(daal::services::Environment::env *daalEnv);
78 services::Status compute() DAAL_C11_OVERRIDE;
101 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
102 class DAAL_EXPORT Batch :
public classifier::prediction::Batch
105 typedef classifier::prediction::Batch super;
107 typedef algorithms::gbt::classification::prediction::Input InputType;
108 typedef algorithms::gbt::classification::prediction::Parameter ParameterType;
109 typedef typename super::ResultType ResultType;
117 Batch(
size_t nClasses);
125 Batch(
const Batch<algorithmFPType, method> &other);
137 ParameterType& parameter() {
return *
static_cast<ParameterType*
>(_par); }
143 const ParameterType& parameter()
const {
return *
static_cast<const ParameterType*
>(_par); }
149 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
155 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
162 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
164 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
168 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
170 return new Batch<algorithmFPType, method>(*this);
173 services::Status allocateResult() DAAL_C11_OVERRIDE
175 services::Status s = _result->allocate<algorithmFPType>(&input, 0, 0);
176 _res = _result.get();
183 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
188 using interface1::BatchContainer;
189 using interface1::Batch;
daal
Definition: algorithm_base_common.h:31
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:40
daal::algorithms::gbt::classification::prediction::interface1::Batch::~Batch
~Batch()
Definition: gbt_classification_predict.h:128
daal::batch
Definition: daal_defines.h:106
daal::algorithms::gbt::classification::prediction::interface1::Batch::parameter
ParameterType & parameter()
Definition: gbt_classification_predict.h:137
daal::algorithms::gbt::classification::prediction::interface1::BatchContainer
Provides methods to run implementations of the gradient boosted trees algorithm. This class is associ...
Definition: gbt_classification_predict.h:64
daal::algorithms::gbt::classification::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: gbt_classification_predict.h:162
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:76
daal::algorithms::gbt::classification::prediction::interface1::Batch::parameter
const ParameterType & parameter() const
Definition: gbt_classification_predict.h:143
daal::algorithms::gbt::classification::prediction::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: gbt_classification_predict.h:149
daal::algorithms::gbt::classification::prediction::interface1::Batch::input
InputType input
Definition: gbt_classification_predict.h:111
daal::algorithms::gbt::classification::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: gbt_classification_predict.h:155
daal::algorithms::gbt::classification::prediction::interface1::Batch
Predicts gradient boosted trees classification results.
Definition: gbt_classification_predict.h:102