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

regression_predict_types.h
1 /* file: 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 regression algorithm interface
21 //--
22 */
23 
24 #ifndef __REGRESSION_PREDICT_TYPES_H__
25 #define __REGRESSION_PREDICT_TYPES_H__
26 
27 #include "data_management/data/numeric_table.h"
28 #include "algorithms/algorithm_types.h"
29 #include "algorithms/regression/regression_model.h"
30 
31 namespace daal
32 {
33 namespace algorithms
34 {
35 namespace regression
36 {
46 namespace prediction
47 {
52 enum NumericTableInputId
53 {
54  data,
55  lastNumericTableInputId = data
56 };
57 
62 enum ModelInputId
63 {
64  model = lastNumericTableInputId + 1,
65  lastModelInputId = model
66 };
67 
72 enum ResultId
73 {
74  prediction,
75  lastResultId = prediction
76 };
77 
81 namespace interface1
82 {
87 class DAAL_EXPORT Input : public daal::algorithms::Input
88 {
89 public:
91  Input(size_t nElements = 0);
92  Input(const Input& other);
93 
99  data_management::NumericTablePtr get(NumericTableInputId id) const;
100 
106  regression::ModelPtr get(ModelInputId id) const;
107 
113  void set(NumericTableInputId id, const data_management::NumericTablePtr &value);
114 
120  void set(ModelInputId id, const regression::ModelPtr &value);
121 
127  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
128 };
129 
130 
135 class DAAL_EXPORT Result : public daal::algorithms::Result
136 {
137 public:
138  DECLARE_SERIALIZABLE_CAST(Result);
139  Result(size_t nElements = lastResultId + 1);
140 
146  data_management::NumericTablePtr get(ResultId id) const;
147 
153  void set(ResultId id, const data_management::NumericTablePtr &value);
154 
163  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
164 
165 protected:
167  template<typename Archive, bool onDeserialize>
168  services::Status serialImpl(Archive *arch)
169  {
170  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
171  }
172 };
173 typedef services::SharedPtr<Result> ResultPtr;
174 typedef services::SharedPtr<const Result> ResultConstPtr;
175 } // namespace interface1
176 using interface1::Input;
177 using interface1::Result;
178 using interface1::ResultPtr;
179 using interface1::ResultConstPtr;
180 }
182 }
183 }
184 }
185 
186 #endif
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::regression::prediction::data
Definition: regression_predict_types.h:54
daal::algorithms::regression::prediction::ModelInputId
ModelInputId
Available identifiers of input models for making the regression model-based prediction.
Definition: regression_predict_types.h:62
daal::algorithms::regression::prediction::NumericTableInputId
NumericTableInputId
Available identifiers of input numeric tables for making the regression model-based prediction...
Definition: regression_predict_types.h:52
daal::algorithms::regression::prediction::prediction
Definition: regression_predict_types.h:74
daal::algorithms::regression::prediction::ResultId
ResultId
Available identifiers of the result for making the regression model-based prediction.
Definition: regression_predict_types.h:72
daal::algorithms::regression::prediction::interface1::Input
Provides an interface for input objects for making the regression model-based prediction.
Definition: regression_predict_types.h:87
daal::algorithms::regression::prediction::interface1::Result
Provides interface for the result of the regression model-based prediction.
Definition: regression_predict_types.h:135
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::regression::prediction::model
Definition: regression_predict_types.h:64

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