C++ API Reference for Intel® Data Analytics Acceleration Library 2019 Update 5

mse_types.h
1 /* file: mse_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 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 Mean squared error objective function interface.
19 //--
20 */
21 
22 #ifndef __MSE_TYPES_H__
23 #define __MSE_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "services/daal_defines.h"
28 #include "sum_of_functions_types.h"
29 
30 namespace daal
31 {
32 namespace algorithms
33 {
37 namespace optimization_solver
38 {
48 namespace mse
49 {
50 
55 enum InputId
56 {
57  argument = (int)sum_of_functions::argument,
58  data,
59  dependentVariables,
60  lastInputId = dependentVariables
61 };
62 
63 
68 enum OptionalInputId
69 {
70  optionalArgument = lastInputId + 1,
71  lastOptionalInputId = optionalArgument
72 };
73 
78 enum OptionalDataId
79 {
80  weights,
81  gramMatrix,
82  lastOptionalData = gramMatrix
83 };
84 
89 enum Method
90 {
91  defaultDense = 0
92 };
93 
97 namespace interface1
98 {
99 
105 struct DAAL_EXPORT Parameter : public sum_of_functions::interface1::Parameter
106 {
116  Parameter(size_t numberOfTerms,
117  data_management::NumericTablePtr batchIndices = data_management::NumericTablePtr(),
118  const DAAL_UINT64 resultsToCompute = objective_function::gradient);
119 
124  Parameter(const Parameter &other);
130  virtual services::Status check() const;
131 
132  virtual ~Parameter() {}
133 };
134 
139 class DAAL_EXPORT Input : public sum_of_functions::interface1::Input
140 {
141 public:
143  Input();
144 
146  Input(const Input& other);
147 
149  virtual ~Input() {}
150 
156  void set(InputId id, const data_management::NumericTablePtr &ptr);
157 
163  data_management::NumericTablePtr get(InputId id) const;
164 
170  algorithms::OptionalArgumentPtr get(OptionalInputId id) const;
171 
177  void set(OptionalInputId id, const algorithms::OptionalArgumentPtr &ptr);
178 
184  data_management::NumericTablePtr get(OptionalDataId id) const;
185 
191  void set(OptionalDataId id, const data_management::NumericTablePtr &ptr);
192 
200  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
201 };
203 } // namespace interface1
204 
208 namespace interface2
209 {
210 
217 /* [Parameter source code] */
218 struct DAAL_EXPORT Parameter : public sum_of_functions::Parameter
219 {
229  Parameter(size_t numberOfTerms,
230  data_management::NumericTablePtr batchIndices = data_management::NumericTablePtr(),
231  const DAAL_UINT64 resultsToCompute = objective_function::gradient);
232 
237  Parameter(const Parameter &other);
243  virtual services::Status check() const;
244 
245  virtual ~Parameter() {}
246  bool interceptFlag;
247  data_management::NumericTablePtr penaltyL1;
248  data_management::NumericTablePtr penaltyL2;
249 };
250 
255 class DAAL_EXPORT Input : public sum_of_functions::Input
256 {
257 public:
259  Input();
260 
262  Input(const Input& other);
263 
265  virtual ~Input() {}
266 
272  void set(InputId id, const data_management::NumericTablePtr &ptr);
273 
279  data_management::NumericTablePtr get(InputId id) const;
280 
286  algorithms::OptionalArgumentPtr get(OptionalInputId id) const;
287 
293  void set(OptionalInputId id, const algorithms::OptionalArgumentPtr &ptr);
294 
300  data_management::NumericTablePtr get(OptionalDataId id) const;
301 
307  void set(OptionalDataId id, const data_management::NumericTablePtr &ptr);
308 
316  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
317 };
318 /* [Parameter source code] */
319 }// namespace interface1
320 using interface2::Parameter;
321 using interface2::Input;
322 
323 } // namespace mse
324 } // namespace optimization_solver
325 } // namespace algorithm
326 } // namespace daal
327 #endif
daal::algorithms::optimization_solver::sum_of_functions::interface1::Input
Input objects for the Sum of functions
Definition: sum_of_functions_types.h:111
daal::algorithms::optimization_solver::mse::data
Definition: mse_types.h:58
daal::algorithms::optimization_solver::mse::interface2::Parameter::interceptFlag
bool interceptFlag
Definition: mse_types.h:246
daal
Definition: algorithm_base_common.h:31
daal::algorithms::optimization_solver::mse::interface2::Parameter
Parameter for Mean squared error objective function
Definition: mse_types.h:218
daal::algorithms::optimization_solver::mse::OptionalInputId
OptionalInputId
Definition: mse_types.h:68
daal::algorithms::optimization_solver::mse::interface2::Parameter::penaltyL1
data_management::NumericTablePtr penaltyL1
Definition: mse_types.h:247
daal::algorithms::optimization_solver::mse::weights
Definition: mse_types.h:80
daal::algorithms::optimization_solver::mse::argument
Definition: mse_types.h:57
daal_defines.h
daal::algorithms::optimization_solver::mse::defaultDense
Definition: mse_types.h:91
daal::algorithms::optimization_solver::sum_of_functions::interface1::Parameter
Parameter for the Sum of functions
Definition: sum_of_functions_types.h:69
daal::algorithms::optimization_solver::sum_of_functions::argument
Definition: sum_of_functions_types.h:54
daal::algorithms::optimization_solver::mse::interface2::Input
Input objects for the Mean squared error objective function
Definition: mse_types.h:255
daal::algorithms::optimization_solver::mse::interface1::Input
Input objects for the Mean squared error objective function
Definition: mse_types.h:139
daal::algorithms::optimization_solver::mse::interface1::Parameter
Parameter for Mean squared error objective function
Definition: mse_types.h:105
daal::algorithms::optimization_solver::objective_function::gradient
Definition: objective_function_types.h:67
daal::algorithms::optimization_solver::mse::interface2::Input::~Input
virtual ~Input()
Definition: mse_types.h:265
daal::algorithms::optimization_solver::mse::gramMatrix
Definition: mse_types.h:81
daal::algorithms::optimization_solver::mse::dependentVariables
Definition: mse_types.h:59
daal::algorithms::optimization_solver::mse::Method
Method
Definition: mse_types.h:89
daal::algorithms::optimization_solver::mse::InputId
InputId
Definition: mse_types.h:55
daal::algorithms::optimization_solver::mse::optionalArgument
Definition: mse_types.h:70
daal::algorithms::optimization_solver::mse::interface1::Input::~Input
virtual ~Input()
Definition: mse_types.h:149
daal::algorithms::optimization_solver::mse::interface2::Parameter::penaltyL2
data_management::NumericTablePtr penaltyL2
Definition: mse_types.h:248
daal::algorithms::optimization_solver::mse::OptionalDataId
OptionalDataId
Definition: mse_types.h:78

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