48 #ifndef __GBT_REGRESSION_PREDICT_H__
49 #define __GBT_REGRESSION_PREDICT_H__
51 #include "algorithms/algorithm.h"
52 #include "algorithms/gradient_boosted_trees/gbt_regression_predict_types.h"
53 #include "algorithms/regression/regression_predict.h"
76 template<
typename algorithmFPType, Method method, CpuType cpu>
77 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
84 BatchContainer(daal::services::Environment::env *daalEnv);
90 services::Status compute() DAAL_C11_OVERRIDE;
109 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
110 class Batch :
public algorithms::regression::prediction::Batch
118 _par =
new Parameter();
128 Batch(
const Batch<algorithmFPType, method> &other) : input(other.input)
130 _par =
new Parameter(other.parameter());
144 Parameter& parameter() {
return *
static_cast<Parameter*
>(_par); }
150 const Parameter& parameter()
const {
return *
static_cast<const Parameter*
>(_par); }
156 virtual algorithms::regression::prediction::Input* getInput() DAAL_C11_OVERRIDE{
return &input; }
162 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
168 ResultPtr getResult() {
return Result::cast(_result); }
175 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
177 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
182 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
184 return new Batch<algorithmFPType, method>(*this);
187 services::Status allocateResult() DAAL_C11_OVERRIDE
189 services::Status s = getResult()->template allocate<algorithmFPType>(_in, 0, 0);
190 _res = _result.get();
196 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
198 _result.reset(
new Result());
203 using interface1::BatchContainer;
204 using interface1::Batch;
daal::algorithms::gbt::regression::prediction::interface1::Batch::Batch
Batch()
Definition: gbt_regression_predict.h:116
daal::algorithms::gbt::regression::prediction::interface1::Batch::input
Input input
Definition: gbt_regression_predict.h:113
daal
Definition: algorithm_base_common.h:57
daal::algorithms::gbt::regression::prediction::interface1::Batch::getResult
ResultPtr getResult()
Definition: gbt_regression_predict.h:168
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:66
daal::algorithms::gbt::regression::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: gbt_regression_predict.h:162
daal::algorithms::gbt::regression::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: gbt_regression_predict.h:128
daal::algorithms::gbt::regression::prediction::interface1::Batch::parameter
const Parameter & parameter() const
Definition: gbt_regression_predict.h:150
daal::algorithms::gbt::regression::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: gbt_regression_predict.h:175
daal::batch
Definition: daal_defines.h:131
daal::algorithms::gbt::regression::prediction::interface1::Batch::getInput
virtual algorithms::regression::prediction::Input * getInput() DAAL_C11_OVERRIDE
Definition: gbt_regression_predict.h:156
daal::algorithms::gbt::regression::prediction::interface1::Batch::~Batch
~Batch()
Definition: gbt_regression_predict.h:135
daal::algorithms::gbt::regression::prediction::interface1::Batch
Provides methods to run implementations of the model-based prediction.
Definition: gbt_regression_predict.h:110
daal::algorithms::gbt::regression::prediction::interface1::Batch::parameter
Parameter & parameter()
Definition: gbt_regression_predict.h:144
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:102
daal::algorithms::gbt::regression::prediction::interface1::Parameter
Parameters of the prediction algorithm.
Definition: gbt_regression_predict_types.h:130
daal::algorithms::gbt::regression::prediction::interface1::BatchContainer
Class containing computation methods for model-based prediction.
Definition: gbt_regression_predict.h:77