C++ API Reference for Intel® Data Analytics Acceleration Library 2018 Update 3

linear_regression_predict_types.h
1 /* file: linear_regression_predict_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 /*
17 //++
18 // Implementation of the linear regression algorithm interface
19 //--
20 */
21 
22 #ifndef __LINEAR_REGRESSION_PREDICT_TYPES_H__
23 #define __LINEAR_REGRESSION_PREDICT_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "algorithms/linear_regression/linear_regression_model.h"
28 #include "algorithms/linear_model/linear_model_predict_types.h"
29 
30 namespace daal
31 {
32 namespace algorithms
33 {
37 namespace linear_regression
38 {
48 namespace prediction
49 {
54 enum Method
55 {
56  defaultDense = 0
57 };
58 
63 enum NumericTableInputId
64 {
65  data = linear_model::prediction::data,
66  lastNumericTableInputId = data
67 };
68 
73 enum ModelInputId
74 {
75  model = linear_model::prediction::model,
76  lastModelInputId = model
77 };
78 
83 enum ResultId
84 {
85  prediction = linear_model::prediction::prediction,
86  lastResultId = prediction
87 };
88 
92 namespace interface1
93 {
98 class DAAL_EXPORT Input : public linear_model::prediction::Input
99 {
100 public:
102  Input();
103 
109  data_management::NumericTablePtr get(NumericTableInputId id) const;
110 
116  linear_regression::ModelPtr get(ModelInputId id) const;
117 
123  void set(NumericTableInputId id, const data_management::NumericTablePtr &value);
124 
130  void set(ModelInputId id, const linear_regression::ModelPtr &value);
131 };
132 
137 class DAAL_EXPORT Result : public linear_model::prediction::Result
138 {
139 public:
140  DECLARE_SERIALIZABLE_CAST(Result);
141  Result();
142 
148  data_management::NumericTablePtr get(ResultId id) const;
149 
155  void set(ResultId id, const data_management::NumericTablePtr &value);
156 
157 protected:
159  template<typename Archive, bool onDeserialize>
160  services::Status serialImpl(Archive *arch)
161  {
162  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
163  }
164 };
165 typedef services::SharedPtr<Result> ResultPtr;
166 typedef services::SharedPtr<const Result> ResultConstPtr;
167 } // namespace interface1
168 using interface1::Input;
169 using interface1::Result;
170 using interface1::ResultPtr;
171 using interface1::ResultConstPtr;
172 }
174 }
175 }
176 } // namespace daal
177 #endif
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:98
daal
Definition: algorithm_base_common.h:31
daal::algorithms::linear_regression::prediction::Method
Method
Available methods for making linear regression model-based prediction.
Definition: linear_regression_predict_types.h:54
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:83
daal::algorithms::linear_regression::prediction::interface1::Result
Provides interface for the result of linear regression model-based prediction.
Definition: linear_regression_predict_types.h:137
daal::algorithms::linear_model::prediction::data
Definition: linear_model_predict_types.h:62
daal::algorithms::linear_regression::prediction::data
Definition: linear_regression_predict_types.h:65
daal::algorithms::linear_regression::prediction::model
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:63
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:73
daal::algorithms::linear_model::prediction::prediction
Definition: linear_model_predict_types.h:82
daal::algorithms::linear_model::prediction::model
Definition: linear_model_predict_types.h:72
daal::algorithms::linear_regression::prediction::prediction
Definition: linear_regression_predict_types.h:85
daal::algorithms::math::abs::value
Definition: abs_types.h:86

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