22 #ifndef __LASSO_REGRESSION_PREDICT_H__
23 #define __LASSO_REGRESSION_PREDICT_H__
25 #include "algorithms/algorithm.h"
26 #include "services/daal_defines.h"
27 #include "algorithms/lasso_regression/lasso_regression_predict_types.h"
28 #include "algorithms/linear_model/linear_model_predict.h"
34 namespace lasso_regression
58 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
59 class Batch :
public linear_model::prediction::Batch<algorithmFPType, linear_model::prediction::defaultDense>
62 typedef linear_model::prediction::Batch<algorithmFPType, linear_model::prediction::defaultDense> super;
64 typedef algorithms::lasso_regression::prediction::Input InputType;
65 typedef typename super::ParameterType ParameterType;
66 typedef algorithms::lasso_regression::prediction::Result ResultType;
82 Batch(
const Batch<algorithmFPType, defaultDense> &other) : input(other.input)
91 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)defaultDense; }
97 ResultPtr getResult() {
return ResultType::cast(this->_result); }
104 services::SharedPtr<Batch<algorithmFPType, defaultDense> > clone()
const
106 return services::SharedPtr<Batch<algorithmFPType, defaultDense> >(cloneImpl());
109 virtual regression::prediction::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
113 virtual Batch<algorithmFPType, defaultDense> * cloneImpl() const DAAL_C11_OVERRIDE
115 return new Batch<algorithmFPType, defaultDense>(*this);
118 services::Status allocateResult() DAAL_C11_OVERRIDE
120 services::Status s = getResult()->template allocate<algorithmFPType>(this->_in, 0, 0);
121 this->_res = this->_result.get();
127 this->_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, linear_model::prediction::BatchContainer, algorithmFPType, linear_model::prediction::defaultDense)(&(this->_env));
130 this->_result.reset(
new ResultType());
135 using interface1::Batch;
daal::algorithms::lasso_regression::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, defaultDense > &other)
Definition: lasso_regression_predict.h:82
daal
Definition: algorithm_base_common.h:31
daal::algorithms::lasso_regression::prediction::interface1::Batch::getResult
ResultPtr getResult()
Definition: lasso_regression_predict.h:97
daal::algorithms::lasso_regression::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, defaultDense > > clone() const
Definition: lasso_regression_predict.h:104
daal::algorithms::lasso_regression::prediction::interface1::Batch
Provides methods to run implementations of the lasso regression model-based prediction.
Definition: lasso_regression_predict.h:59
daal::batch
Definition: daal_defines.h:110
daal::algorithms::lasso_regression::prediction::interface1::Batch::input
InputType input
Definition: lasso_regression_predict.h:68
daal::algorithms::lasso_regression::prediction::interface1::Batch::Batch
Batch()
Definition: lasso_regression_predict.h:71
daal::algorithms::linear_model::prediction::defaultDense
Definition: linear_model_predict_types.h:53
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:76
daal::algorithms::lasso_regression::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: lasso_regression_predict.h:91