24 #ifndef __ADA_BOOST_PREDICT_H__
25 #define __ADA_BOOST_PREDICT_H__
27 #include "algorithms/algorithm.h"
28 #include "algorithms/boosting/boosting_predict.h"
29 #include "algorithms/boosting/adaboost_model.h"
30 #include "algorithms/boosting/adaboost_predict_types.h"
73 template<
typename algorithmFPType, Method method, CpuType cpu>
74 class BatchContainer :
public PredictionContainerIface
81 DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv);
83 DAAL_DEPRECATED~BatchContainer();
87 DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE;
110 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
111 class DAAL_EXPORT Batch :
public boosting::prediction::Batch
114 typedef boosting::prediction::Batch super;
116 typedef algorithms::adaboost::prediction::interface1::Input InputType;
117 typedef algorithms::adaboost::interface1::Parameter ParameterType;
118 typedef typename super::ResultType ResultType;
121 ParameterType parameter;
123 DAAL_DEPRECATED Batch()
134 DAAL_DEPRECATED Batch(
const Batch<algorithmFPType, method> &other) : boosting::prediction::Batch(other),
135 input(other.input), parameter(other.parameter)
140 DAAL_DEPRECATED ~Batch() {}
146 DAAL_DEPRECATED InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
152 DAAL_DEPRECATED_VIRTUAL
virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
159 DAAL_DEPRECATED services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
161 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
165 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
167 return new Batch<algorithmFPType, method>(*this);
170 services::Status allocateResult() DAAL_C11_OVERRIDE
172 services::Status s = _result->allocate<algorithmFPType>(&input, 0, 0);
173 _res = _result.get();
180 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
200 template<
typename algorithmFPType, Method method, CpuType cpu>
201 class BatchContainer :
public PredictionContainerIface
208 BatchContainer(daal::services::Environment::env *daalEnv);
214 services::Status compute() DAAL_C11_OVERRIDE;
236 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
237 class DAAL_EXPORT Batch :
public classifier::prediction::Batch
240 typedef classifier::prediction::Batch super;
242 typedef algorithms::adaboost::prediction::Input InputType;
243 typedef algorithms::adaboost::Parameter ParameterType;
244 typedef typename super::ResultType ResultType;
252 Batch(
size_t nClasses);
260 Batch(
const Batch<algorithmFPType, method> &other);
271 ParameterType& parameter() {
return *
static_cast<ParameterType*
>(_par); }
277 const ParameterType& parameter()
const {
return *
static_cast<const ParameterType*
>(_par); }
283 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
289 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
296 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
298 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
302 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
304 return new Batch<algorithmFPType, method>(*this);
307 services::Status allocateResult() DAAL_C11_OVERRIDE
309 services::Status s = _result->allocate<algorithmFPType>(&input, _par, 0);
310 _res = _result.get();
317 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
321 using interface2::Batch;
322 using interface2::BatchContainer;
daal::algorithms::adaboost::prediction::interface1::BatchContainer::BatchContainer
DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::adaboost::prediction::interface2::Batch
Predict AdaBoost classification results.
Definition: adaboost_predict.h:237
daal::batch
Definition: daal_defines.h:112
daal::algorithms::adaboost::prediction::interface1::Batch::Batch
DAAL_DEPRECATED Batch(const Batch< algorithmFPType, method > &other)
Definition: adaboost_predict.h:134
daal::algorithms::adaboost::prediction::interface1::BatchContainer
Provides methods to run implementations of the AdaBoost algorithm.
Definition: adaboost_predict.h:74
daal::algorithms::adaboost::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: adaboost_predict.h:121
daal::algorithms::adaboost::prediction::sammeR
Definition: adaboost_predict.h:56
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::adaboost::prediction::interface1::BatchContainer::compute
DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::adaboost::prediction::interface2::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::adaboost::prediction::interface1::Batch::getInput
DAAL_DEPRECATED InputType * getInput() DAAL_C11_OVERRIDE
Definition: adaboost_predict.h:146
daal::algorithms::adaboost::prediction::defaultDense
Definition: adaboost_predict.h:54
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:42
daal::algorithms::adaboost::interface1::Parameter
AdaBoost algorithm parameters.
Definition: adaboost_model.h:59
daal::algorithms::adaboost::prediction::interface2::BatchContainer
Provides methods to run implementations of the AdaBoost algorithm. It is associated with daal::algori...
Definition: adaboost_predict.h:201
daal::algorithms::adaboost::prediction::interface2::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::adaboost::prediction::interface2::Batch::parameter
ParameterType & parameter()
Definition: adaboost_predict.h:271
daal::algorithms::adaboost::prediction::interface2::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: adaboost_predict.h:289
daal::algorithms::adaboost::prediction::interface1::BatchContainer::~BatchContainer
DAAL_DEPRECATED ~BatchContainer()
daal::algorithms::adaboost::prediction::interface1::Input
Input objects in the prediction stage of the adaboost algorithm.
Definition: adaboost_predict_types.h:53
daal::algorithms::adaboost::prediction::interface2::Batch::input
InputType input
Definition: adaboost_predict.h:246
daal::algorithms::adaboost::prediction::interface1::Batch::getMethod
virtual DAAL_DEPRECATED_VIRTUAL int getMethod() const DAAL_C11_OVERRIDE
Definition: adaboost_predict.h:152
daal::algorithms::adaboost::prediction::samme
Definition: adaboost_predict.h:55
daal::algorithms::adaboost::prediction::interface2::BatchContainer::~BatchContainer
~BatchContainer()
daal::algorithms::adaboost::prediction::interface2::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: adaboost_predict.h:283
daal::algorithms::adaboost::prediction::Method
Method
Definition: adaboost_predict.h:52
daal::algorithms::adaboost::prediction::interface1::Batch
Predict AdaBoost classification results.
Definition: adaboost_predict.h:111
daal::algorithms::adaboost::prediction::interface2::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: adaboost_predict.h:296
daal::algorithms::adaboost::prediction::interface1::Batch::clone
DAAL_DEPRECATED services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: adaboost_predict.h:159
daal::algorithms::adaboost::prediction::interface1::Batch::input
InputType input
Definition: adaboost_predict.h:120
daal::algorithms::adaboost::prediction::interface2::Batch::parameter
const ParameterType & parameter() const
Definition: adaboost_predict.h:277