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

mse_types.h
1 /* file: mse_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 Mean squared error objective function interface.
21 //--
22 */
23 
24 #ifndef __MSE_TYPES_H__
25 #define __MSE_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/numeric_table.h"
29 #include "services/daal_defines.h"
30 #include "sum_of_functions_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
39 namespace optimization_solver
40 {
50 namespace mse
51 {
52 
57 enum InputId
58 {
59  argument = (int)sum_of_functions::argument,
60  data,
61  dependentVariables,
62  lastInputId = dependentVariables
63 };
64 
65 
70 enum OptionalInputId
71 {
72  optionalArgument = lastInputId + 1,
73  lastOptionalInputId = optionalArgument
74 };
75 
80 enum OptionalDataId
81 {
82  weights,
83  gramMatrix,
84  lastOptionalData = gramMatrix
85 };
86 
91 enum Method
92 {
93  defaultDense = 0
94 };
95 
99 namespace interface1
100 {
101 
107 struct DAAL_EXPORT Parameter : public sum_of_functions::interface1::Parameter
108 {
118  DAAL_DEPRECATED Parameter(size_t numberOfTerms,
119  data_management::NumericTablePtr batchIndices = data_management::NumericTablePtr(),
120  const DAAL_UINT64 resultsToCompute = objective_function::gradient);
121 
126  DAAL_DEPRECATED Parameter(const Parameter &other);
132  DAAL_DEPRECATED_VIRTUAL virtual services::Status check() const;
133 
134  DAAL_DEPRECATED_VIRTUAL virtual ~Parameter() {}
135 };
136 
141 class DAAL_EXPORT Input : public sum_of_functions::interface1::Input
142 {
143 public:
145  DAAL_DEPRECATED Input();
146 
148  DAAL_DEPRECATED Input(const Input& other);
149 
151  DAAL_DEPRECATED_VIRTUAL virtual ~Input() {}
152 
158  DAAL_DEPRECATED void set(InputId id, const data_management::NumericTablePtr &ptr);
159 
165  DAAL_DEPRECATED data_management::NumericTablePtr get(InputId id) const;
166 
172  DAAL_DEPRECATED algorithms::OptionalArgumentPtr get(OptionalInputId id) const;
173 
179  DAAL_DEPRECATED void set(OptionalInputId id, const algorithms::OptionalArgumentPtr &ptr);
180 
186  DAAL_DEPRECATED data_management::NumericTablePtr get(OptionalDataId id) const;
187 
193  DAAL_DEPRECATED void set(OptionalDataId id, const data_management::NumericTablePtr &ptr);
194 
202  DAAL_DEPRECATED services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
203 };
205 } // namespace interface1
206 
210 namespace interface2
211 {
212 
219 /* [Parameter source code] */
220 struct DAAL_EXPORT Parameter : public sum_of_functions::Parameter
221 {
231  Parameter(size_t numberOfTerms,
232  data_management::NumericTablePtr batchIndices = data_management::NumericTablePtr(),
233  const DAAL_UINT64 resultsToCompute = objective_function::gradient);
234 
239  Parameter(const Parameter &other);
245  virtual services::Status check() const;
246 
247  virtual ~Parameter() {}
248  bool interceptFlag;
249  data_management::NumericTablePtr penaltyL1;
250  data_management::NumericTablePtr penaltyL2;
251 };
252 
257 class DAAL_EXPORT Input : public sum_of_functions::Input
258 {
259 public:
261  Input();
262 
264  Input(const Input& other);
265 
267  virtual ~Input() {}
268 
274  void set(InputId id, const data_management::NumericTablePtr &ptr);
275 
281  data_management::NumericTablePtr get(InputId id) const;
282 
288  algorithms::OptionalArgumentPtr get(OptionalInputId id) const;
289 
295  void set(OptionalInputId id, const algorithms::OptionalArgumentPtr &ptr);
296 
302  data_management::NumericTablePtr get(OptionalDataId id) const;
303 
309  void set(OptionalDataId id, const data_management::NumericTablePtr &ptr);
310 
318  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
319 };
320 /* [Parameter source code] */
321 }// namespace interface1
322 using interface2::Parameter;
323 using interface2::Input;
324 
325 } // namespace mse
326 } // namespace optimization_solver
327 } // namespace algorithm
328 } // namespace daal
329 #endif
daal::algorithms::optimization_solver::mse::interface1::Input::~Input
virtual DAAL_DEPRECATED_VIRTUAL ~Input()
Definition: mse_types.h:151
daal::algorithms::optimization_solver::mse::weights
Definition: mse_types.h:82
daal::algorithms::optimization_solver::mse::interface2::Parameter::interceptFlag
bool interceptFlag
Definition: mse_types.h:248
daal::algorithms::optimization_solver::mse::interface1::Parameter
Parameter for Mean squared error objective function
Definition: mse_types.h:107
daal::algorithms::optimization_solver::mse::interface2::Parameter::penaltyL2
data_management::NumericTablePtr penaltyL2
Definition: mse_types.h:250
daal::algorithms::optimization_solver::mse::gramMatrix
Definition: mse_types.h:83
daal::algorithms::optimization_solver::sum_of_functions::interface1::Input
Input objects for the Sum of functions
Definition: sum_of_functions_types.h:113
daal::algorithms::optimization_solver::mse::dependentVariables
Definition: mse_types.h:61
daal::algorithms::optimization_solver::sum_of_functions::interface1::Parameter
Parameter for the Sum of functions
Definition: sum_of_functions_types.h:71
daal::algorithms::optimization_solver::mse::interface1::Input
Input objects for the Mean squared error objective function
Definition: mse_types.h:141
daal::algorithms::optimization_solver::mse::defaultDense
Definition: mse_types.h:93
daal::algorithms::optimization_solver::mse::optionalArgument
Definition: mse_types.h:72
daal::algorithms::optimization_solver::mse::interface2::Input
Input objects for the Mean squared error objective function
Definition: mse_types.h:257
daal_defines.h
daal::algorithms::optimization_solver::mse::Method
Method
Definition: mse_types.h:91
daal::algorithms::optimization_solver::mse::data
Definition: mse_types.h:60
daal::algorithms::optimization_solver::mse::interface2::Parameter
Parameter for Mean squared error objective function
Definition: mse_types.h:220
daal::algorithms::optimization_solver::mse::InputId
InputId
Definition: mse_types.h:57
daal::algorithms::optimization_solver::mse::OptionalInputId
OptionalInputId
Definition: mse_types.h:70
daal::algorithms::optimization_solver::mse::argument
Definition: mse_types.h:59
daal::algorithms::optimization_solver::mse::interface2::Parameter::penaltyL1
data_management::NumericTablePtr penaltyL1
Definition: mse_types.h:249
daal::algorithms::optimization_solver::sum_of_functions::argument
Definition: sum_of_functions_types.h:56
daal::algorithms::optimization_solver::objective_function::gradient
Definition: objective_function_types.h:69
daal::algorithms::optimization_solver::mse::interface2::Input::~Input
virtual ~Input()
Definition: mse_types.h:267
daal::algorithms::optimization_solver::mse::OptionalDataId
OptionalDataId
Definition: mse_types.h:80

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