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

regression_training_types.h
1 /* file: regression_training_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 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 __REGRESSION_TRAINING_TYPES_H__
23 #define __REGRESSION_TRAINING_TYPES_H__
24 
25 #include "data_management/data/numeric_table.h"
26 #include "algorithms/algorithm_types.h"
27 #include "algorithms/regression/regression_model.h"
28 
29 namespace daal
30 {
31 namespace algorithms
32 {
33 namespace regression
34 {
44 namespace training
45 {
50 enum InputId
51 {
52  data,
53  dependentVariables,
54  lastInputId = dependentVariables
55 };
56 
61 enum ResultId
62 {
63  model,
64  lastResultId = model
65 };
66 
70 namespace interface1
71 {
76 class DAAL_EXPORT Input : public daal::algorithms::Input
77 {
78 public:
83  Input(size_t nElements);
84  Input(const Input& other);
85 
86  virtual ~Input() {}
87 
93  data_management::NumericTablePtr get(InputId id) const;
94 
100  void set(InputId id, const data_management::NumericTablePtr &value);
101 
109  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
110 };
111 
117 class DAAL_EXPORT PartialResult : public daal::algorithms::PartialResult
118 {
119  DECLARE_SERIALIZABLE_IMPL();
120 public:
121  DAAL_CAST_OPERATOR(PartialResult);
122 
127  PartialResult(size_t nElements = 0);
128 protected:
130  template<typename Archive, bool onDeserialize>
131  services::Status serialImpl(Archive *arch)
132  {
133  return daal::algorithms::PartialResult::serialImpl<Archive, onDeserialize>(arch);
134  }
135 };
136 
142 class DAAL_EXPORT Result : public daal::algorithms::Result
143 {
144  DECLARE_SERIALIZABLE_IMPL();
145 public:
146  DAAL_CAST_OPERATOR(Result);
147 
152  Result(size_t nElements = 0);
153 
159  regression::ModelPtr get(ResultId id) const;
160 
166  void set(ResultId id, const regression::ModelPtr &value);
167 
176  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
177 
178 protected:
180  template<typename Archive, bool onDeserialize>
181  services::Status serialImpl(Archive *arch)
182  {
183  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
184  }
185 };
186 typedef services::SharedPtr<Result> ResultPtr;
187 typedef services::SharedPtr<const Result> ResultConstPtr;
188 typedef services::SharedPtr<PartialResult> PartialResultPtr;
189 typedef services::SharedPtr<const PartialResult> PartialResultConstPtr;
190 }
191 using interface1::Input;
192 using interface1::Result;
193 using interface1::ResultPtr;
194 using interface1::ResultConstPtr;
195 using interface1::PartialResult;
196 using interface1::PartialResultPtr;
197 using interface1::PartialResultConstPtr;
198 }
200 }
201 }
202 }
203 #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:142
daal::algorithms::regression::training::interface1::Input
Input objects for the regression model-based training
Definition: regression_training_types.h:76
daal::algorithms::regression::training::InputId
InputId
Available identifiers of input objects for regression model-based training.
Definition: regression_training_types.h:50
daal
Definition: algorithm_base_common.h:31
daal::algorithms::regression::training::ResultId
ResultId
Available identifiers of the result of regression model-based training.
Definition: regression_training_types.h:61
daal::algorithms::regression::training::model
Definition: regression_training_types.h:63
daal::algorithms::regression::training::dependentVariables
Definition: regression_training_types.h:53
daal::algorithms::regression::training::data
Definition: regression_training_types.h:52
daal::algorithms::math::abs::value
Definition: abs_types.h:86
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:117

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