24 #ifndef __RIDGE_REGRESSION_PREDICT_H__
25 #define __RIDGE_REGRESSION_PREDICT_H__
27 #include "algorithms/algorithm.h"
28 #include "services/daal_defines.h"
29 #include "algorithms/ridge_regression/ridge_regression_predict_types.h"
30 #include "algorithms/linear_model/linear_model_predict.h"
36 namespace ridge_regression
67 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
86 template<
typename algorithmFPType>
87 class Batch<algorithmFPType, defaultDense> :
public linear_model::prediction::Batch<algorithmFPType, linear_model::prediction::defaultDense>
90 typedef linear_model::prediction::Batch<algorithmFPType, linear_model::prediction::defaultDense> super;
92 typedef algorithms::ridge_regression::prediction::Input InputType;
93 typedef typename super::ParameterType ParameterType;
94 typedef algorithms::ridge_regression::prediction::Result ResultType;
110 Batch(
const Batch<algorithmFPType, defaultDense> &other) : input(other.input)
119 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)defaultDense; }
125 ResultPtr getResult() {
return ResultType::cast(this->_result); }
132 services::SharedPtr<Batch<algorithmFPType, defaultDense> > clone()
const
134 return services::SharedPtr<Batch<algorithmFPType, defaultDense> >(cloneImpl());
137 virtual regression::prediction::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
141 virtual Batch<algorithmFPType, defaultDense> * cloneImpl() const DAAL_C11_OVERRIDE
143 return new Batch<algorithmFPType, defaultDense>(*this);
146 services::Status allocateResult() DAAL_C11_OVERRIDE
148 services::Status s = getResult()->template allocate<algorithmFPType>(this->_in, 0, 0);
149 this->_res = this->_result.get();
155 this->_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, linear_model::prediction::BatchContainer, algorithmFPType, linear_model::prediction::defaultDense)(&(this->_env));
158 this->_result.reset(
new ResultType());
163 using interface1::Batch;
daal::algorithms::ridge_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::clone
services::SharedPtr< Batch< algorithmFPType, defaultDense > > clone() const
Definition: ridge_regression_predict.h:132
daal::algorithms::ridge_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::Batch
Batch()
Definition: ridge_regression_predict.h:99
daal::batch
Definition: daal_defines.h:112
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::ridge_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: ridge_regression_predict.h:119
daal::algorithms::ridge_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::getResult
ResultPtr getResult()
Definition: ridge_regression_predict.h:125
daal::algorithms::ridge_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::input
InputType input
Definition: ridge_regression_predict.h:96
daal::algorithms::ridge_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::Batch
Batch(const Batch< algorithmFPType, defaultDense > &other)
Definition: ridge_regression_predict.h:110
daal::algorithms::association_rules::defaultDense
Definition: apriori_types.h:53
daal::algorithms::linear_model::prediction::defaultDense
Definition: linear_model_predict_types.h:55
daal::algorithms::ridge_regression::prediction::interface1::Batch
Provides methods to run implementations of the ridge regression model-based prediction.
Definition: ridge_regression_predict.h:68
daal::algorithms::ridge_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >
Provides methods to run implementations of the ridge regression model-based prediction.
Definition: ridge_regression_predict.h:87