C++ API Reference for Intel® Data Analytics Acceleration Library 2019 Update 5

linear_model_predict_types.h
1 /* file: linear_model_predict_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 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 regression algorithm interface
19 //--
20 */
21 
22 #ifndef __LINEAR_MODEL_PREDICT_TYPES_H__
23 #define __LINEAR_MODEL_PREDICT_TYPES_H__
24 
25 #include "data_management/data/numeric_table.h"
26 #include "algorithms/algorithm_types.h"
27 #include "algorithms/linear_model/linear_model_model.h"
28 #include "algorithms/regression/regression_predict_types.h"
29 
30 namespace daal
31 {
32 namespace algorithms
33 {
34 namespace linear_model
35 {
45 namespace prediction
46 {
51 enum Method
52 {
53  defaultDense = 0
54 };
55 
60 enum NumericTableInputId
61 {
62  data = regression::prediction::data,
63  lastNumericTableInputId = data
64 };
65 
70 enum ModelInputId
71 {
72  model = regression::prediction::model,
73  lastModelInputId = model
74 };
75 
80 enum ResultId
81 {
82  prediction = regression::prediction::prediction,
83  lastResultId = prediction
84 };
85 
89 namespace interface1
90 {
95 class DAAL_EXPORT Input : public regression::prediction::Input
96 {
97 public:
99  Input(size_t nElements = 0);
100  Input(const Input& other);
101 
107  data_management::NumericTablePtr get(NumericTableInputId id) const;
108 
114  linear_model::ModelPtr get(ModelInputId id) const;
115 
121  void set(NumericTableInputId id, const data_management::NumericTablePtr &value);
122 
128  void set(ModelInputId id, const linear_model::ModelPtr &value);
129 
135  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
136 };
137 
138 
143 class DAAL_EXPORT Result : public regression::prediction::Result
144 {
145 public:
146  DECLARE_SERIALIZABLE_CAST(Result);
147  Result(size_t nElements = 0);
148 
154  data_management::NumericTablePtr get(ResultId id) const;
155 
161  void set(ResultId id, const data_management::NumericTablePtr &value);
162 
171  template <typename algorithmFPType>
172  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
173 
182  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
183 
184 protected:
186  template<typename Archive, bool onDeserialize>
187  services::Status serialImpl(Archive *arch)
188  {
189  return regression::prediction::Result::serialImpl<Archive, onDeserialize>(arch);
190  }
191 };
192 typedef services::SharedPtr<Result> ResultPtr;
193 typedef services::SharedPtr<const Result> ResultConstPtr;
194 } // namespace interface1
195 using interface1::Input;
196 using interface1::Result;
197 using interface1::ResultPtr;
198 using interface1::ResultConstPtr;
199 }
201 }
202 }
203 }
204 
205 #endif
daal::algorithms::linear_model::prediction::NumericTableInputId
NumericTableInputId
Available identifiers of input numeric tables for making the regression model-based prediction...
Definition: linear_model_predict_types.h:60
daal::algorithms::linear_model::prediction::ResultId
ResultId
Available identifiers of the result for making the regression model-based prediction.
Definition: linear_model_predict_types.h:80
daal::algorithms::linear_model::prediction::interface1::Result
Provides interface for the result of the regression model-based prediction.
Definition: linear_model_predict_types.h:143
daal
Definition: algorithm_base_common.h:31
daal::algorithms::linear_model::prediction::interface1::Input
Provides an interface for input objects for making the regression model-based prediction.
Definition: linear_model_predict_types.h:95
daal::algorithms::linear_model::prediction::data
Definition: linear_model_predict_types.h:62
daal::algorithms::linear_model::prediction::ModelInputId
ModelInputId
Available identifiers of input models for making the regression model-based prediction.
Definition: linear_model_predict_types.h:70
daal::algorithms::linear_model::prediction::prediction
Definition: linear_model_predict_types.h:82
daal::algorithms::linear_model::prediction::Method
Method
Available methods for making the regression model-based prediction.
Definition: linear_model_predict_types.h:51
daal::algorithms::regression::prediction::prediction
Definition: regression_predict_types.h:72
daal::algorithms::linear_model::prediction::defaultDense
Definition: linear_model_predict_types.h:53
daal::algorithms::regression::prediction::data
Definition: regression_predict_types.h:52
daal::algorithms::linear_model::prediction::model
Definition: linear_model_predict_types.h:72
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::regression::prediction::model
Definition: regression_predict_types.h:62

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