24 #ifndef __LINEAR_REGRESSION_PREDICT_H__
25 #define __LINEAR_REGRESSION_PREDICT_H__
27 #include "algorithms/algorithm.h"
28 #include "services/daal_defines.h"
29 #include "algorithms/linear_regression/linear_regression_predict_types.h"
30 #include "algorithms/linear_model/linear_model_predict.h"
36 namespace linear_regression
67 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
87 template<
typename algorithmFPType>
88 class Batch<algorithmFPType, defaultDense> :
public linear_model::prediction::Batch<algorithmFPType, linear_model::prediction::defaultDense>
91 typedef algorithms::linear_regression::prediction::Input InputType;
92 typedef algorithms::linear_regression::Parameter ParameterType;
93 typedef algorithms::linear_regression::prediction::Result ResultType;
109 Batch(
const Batch<algorithmFPType, defaultDense> &other) : input(other.input)
118 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)defaultDense; }
124 ResultPtr getResult() {
return ResultType::cast(this->_result); }
131 services::SharedPtr<Batch<algorithmFPType, defaultDense> > clone()
const
133 return services::SharedPtr<Batch<algorithmFPType, defaultDense> >(cloneImpl());
136 virtual regression::prediction::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
140 virtual Batch<algorithmFPType, defaultDense> * cloneImpl() const DAAL_C11_OVERRIDE
142 return new Batch<algorithmFPType, defaultDense>(*this);
145 services::Status allocateResult() DAAL_C11_OVERRIDE
147 services::Status s = getResult()->template allocate<algorithmFPType>(this->_in, 0, 0);
148 this->_res = this->_result.get();
154 this->_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, linear_model::prediction::BatchContainer, algorithmFPType, linear_model::prediction::defaultDense)(&(this->_env));
157 this->_result.reset(
new ResultType());
162 using interface1::Batch;
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::Batch
Batch()
Definition: linear_regression_predict.h:98
daal::batch
Definition: daal_defines.h:112
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::clone
services::SharedPtr< Batch< algorithmFPType, defaultDense > > clone() const
Definition: linear_regression_predict.h:131
daal::algorithms::linear_regression::prediction::interface1::Batch
Provides methods to run implementations of the linear regression model-based prediction.
Definition: linear_regression_predict.h:68
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::input
InputType input
Definition: linear_regression_predict.h:95
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::getResult
ResultPtr getResult()
Definition: linear_regression_predict.h:124
daal::algorithms::association_rules::defaultDense
Definition: apriori_types.h:53
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: linear_regression_predict.h:118
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::Batch
Batch(const Batch< algorithmFPType, defaultDense > &other)
Definition: linear_regression_predict.h:109
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >
Provides methods to run implementations of the linear regression model-based prediction.
Definition: linear_regression_predict.h:88
daal::algorithms::linear_model::prediction::defaultDense
Definition: linear_model_predict_types.h:55