24 #ifndef __GBT_CLASSIFICATION_PREDICT_H__
25 #define __GBT_CLASSIFICATION_PREDICT_H__
27 #include "algorithms/algorithm.h"
28 #include "algorithms/classifier/classifier_predict.h"
29 #include "algorithms/gradient_boosted_trees/gbt_classification_model.h"
30 #include "algorithms/gradient_boosted_trees/gbt_classification_predict_types.h"
38 namespace classification
65 template<
typename algorithmFPType, Method method, CpuType cpu>
66 class BatchContainer :
public PredictionContainerIface
73 DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv);
75 DAAL_DEPRECATED ~BatchContainer();
80 DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE;
103 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
104 class DAAL_EXPORT Batch :
public classifier::prediction::interface1::Batch
107 typedef classifier::prediction::interface1::Batch super;
109 typedef algorithms::gbt::classification::prediction::Input InputType;
110 typedef algorithms::gbt::classification::prediction::interface1::Parameter ParameterType;
111 typedef typename super::ResultType ResultType;
119 DAAL_DEPRECATED Batch(
size_t nClasses);
127 DAAL_DEPRECATED Batch(
const Batch<algorithmFPType, method> &other);
130 DAAL_DEPRECATED ~Batch()
139 DAAL_DEPRECATED ParameterType& parameter() {
return *
static_cast<ParameterType*
>(_par); }
145 DAAL_DEPRECATED
const ParameterType& parameter()
const {
return *
static_cast<const ParameterType*
>(_par); }
151 DAAL_DEPRECATED InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
157 DAAL_DEPRECATED_VIRTUAL
virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
164 DAAL_DEPRECATED services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
166 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
170 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
172 return new Batch<algorithmFPType, method>(*this);
175 services::Status allocateResult() DAAL_C11_OVERRIDE
177 services::Status s = _result->allocate<algorithmFPType>(&input, _par, 0);
178 _res = _result.get();
185 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
205 template<
typename algorithmFPType, Method method, CpuType cpu>
206 class BatchContainer :
public PredictionContainerIface
213 BatchContainer(daal::services::Environment::env *daalEnv);
220 services::Status compute() DAAL_C11_OVERRIDE;
243 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
244 class DAAL_EXPORT Batch :
public classifier::prediction::Batch
247 typedef classifier::prediction::Batch super;
249 typedef algorithms::gbt::classification::prediction::Input InputType;
250 typedef algorithms::gbt::classification::prediction::Parameter ParameterType;
251 typedef typename super::ResultType ResultType;
259 Batch(
size_t nClasses);
267 Batch(
const Batch<algorithmFPType, method> &other);
279 ParameterType& parameter() {
return *
static_cast<ParameterType*
>(_par); }
285 const ParameterType& parameter()
const {
return *
static_cast<const ParameterType*
>(_par); }
291 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
297 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
304 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
306 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
310 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
312 return new Batch<algorithmFPType, method>(*this);
315 services::Status allocateResult() DAAL_C11_OVERRIDE
317 services::Status s = _result->allocate<algorithmFPType>(&input, _par, 0);
318 _res = _result.get();
325 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
330 using interface2::BatchContainer;
331 using interface2::Batch;
daal::algorithms::gbt::classification::prediction::interface1::BatchContainer
Provides methods to run implementations of the gradient boosted trees algorithm.
Definition: gbt_classification_predict.h:66
daal::algorithms::gbt::classification::prediction::interface2::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::gbt::classification::prediction::interface1::Batch::input
InputType input
Definition: gbt_classification_predict.h:113
daal::algorithms::gbt::classification::prediction::interface2::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: gbt_classification_predict.h:291
daal::algorithms::gbt::classification::prediction::interface2::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: gbt_classification_predict.h:304
daal::batch
Definition: daal_defines.h:112
daal::algorithms::gbt::classification::prediction::interface2::Batch::~Batch
~Batch()
Definition: gbt_classification_predict.h:270
daal::algorithms::gbt::classification::prediction::interface1::BatchContainer::BatchContainer
DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::gbt::classification::prediction::interface2::BatchContainer::~BatchContainer
~BatchContainer()
daal::algorithms::gbt::classification::prediction::interface2::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: gbt_classification_predict.h:297
daal::algorithms::gbt::classification::prediction::interface1::Batch::parameter
DAAL_DEPRECATED const ParameterType & parameter() const
Definition: gbt_classification_predict.h:145
daal::algorithms::gbt::classification::prediction::interface1::Batch::~Batch
DAAL_DEPRECATED ~Batch()
Definition: gbt_classification_predict.h:130
daal::algorithms::classifier::prediction::interface1::Input
Input objects in the prediction stage of the classification algorithm.
Definition: classifier_predict_types.h:111
daal::algorithms::gbt::classification::prediction::interface2::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::gbt::classification::prediction::interface1::Batch::getMethod
virtual DAAL_DEPRECATED_VIRTUAL int getMethod() const DAAL_C11_OVERRIDE
Definition: gbt_classification_predict.h:157
daal::algorithms::gbt::classification::prediction::interface1::Batch::getInput
DAAL_DEPRECATED InputType * getInput() DAAL_C11_OVERRIDE
Definition: gbt_classification_predict.h:151
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:42
daal::algorithms::gbt::classification::prediction::interface2::Batch
Predicts gradient boosted trees classification results.
Definition: gbt_classification_predict.h:244
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:168
daal::algorithms::gbt::classification::prediction::interface2::Batch::parameter
ParameterType & parameter()
Definition: gbt_classification_predict.h:279
daal::algorithms::gbt::classification::prediction::interface2::Batch::parameter
const ParameterType & parameter() const
Definition: gbt_classification_predict.h:285
daal::algorithms::gbt::classification::prediction::interface2::BatchContainer
Provides methods to run implementations of the gradient boosted trees algorithm. This class is associ...
Definition: gbt_classification_predict.h:206
daal::algorithms::classifier::interface1::Parameter
Base class for the parameters of the classification algorithm.
Definition: classifier_model.h:69
daal::algorithms::gbt::classification::prediction::interface1::Parameter
Parameters of the prediction algorithm.
Definition: gbt_classification_predict_types.h:73
daal::algorithms::gbt::classification::prediction::interface1::Batch::clone
DAAL_DEPRECATED services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: gbt_classification_predict.h:164
daal::algorithms::gbt::classification::prediction::interface1::Batch::parameter
DAAL_DEPRECATED ParameterType & parameter()
Definition: gbt_classification_predict.h:139
daal::algorithms::gbt::classification::prediction::interface1::Batch
Predicts gradient boosted trees classification results.
Definition: gbt_classification_predict.h:104
daal::algorithms::gbt::classification::prediction::interface1::BatchContainer::~BatchContainer
DAAL_DEPRECATED ~BatchContainer()
daal::algorithms::gbt::classification::prediction::interface2::Batch::input
InputType input
Definition: gbt_classification_predict.h:253
daal::algorithms::classifier::prediction::interface1::Batch
Base class for making predictions based on the model of the classification algorithms.
Definition: classifier_predict.h:61
daal::algorithms::gbt::classification::prediction::interface1::BatchContainer::compute
DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE