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

regression_predict_types.h
1 /* file: regression_predict_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2017 Intel Corporation
4 * All Rights Reserved.
5 *
6 * If this software was obtained under the Intel Simplified Software License,
7 * the following terms apply:
8 *
9 * The source code, information and material ("Material") contained herein is
10 * owned by Intel Corporation or its suppliers or licensors, and title to such
11 * Material remains with Intel Corporation or its suppliers or licensors. The
12 * Material contains proprietary information of Intel or its suppliers and
13 * licensors. The Material is protected by worldwide copyright laws and treaty
14 * provisions. No part of the Material may be used, copied, reproduced,
15 * modified, published, uploaded, posted, transmitted, distributed or disclosed
16 * in any way without Intel's prior express written permission. No license under
17 * any patent, copyright or other intellectual property rights in the Material
18 * is granted to or conferred upon you, either expressly, by implication,
19 * inducement, estoppel or otherwise. Any license under such intellectual
20 * property rights must be express and approved by Intel in writing.
21 *
22 * Unless otherwise agreed by Intel in writing, you may not remove or alter this
23 * notice or any other notice embedded in Materials by Intel or Intel's
24 * suppliers or licensors in any way.
25 *
26 *
27 * If this software was obtained under the Apache License, Version 2.0 (the
28 * "License"), the following terms apply:
29 *
30 * You may not use this file except in compliance with the License. You may
31 * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
32 *
33 *
34 * Unless required by applicable law or agreed to in writing, software
35 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
36 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37 *
38 * See the License for the specific language governing permissions and
39 * limitations under the License.
40 *******************************************************************************/
41 
42 /*
43 //++
44 // Implementation of the regression algorithm interface
45 //--
46 */
47 
48 #ifndef __REGRESSION_PREDICT_TYPES_H__
49 #define __REGRESSION_PREDICT_TYPES_H__
50 
51 #include "data_management/data/numeric_table.h"
52 #include "algorithms/algorithm_types.h"
53 #include "algorithms/regression/regression_model.h"
54 
55 namespace daal
56 {
57 namespace algorithms
58 {
59 namespace regression
60 {
70 namespace prediction
71 {
76 enum NumericTableInputId
77 {
78  data,
79  lastNumericTableInputId = data
80 };
81 
86 enum ModelInputId
87 {
88  model = lastNumericTableInputId + 1,
89  lastModelInputId = model
90 };
91 
96 enum ResultId
97 {
98  prediction,
99  lastResultId = prediction
100 };
101 
105 namespace interface1
106 {
111 class DAAL_EXPORT Input : public daal::algorithms::Input
112 {
113 public:
115  Input(size_t nElements = 0);
116  Input(const Input& other);
117 
123  data_management::NumericTablePtr get(NumericTableInputId id) const;
124 
130  regression::ModelPtr get(ModelInputId id) const;
131 
137  void set(NumericTableInputId id, const data_management::NumericTablePtr &value);
138 
144  void set(ModelInputId id, const regression::ModelPtr &value);
145 
151  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
152 };
153 
154 
159 class DAAL_EXPORT Result : public daal::algorithms::Result
160 {
161 public:
162  DECLARE_SERIALIZABLE_CAST(Result);
163  Result(size_t nElements = 0);
164 
170  data_management::NumericTablePtr get(ResultId id) const;
171 
177  void set(ResultId id, const data_management::NumericTablePtr &value);
178 
187  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
188 
189 protected:
191  template<typename Archive, bool onDeserialize>
192  services::Status serialImpl(Archive *arch)
193  {
194  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
195  }
196 };
197 typedef services::SharedPtr<Result> ResultPtr;
198 typedef services::SharedPtr<const Result> ResultConstPtr;
199 } // namespace interface1
200 using interface1::Input;
201 using interface1::Result;
202 using interface1::ResultPtr;
203 using interface1::ResultConstPtr;
204 }
206 }
207 }
208 }
209 
210 #endif
daal::algorithms::regression::prediction::interface1::Result
Provides interface for the result of the regression model-based prediction.
Definition: regression_predict_types.h:159
daal
Definition: algorithm_base_common.h:57
daal::algorithms::regression::prediction::ModelInputId
ModelInputId
Available identifiers of input models for making the regression model-based prediction.
Definition: regression_predict_types.h:86
daal::algorithms::regression::prediction::interface1::Input
Provides an interface for input objects for making the regression model-based prediction.
Definition: regression_predict_types.h:111
daal::algorithms::regression::prediction::prediction
Definition: regression_predict_types.h:98
daal::algorithms::regression::prediction::data
Definition: regression_predict_types.h:78
daal::algorithms::regression::prediction::NumericTableInputId
NumericTableInputId
Available identifiers of input numeric tables for making the regression model-based prediction...
Definition: regression_predict_types.h:76
daal::algorithms::math::abs::value
Definition: abs_types.h:112
daal::algorithms::regression::prediction::ResultId
ResultId
Available identifiers of the result for making the regression model-based prediction.
Definition: regression_predict_types.h:96
daal::algorithms::regression::prediction::model
Definition: regression_predict_types.h:88

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