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

linear_model_predict_types.h
1 /* file: linear_model_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 regression algorithm interface
21 //--
22 */
23 
24 #ifndef __LINEAR_MODEL_PREDICT_TYPES_H__
25 #define __LINEAR_MODEL_PREDICT_TYPES_H__
26 
27 #include "data_management/data/numeric_table.h"
28 #include "algorithms/algorithm_types.h"
29 #include "algorithms/linear_model/linear_model_model.h"
30 #include "algorithms/regression/regression_predict_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 namespace linear_model
37 {
47 namespace prediction
48 {
53 enum Method
54 {
55  defaultDense = 0
56 };
57 
62 enum NumericTableInputId
63 {
64  data = regression::prediction::data,
65  lastNumericTableInputId = data
66 };
67 
72 enum ModelInputId
73 {
74  model = regression::prediction::model,
75  lastModelInputId = model
76 };
77 
82 enum ResultId
83 {
84  prediction = regression::prediction::prediction,
85  lastResultId = prediction
86 };
87 
91 namespace interface1
92 {
97 class DAAL_EXPORT Input : public regression::prediction::Input
98 {
99 public:
101  Input(size_t nElements = 0);
102  Input(const Input& other);
103 
109  data_management::NumericTablePtr get(NumericTableInputId id) const;
110 
116  linear_model::ModelPtr get(ModelInputId id) const;
117 
123  void set(NumericTableInputId id, const data_management::NumericTablePtr &value);
124 
130  void set(ModelInputId id, const linear_model::ModelPtr &value);
131 
137  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
138 };
139 
140 
145 class DAAL_EXPORT Result : public regression::prediction::Result
146 {
147 public:
148  DECLARE_SERIALIZABLE_CAST(Result);
149  Result(size_t nElements = 0);
150 
156  data_management::NumericTablePtr get(ResultId id) const;
157 
163  void set(ResultId id, const data_management::NumericTablePtr &value);
164 
173  template <typename algorithmFPType>
174  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
175 
184  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
185 
186 protected:
188  template<typename Archive, bool onDeserialize>
189  services::Status serialImpl(Archive *arch)
190  {
191  return regression::prediction::Result::serialImpl<Archive, onDeserialize>(arch);
192  }
193 };
194 typedef services::SharedPtr<Result> ResultPtr;
195 typedef services::SharedPtr<const Result> ResultConstPtr;
196 } // namespace interface1
197 using interface1::Input;
198 using interface1::Result;
199 using interface1::ResultPtr;
200 using interface1::ResultConstPtr;
201 }
203 }
204 }
205 }
206 
207 #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:62
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:82
daal::algorithms::linear_model::prediction::Method
Method
Available methods for making the regression model-based prediction.
Definition: linear_model_predict_types.h:53
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::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::linear_model::prediction::model
Definition: linear_model_predict_types.h:74
daal::algorithms::regression::prediction::data
Definition: regression_predict_types.h:54
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:97
daal::algorithms::linear_model::prediction::defaultDense
Definition: linear_model_predict_types.h:55
daal::algorithms::regression::prediction::prediction
Definition: regression_predict_types.h:74
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::linear_model::prediction::interface1::Result
Provides interface for the result of the regression model-based prediction.
Definition: linear_model_predict_types.h:145
daal::algorithms::regression::prediction::model
Definition: regression_predict_types.h:64
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:72

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