48 #ifndef __LINEAR_REGRESSION_PREDICT_H__ 49 #define __LINEAR_REGRESSION_PREDICT_H__ 51 #include "algorithms/algorithm.h" 52 #include "services/daal_defines.h" 53 #include "algorithms/linear_regression/linear_regression_predict_types.h" 54 #include "algorithms/linear_model/linear_model_predict.h" 60 namespace linear_regression
91 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
111 template<
typename algorithmFPType>
112 class Batch<algorithmFPType, defaultDense> :
public linear_model::prediction::Batch<algorithmFPType, linear_model::prediction::defaultDense>
115 typedef algorithms::linear_regression::prediction::Input InputType;
116 typedef algorithms::linear_regression::Parameter ParameterType;
117 typedef algorithms::linear_regression::prediction::Result ResultType;
133 Batch(
const Batch<algorithmFPType, defaultDense> &other) : input(other.input)
142 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)defaultDense; }
148 ResultPtr getResult() {
return ResultType::cast(this->_result); }
155 services::SharedPtr<Batch<algorithmFPType, defaultDense> > clone()
const 157 return services::SharedPtr<Batch<algorithmFPType, defaultDense> >(cloneImpl());
160 virtual regression::prediction::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
164 virtual Batch<algorithmFPType, defaultDense> * cloneImpl()
const DAAL_C11_OVERRIDE
166 return new Batch<algorithmFPType, defaultDense>(*this);
169 services::Status allocateResult() DAAL_C11_OVERRIDE
171 services::Status s = getResult()->template allocate<algorithmFPType>(this->_in, 0, 0);
172 this->_res = this->_result.get();
178 this->_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, linear_model::prediction::BatchContainer, algorithmFPType, linear_model::prediction::defaultDense)(&(this->_env));
181 this->_result.reset(
new ResultType());
186 using interface1::Batch;
daal::algorithms::linear_model::prediction::interface1::Result
Provides interface for the result of the regression model-based prediction.
Definition: linear_model_predict_types.h:169
daal::services::interface1::Status
Class that holds the results of API calls. In case of API routine failure it contains the list of err...
Definition: error_handling.h:491
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::Batch
Batch()
Definition: linear_regression_predict.h:122
daal
Definition: algorithm_base_common.h:57
daal::algorithms::linear_model::prediction::interface1::BatchContainer
Class containing computation methods for the regression model-based prediction.
Definition: linear_model_predict.h:74
daal::algorithms::linear_model::prediction::interface1::Batch
Provides methods to run implementations of the regression model-based prediction. ...
Definition: linear_model_predict.h:107
daal::algorithms::association_rules::defaultDense
Definition: apriori_types.h:77
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:79
daal::algorithms::linear_regression::prediction::interface1::Result
Provides interface for the result of linear regression model-based prediction.
Definition: linear_regression_predict_types.h:163
daal::algorithms::linear_model::interface1::Parameter
Parameters for the regression algorithm.
Definition: linear_model_model.h:85
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: linear_regression_predict.h:142
daal::batch
Definition: daal_defines.h:132
daal::services::interface1::SharedPtr
Shared pointer that retains shared ownership of an object through a pointer. Several SharedPtr object...
Definition: daal_shared_ptr.h:187
daal::algorithms::linear_model::prediction::defaultDense
Definition: linear_model_predict_types.h:79
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::getResult
ResultPtr getResult()
Definition: linear_regression_predict.h:148
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::input
InputType input
Definition: linear_regression_predict.h:119
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::Batch
Batch(const Batch< algorithmFPType, defaultDense > &other)
Definition: linear_regression_predict.h:133
daal::algorithms::linear_regression::interface1::Parameter
Parameters for the linear regression algorithm.
Definition: linear_regression_model.h:82
daal::algorithms::linear_regression::prediction::interface1::Batch
Provides methods to run implementations of the linear regression model-based prediction.
Definition: linear_regression_predict.h:92
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:112
daal::algorithms::linear_regression::prediction::interface1::Batch< algorithmFPType, defaultDense >::clone
services::SharedPtr< Batch< algorithmFPType, defaultDense > > clone() const
Definition: linear_regression_predict.h:155