24 #ifndef __LASSO_REGRESSION_PREDICT_H__
25 #define __LASSO_REGRESSION_PREDICT_H__
27 #include "algorithms/algorithm.h"
28 #include "services/daal_defines.h"
29 #include "algorithms/lasso_regression/lasso_regression_predict_types.h"
30 #include "algorithms/linear_model/linear_model_predict.h"
36 namespace lasso_regression
60 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
61 class Batch :
public linear_model::prediction::Batch<algorithmFPType, linear_model::prediction::defaultDense>
64 typedef linear_model::prediction::Batch<algorithmFPType, linear_model::prediction::defaultDense> super;
66 typedef algorithms::lasso_regression::prediction::Input InputType;
67 typedef typename super::ParameterType ParameterType;
68 typedef algorithms::lasso_regression::prediction::Result ResultType;
84 Batch(
const Batch<algorithmFPType, defaultDense> &other) : input(other.input)
93 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)defaultDense; }
99 ResultPtr getResult() {
return ResultType::cast(this->_result); }
106 services::SharedPtr<Batch<algorithmFPType, defaultDense> > clone()
const
108 return services::SharedPtr<Batch<algorithmFPType, defaultDense> >(cloneImpl());
111 virtual regression::prediction::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
115 virtual Batch<algorithmFPType, defaultDense> * cloneImpl() const DAAL_C11_OVERRIDE
117 return new Batch<algorithmFPType, defaultDense>(*this);
120 services::Status allocateResult() DAAL_C11_OVERRIDE
122 services::Status s = getResult()->template allocate<algorithmFPType>(this->_in, 0, 0);
123 this->_res = this->_result.get();
129 this->_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, linear_model::prediction::BatchContainer, algorithmFPType, linear_model::prediction::defaultDense)(&(this->_env));
132 this->_result.reset(
new ResultType());
137 using interface1::Batch;
daal::batch
Definition: daal_defines.h:112
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::lasso_regression::prediction::interface1::Batch::Batch
Batch()
Definition: lasso_regression_predict.h:73
daal::algorithms::lasso_regression::prediction::interface1::Batch::input
InputType input
Definition: lasso_regression_predict.h:70
daal::algorithms::lasso_regression::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, defaultDense > &other)
Definition: lasso_regression_predict.h:84
daal::algorithms::lasso_regression::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: lasso_regression_predict.h:93
daal::algorithms::lasso_regression::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, defaultDense > > clone() const
Definition: lasso_regression_predict.h:106
daal::algorithms::linear_model::prediction::defaultDense
Definition: linear_model_predict_types.h:55
daal::algorithms::lasso_regression::prediction::interface1::Batch
Provides methods to run implementations of the lasso regression model-based prediction.
Definition: lasso_regression_predict.h:61
daal::algorithms::lasso_regression::prediction::interface1::Batch::getResult
ResultPtr getResult()
Definition: lasso_regression_predict.h:99