24 #ifndef __BROWN_BOOST_PREDICT_H__
25 #define __BROWN_BOOST_PREDICT_H__
27 #include "algorithms/algorithm.h"
28 #include "algorithms/boosting/boosting_predict.h"
29 #include "algorithms/boosting/brownboost_model.h"
30 #include "algorithms/boosting/brownboost_predict_types.h"
70 template<
typename algorithmFPType, Method method, CpuType cpu>
71 class BatchContainer :
public PredictionContainerIface
78 DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv);
80 DAAL_DEPRECATED ~BatchContainer();
84 DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE;
106 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
107 class DAAL_EXPORT Batch :
public boosting::prediction::Batch
110 typedef boosting::prediction::Batch super;
112 typedef algorithms::brownboost::prediction::interface1::Input InputType;
113 typedef algorithms::brownboost::interface1::Parameter ParameterType;
114 typedef typename super::ResultType ResultType;
117 ParameterType parameter;
119 DAAL_DEPRECATED Batch()
130 DAAL_DEPRECATED Batch(
const Batch<algorithmFPType, method> &other) : boosting::prediction::Batch(other),
131 input(other.input), parameter(other.parameter)
136 DAAL_DEPRECATED ~Batch() {}
142 DAAL_DEPRECATED InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
148 DAAL_DEPRECATED_VIRTUAL
virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
155 DAAL_DEPRECATED services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
157 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
161 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
163 return new Batch<algorithmFPType, method>(*this);
166 services::Status allocateResult() DAAL_C11_OVERRIDE
168 services::Status s = _result->allocate<algorithmFPType>(&input, 0, 0);
169 _res = _result.get();
176 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
195 template<
typename algorithmFPType, Method method, CpuType cpu>
196 class BatchContainer :
public PredictionContainerIface
203 BatchContainer(daal::services::Environment::env *daalEnv);
209 services::Status compute() DAAL_C11_OVERRIDE;
230 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
231 class DAAL_EXPORT Batch :
public classifier::prediction::Batch
234 typedef classifier::prediction::Batch super;
236 typedef algorithms::brownboost::prediction::Input InputType;
237 typedef algorithms::brownboost::Parameter ParameterType;
238 typedef typename super::ResultType ResultType;
250 Batch(
const Batch<algorithmFPType, method> &other);
261 ParameterType& parameter() {
return *
static_cast<ParameterType*
>(_par); }
267 const ParameterType& parameter()
const {
return *
static_cast<const ParameterType*
>(_par); }
273 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
279 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
286 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
288 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
292 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
294 return new Batch<algorithmFPType, method>(*this);
297 services::Status allocateResult() DAAL_C11_OVERRIDE
299 services::Status s = _result->allocate<algorithmFPType>(&input, _par, 0);
300 _res = _result.get();
307 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
311 using interface2::Batch;
312 using interface2::BatchContainer;
daal::algorithms::brownboost::prediction::interface1::Batch::Batch
DAAL_DEPRECATED Batch(const Batch< algorithmFPType, method > &other)
Definition: brownboost_predict.h:130
daal::algorithms::brownboost::interface1::Parameter
BrownBoost algorithm parameters.
Definition: brownboost_model.h:60
daal::batch
Definition: daal_defines.h:112
daal::algorithms::brownboost::prediction::interface1::Input
Input objects in the prediction stage of the brownboost algorithm.
Definition: brownboost_predict_types.h:60
daal::algorithms::brownboost::prediction::interface1::Batch::getInput
DAAL_DEPRECATED InputType * getInput() DAAL_C11_OVERRIDE
Definition: brownboost_predict.h:142
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::brownboost::prediction::interface2::Batch
Predicts BrownBoost classification results.
Definition: brownboost_predict.h:231
daal::algorithms::brownboost::prediction::Method
Method
Definition: brownboost_predict.h:52
daal::algorithms::brownboost::prediction::interface2::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::brownboost::prediction::interface2::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: brownboost_predict.h:279
daal::algorithms::brownboost::prediction::defaultDense
Definition: brownboost_predict.h:54
daal::algorithms::brownboost::prediction::interface2::Batch::parameter
const ParameterType & parameter() const
Definition: brownboost_predict.h:267
daal::algorithms::brownboost::prediction::interface2::Batch::parameter
ParameterType & parameter()
Definition: brownboost_predict.h:261
daal::algorithms::brownboost::prediction::interface2::Batch::input
InputType input
Definition: brownboost_predict.h:240
daal::algorithms::brownboost::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: brownboost_predict.h:117
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:42
daal::algorithms::brownboost::prediction::interface2::BatchContainer
Provides methods to run implementations of the BrownBoost algorithm. This class is associated with da...
Definition: brownboost_predict.h:196
daal::algorithms::brownboost::prediction::interface1::Batch::getMethod
virtual DAAL_DEPRECATED_VIRTUAL int getMethod() const DAAL_C11_OVERRIDE
Definition: brownboost_predict.h:148
daal::algorithms::brownboost::prediction::interface1::BatchContainer::~BatchContainer
DAAL_DEPRECATED ~BatchContainer()
daal::algorithms::brownboost::prediction::interface2::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: brownboost_predict.h:286
daal::algorithms::brownboost::prediction::interface1::BatchContainer::BatchContainer
DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::brownboost::prediction::interface2::BatchContainer::~BatchContainer
~BatchContainer()
daal::algorithms::brownboost::prediction::interface1::Batch
Predicts BrownBoost classification results.
Definition: brownboost_predict.h:107
daal::algorithms::brownboost::prediction::interface1::BatchContainer::compute
DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::brownboost::prediction::interface1::BatchContainer
Provides methods to run implementations of the BrownBoost algorithm.
Definition: brownboost_predict.h:71
daal::algorithms::brownboost::prediction::interface2::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::brownboost::prediction::interface1::Batch::input
InputType input
Definition: brownboost_predict.h:116
daal::algorithms::brownboost::prediction::interface2::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: brownboost_predict.h:273
daal::algorithms::brownboost::prediction::interface1::Batch::clone
DAAL_DEPRECATED services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: brownboost_predict.h:155