C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

linear_regression_predict_types.h
1 /* file: linear_regression_predict_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2020 Intel Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *******************************************************************************/
17 
18 /*
19 //++
20 // Implementation of the linear regression algorithm interface
21 //--
22 */
23 
24 #ifndef __LINEAR_REGRESSION_PREDICT_TYPES_H__
25 #define __LINEAR_REGRESSION_PREDICT_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/numeric_table.h"
29 #include "algorithms/linear_regression/linear_regression_model.h"
30 #include "algorithms/linear_model/linear_model_predict_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
39 namespace linear_regression
40 {
50 namespace prediction
51 {
56 enum Method
57 {
58  defaultDense = 0
59 };
60 
65 enum NumericTableInputId
66 {
67  data = linear_model::prediction::data,
68  lastNumericTableInputId = data
69 };
70 
75 enum ModelInputId
76 {
77  model = linear_model::prediction::model,
78  lastModelInputId = model
79 };
80 
85 enum ResultId
86 {
87  prediction = linear_model::prediction::prediction,
88  lastResultId = prediction
89 };
90 
94 namespace interface1
95 {
100 class DAAL_EXPORT Input : public linear_model::prediction::Input
101 {
102 public:
104  Input();
105 
111  data_management::NumericTablePtr get(NumericTableInputId id) const;
112 
118  linear_regression::ModelPtr get(ModelInputId id) const;
119 
125  void set(NumericTableInputId id, const data_management::NumericTablePtr &value);
126 
132  void set(ModelInputId id, const linear_regression::ModelPtr &value);
133 };
134 
139 class DAAL_EXPORT Result : public linear_model::prediction::Result
140 {
141 public:
142  DECLARE_SERIALIZABLE_CAST(Result);
143  Result();
144 
150  data_management::NumericTablePtr get(ResultId id) const;
151 
157  void set(ResultId id, const data_management::NumericTablePtr &value);
158 
159 protected:
161  template<typename Archive, bool onDeserialize>
162  services::Status serialImpl(Archive *arch)
163  {
164  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
165  }
166 };
167 typedef services::SharedPtr<Result> ResultPtr;
168 typedef services::SharedPtr<const Result> ResultConstPtr;
169 } // namespace interface1
170 using interface1::Input;
171 using interface1::Result;
172 using interface1::ResultPtr;
173 using interface1::ResultConstPtr;
174 }
176 }
177 }
178 } // namespace daal
179 #endif
daal::algorithms::linear_model::prediction::data
Definition: linear_model_predict_types.h:64
daal::algorithms::linear_model::prediction::prediction
Definition: linear_model_predict_types.h:84
daal::algorithms::linear_regression::prediction::interface1::Result
Provides interface for the result of linear regression model-based prediction.
Definition: linear_regression_predict_types.h:139
daal::algorithms::linear_regression::prediction::Method
Method
Available methods for making linear regression model-based prediction.
Definition: linear_regression_predict_types.h:56
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::linear_regression::prediction::data
Definition: linear_regression_predict_types.h:67
daal::algorithms::linear_model::prediction::model
Definition: linear_model_predict_types.h:74
daal::algorithms::linear_regression::prediction::prediction
Definition: linear_regression_predict_types.h:87
daal::algorithms::linear_regression::prediction::interface1::Input
Provides an interface for input objects for making linear regression model-based prediction.
Definition: linear_regression_predict_types.h:100
daal::algorithms::linear_regression::prediction::model
Definition: linear_regression_predict_types.h:77
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::linear_regression::prediction::ModelInputId
ModelInputId
Available identifiers of input models for making linear regression model-based prediction.
Definition: linear_regression_predict_types.h:75
daal::algorithms::linear_regression::prediction::NumericTableInputId
NumericTableInputId
Available identifiers of input numeric tables for making linear regression model-based prediction...
Definition: linear_regression_predict_types.h:65
daal::algorithms::linear_regression::prediction::ResultId
ResultId
Available identifiers of the result for making linear regression model-based prediction.
Definition: linear_regression_predict_types.h:85

For more complete information about compiler optimizations, see our Optimization Notice.