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

regression_training_types.h
1 /* file: regression_training_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_TRAINING_TYPES_H__
25 #define __REGRESSION_TRAINING_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 training
47 {
52 enum InputId
53 {
54  data = 0,
55  dependentVariables = 1,
56  weights = 4,
57  lastInputId = weights
58 };
59 
64 enum ResultId
65 {
66  model,
67  lastResultId = model
68 };
69 
73 namespace interface1
74 {
79 class DAAL_EXPORT Input : public daal::algorithms::Input
80 {
81 public:
86  Input(size_t nElements = lastInputId + 1);
87  Input(const Input& other);
88 
89  virtual ~Input() {}
90 
96  data_management::NumericTablePtr get(InputId id) const;
97 
103  void set(InputId id, const data_management::NumericTablePtr &value);
104 
112  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
113 };
114 
120 class DAAL_EXPORT PartialResult : public daal::algorithms::PartialResult
121 {
122  DECLARE_SERIALIZABLE_IMPL();
123 public:
124  DAAL_CAST_OPERATOR(PartialResult);
125 
130  PartialResult(size_t nElements = 0);
131 protected:
133  template<typename Archive, bool onDeserialize>
134  services::Status serialImpl(Archive *arch)
135  {
136  return daal::algorithms::PartialResult::serialImpl<Archive, onDeserialize>(arch);
137  }
138 };
139 
145 class DAAL_EXPORT Result : public daal::algorithms::Result
146 {
147  DECLARE_SERIALIZABLE_IMPL();
148 public:
149  DAAL_CAST_OPERATOR(Result);
150 
155  Result(size_t nElements = 0);
156 
162  regression::ModelPtr get(ResultId id) const;
163 
169  void set(ResultId id, const regression::ModelPtr &value);
170 
179  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
180 
181 protected:
183  template<typename Archive, bool onDeserialize>
184  services::Status serialImpl(Archive *arch)
185  {
186  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
187  }
188 };
189 typedef services::SharedPtr<Result> ResultPtr;
190 typedef services::SharedPtr<const Result> ResultConstPtr;
191 typedef services::SharedPtr<PartialResult> PartialResultPtr;
192 typedef services::SharedPtr<const PartialResult> PartialResultConstPtr;
193 }
194 using interface1::Input;
195 using interface1::Result;
196 using interface1::ResultPtr;
197 using interface1::ResultConstPtr;
198 using interface1::PartialResult;
199 using interface1::PartialResultPtr;
200 using interface1::PartialResultConstPtr;
201 }
203 }
204 }
205 }
206 #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:145
daal::algorithms::regression::training::interface1::Input
Input objects for the regression model-based training
Definition: regression_training_types.h:79
daal::algorithms::regression::training::ResultId
ResultId
Available identifiers of the result of regression model-based training.
Definition: regression_training_types.h:64
daal::algorithms::regression::training::dependentVariables
Definition: regression_training_types.h:55
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:120
daal::algorithms::regression::training::data
Definition: regression_training_types.h:54
daal::algorithms::regression::training::InputId
InputId
Available identifiers of input objects for regression model-based training.
Definition: regression_training_types.h:52
daal::algorithms::regression::training::model
Definition: regression_training_types.h:66
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::regression::training::weights
Definition: regression_training_types.h:56

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