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

logistic_regression_training_types.h
1 /* file: logistic_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 logistic regression training algorithm interface.
19 //--
20 */
21 
22 #ifndef __LOGISTIC_REGRESSION_TRAINING_TYPES_H__
23 #define __LOGISTIC_REGRESSION_TRAINING_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "algorithms/classifier/classifier_training_types.h"
27 #include "algorithms/logistic_regression/logistic_regression_model.h"
28 #include "algorithms/optimization_solver/iterative_solver/iterative_solver_batch.h"
29 
30 namespace daal
31 {
32 namespace algorithms
33 {
34 namespace logistic_regression
35 {
45 namespace training
46 {
51 enum Method
52 {
53  defaultDense = 0
54 };
55 
59 namespace interface1
60 {
67 /* [Parameter source code] */
68 struct DAAL_EXPORT Parameter : public classifier::Parameter
69 {
70  typedef optimization_solver::iterative_solver::BatchPtr SolverPtr;
71 
73  Parameter(size_t nClasses, const SolverPtr& solver = SolverPtr());
74  Parameter(const Parameter& o) : classifier::Parameter(o), interceptFlag(o.interceptFlag),
75  penaltyL1(o.penaltyL1), penaltyL2(o.penaltyL2), optimizationSolver(o.optimizationSolver){}
76  services::Status check() const DAAL_C11_OVERRIDE;
77 
78  bool interceptFlag;
79  float penaltyL1;
80  float penaltyL2;
81  SolverPtr optimizationSolver;
82 };
83 /* [Parameter source code] */
84 
90 class DAAL_EXPORT Result : public classifier::training::Result
91 {
92 public:
93  DECLARE_SERIALIZABLE_CAST(Result);
94 
95  Result();
96  virtual ~Result() {}
97 
103  ModelPtr get(classifier::training::ResultId id) const;
104 
110  void set(classifier::training::ResultId id, const ModelPtr &value);
111 
119  template <typename algorithmFPType>
120  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
121 
129  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
130 
131 protected:
133  template<typename Archive, bool onDeserialize>
134  services::Status serialImpl(Archive *arch)
135  {
136  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
137  }
138 };
139 typedef services::SharedPtr<Result> ResultPtr;
140 
141 } // namespace interface1
142 using interface1::Parameter;
143 using interface1::Result;
144 using interface1::ResultPtr;
145 
146 } // namespace daal::algorithms::logistic_regression::training
148 }
149 }
150 } // namespace daal
151 #endif // __LOGISTIC_REGRESSION_TRAINING_TYPES_H__
daal::algorithms::logistic_regression::training::Method
Method
Computation methods for logistic regression model-based training.
Definition: logistic_regression_training_types.h:51
daal::algorithms::logistic_regression::training::interface1::Parameter::penaltyL1
float penaltyL1
Definition: logistic_regression_training_types.h:79
daal
Definition: algorithm_base_common.h:31
daal::algorithms::logistic_regression::training::defaultDense
Definition: logistic_regression_training_types.h:53
daal::algorithms::logistic_regression::training::interface1::Parameter
logistic regression algorithm parameters
Definition: logistic_regression_training_types.h:68
daal::algorithms::logistic_regression::training::interface1::Parameter::penaltyL2
float penaltyL2
Definition: logistic_regression_training_types.h:80
daal::algorithms::logistic_regression::training::interface1::Parameter::optimizationSolver
SolverPtr optimizationSolver
Definition: logistic_regression_training_types.h:81
daal::algorithms::logistic_regression::training::interface1::Result
Provides methods to access the result obtained with the compute() method of model-based training...
Definition: logistic_regression_training_types.h:90
daal::algorithms::classifier::training::ResultId
ResultId
Definition: classifier_training_types.h:80
daal::algorithms::logistic_regression::training::interface1::Parameter::interceptFlag
bool interceptFlag
Definition: logistic_regression_training_types.h:78
daal::algorithms::math::abs::value
Definition: abs_types.h:86

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