24 #ifndef __LOGIT_BOOST_PREDICT_H__
25 #define __LOGIT_BOOST_PREDICT_H__
27 #include "algorithms/algorithm.h"
28 #include "algorithms/boosting/boosting_predict.h"
29 #include "algorithms/boosting/logitboost_model.h"
30 #include "algorithms/boosting/logitboost_predict_types.h"
31 #include "algorithms/classifier/classifier_predict.h"
72 template<
typename algorithmFPType, Method method, CpuType cpu>
73 class BatchContainer :
public PredictionContainerIface
80 DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv);
82 DAAL_DEPRECATED ~BatchContainer();
86 DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE;
109 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
110 class DAAL_EXPORT Batch :
public boosting::prediction::Batch
113 typedef boosting::prediction::Batch super;
115 typedef algorithms::logitboost::prediction::interface1::Input InputType;
116 typedef algorithms::logitboost::interface1::Parameter ParameterType;
117 typedef typename super::ResultType ResultType;
120 ParameterType parameter;
126 DAAL_DEPRECATED Batch(
size_t nClasses)
129 parameter.nClasses = nClasses;
138 DAAL_DEPRECATED Batch(
const Batch<algorithmFPType, method> &other) : boosting::prediction::Batch(other),
139 input(other.input), parameter(other.parameter)
144 DAAL_DEPRECATED ~Batch() {}
150 DAAL_DEPRECATED InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
156 DAAL_DEPRECATED_VIRTUAL
virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
163 DAAL_DEPRECATED services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
165 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
169 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
171 return new Batch<algorithmFPType, method>(*this);
174 services::Status allocateResult() DAAL_C11_OVERRIDE
176 services::Status s = _result->allocate<algorithmFPType>(&input, 0, 0);
177 _res = _result.get();
184 _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);
219 services::Status compute() DAAL_C11_OVERRIDE;
242 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
243 class DAAL_EXPORT Batch :
public classifier::prediction::Batch
246 typedef classifier::prediction::Batch super;
248 typedef algorithms::logitboost::prediction::Input InputType;
249 typedef algorithms::logitboost::Parameter ParameterType;
250 typedef typename super::ResultType ResultType;
258 Batch(
size_t nClasses);
266 Batch(
const Batch<algorithmFPType, method> &other);
277 ParameterType& parameter() {
return *
static_cast<ParameterType*
>(_par); }
283 const ParameterType& parameter()
const {
return *
static_cast<const ParameterType*
>(_par); }
289 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
295 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
302 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
304 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
308 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
310 return new Batch<algorithmFPType, method>(*this);
313 services::Status allocateResult() DAAL_C11_OVERRIDE
315 services::Status s = _result->allocate<algorithmFPType>(&input, _par, 0);
316 _res = _result.get();
323 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
328 using interface2::Batch;
329 using interface2::BatchContainer;
daal::algorithms::logitboost::prediction::interface1::BatchContainer::BatchContainer
DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::logitboost::prediction::interface1::Batch::input
InputType input
Definition: logitboost_predict.h:119
daal::batch
Definition: daal_defines.h:112
daal::algorithms::logitboost::prediction::interface2::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: logitboost_predict.h:295
daal::algorithms::logitboost::prediction::interface2::Batch::parameter
ParameterType & parameter()
Definition: logitboost_predict.h:277
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::logitboost::prediction::interface2::Batch::input
InputType input
Definition: logitboost_predict.h:252
daal::algorithms::logitboost::prediction::interface2::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: logitboost_predict.h:302
daal::algorithms::logitboost::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: logitboost_predict.h:120
daal::algorithms::logitboost::prediction::interface2::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::logitboost::prediction::Method
Method
Definition: logitboost_predict.h:53
daal::algorithms::logitboost::prediction::defaultDense
Definition: logitboost_predict.h:55
daal::algorithms::logitboost::prediction::interface1::Batch::getInput
DAAL_DEPRECATED InputType * getInput() DAAL_C11_OVERRIDE
Definition: logitboost_predict.h:150
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:42
daal::algorithms::logitboost::prediction::interface1::Batch::getMethod
virtual DAAL_DEPRECATED_VIRTUAL int getMethod() const DAAL_C11_OVERRIDE
Definition: logitboost_predict.h:156
daal::algorithms::logitboost::prediction::interface2::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::logitboost::prediction::interface1::BatchContainer
Provides methods to run implementations of the LogitBoost algorithm.
Definition: logitboost_predict.h:73
daal::algorithms::logitboost::prediction::interface1::BatchContainer::compute
DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::logitboost::prediction::interface1::Batch::Batch
DAAL_DEPRECATED Batch(const Batch< algorithmFPType, method > &other)
Definition: logitboost_predict.h:138
daal::algorithms::logitboost::prediction::interface1::Input
Input objects in the prediction stage of the logitboost algorithm.
Definition: logitboost_predict_types.h:61
daal::algorithms::logitboost::prediction::interface1::Batch::clone
DAAL_DEPRECATED services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: logitboost_predict.h:163
daal::algorithms::logitboost::prediction::interface2::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: logitboost_predict.h:289
daal::algorithms::logitboost::prediction::interface2::BatchContainer::~BatchContainer
~BatchContainer()
daal::algorithms::logitboost::prediction::interface2::Batch
Predicts LogitBoost classification results.
Definition: logitboost_predict.h:243
daal::algorithms::logitboost::prediction::interface1::Batch
Predicts LogitBoost classification results.
Definition: logitboost_predict.h:110
daal::algorithms::logitboost::interface1::Parameter
LogitBoost algorithm parameters.
Definition: logitboost_model.h:61
daal::algorithms::logitboost::prediction::interface1::Batch::Batch
DAAL_DEPRECATED Batch(size_t nClasses)
Definition: logitboost_predict.h:126
daal::algorithms::logitboost::prediction::interface2::BatchContainer
Provides methods to run implementations of the LogitBoost algorithm. This class is associated with da...
Definition: logitboost_predict.h:206
daal::algorithms::logitboost::prediction::interface2::Batch::parameter
const ParameterType & parameter() const
Definition: logitboost_predict.h:283
daal::algorithms::logitboost::prediction::interface1::BatchContainer::~BatchContainer
DAAL_DEPRECATED ~BatchContainer()