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

regression_training_types.h
1 /* file: regression_training_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_TRAINING_TYPES_H__
49 #define __REGRESSION_TRAINING_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 training
71 {
76 enum InputId
77 {
78  data,
79  dependentVariables,
80  lastInputId = dependentVariables
81 };
82 
87 enum ResultId
88 {
89  model,
90  lastResultId = model
91 };
92 
96 namespace interface1
97 {
102 class DAAL_EXPORT Input : public daal::algorithms::Input
103 {
104 public:
109  Input(size_t nElements);
110  Input(const Input& other);
111 
112  virtual ~Input() {}
113 
119  data_management::NumericTablePtr get(InputId id) const;
120 
126  void set(InputId id, const data_management::NumericTablePtr &value);
127 
135  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
136 };
137 
143 class DAAL_EXPORT PartialResult : public daal::algorithms::PartialResult
144 {
145  DECLARE_SERIALIZABLE_IMPL();
146 public:
147  DAAL_CAST_OPERATOR(PartialResult);
148 
153  PartialResult(size_t nElements = 0);
154 protected:
156  template<typename Archive, bool onDeserialize>
157  services::Status serialImpl(Archive *arch)
158  {
159  return daal::algorithms::PartialResult::serialImpl<Archive, onDeserialize>(arch);
160  }
161 };
162 
168 class DAAL_EXPORT Result : public daal::algorithms::Result
169 {
170  DECLARE_SERIALIZABLE_IMPL();
171 public:
172  DAAL_CAST_OPERATOR(Result);
173 
178  Result(size_t nElements = 0);
179 
185  regression::ModelPtr get(ResultId id) const;
186 
192  void set(ResultId id, const regression::ModelPtr &value);
193 
202  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
203 
204 protected:
206  template<typename Archive, bool onDeserialize>
207  services::Status serialImpl(Archive *arch)
208  {
209  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
210  }
211 };
212 typedef services::SharedPtr<Result> ResultPtr;
213 typedef services::SharedPtr<const Result> ResultConstPtr;
214 typedef services::SharedPtr<PartialResult> PartialResultPtr;
215 typedef services::SharedPtr<const PartialResult> PartialResultConstPtr;
216 }
217 using interface1::Input;
218 using interface1::Result;
219 using interface1::ResultPtr;
220 using interface1::ResultConstPtr;
221 using interface1::PartialResult;
222 using interface1::PartialResultPtr;
223 using interface1::PartialResultConstPtr;
224 }
226 }
227 }
228 }
229 #endif
daal::algorithms::regression::training::interface1::Result
Provides methods to access the result obtained with the compute() method of the regression model-base...
Definition: regression_training_types.h:168
daal::algorithms::regression::training::interface1::Input
Input objects for the regression model-based training
Definition: regression_training_types.h:102
daal::algorithms::regression::training::InputId
InputId
Available identifiers of input objects for regression model-based training.
Definition: regression_training_types.h:76
daal
Definition: algorithm_base_common.h:57
daal::algorithms::regression::training::ResultId
ResultId
Available identifiers of the result of regression model-based training.
Definition: regression_training_types.h:87
daal::algorithms::regression::training::model
Definition: regression_training_types.h:89
daal::algorithms::regression::training::dependentVariables
Definition: regression_training_types.h:79
daal::algorithms::regression::training::data
Definition: regression_training_types.h:78
daal::algorithms::math::abs::value
Definition: abs_types.h:112
daal::algorithms::regression::training::interface1::PartialResult
Provides methods to access a partial result obtained with the compute() method of the regression mode...
Definition: regression_training_types.h:143

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