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

logitboost_model.h
1 /* file: logitboost_model.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 class defining LogitBoost model.
19 //--
20 */
21 
22 #ifndef __LOGIT_BOOST_MODEL_H__
23 #define __LOGIT_BOOST_MODEL_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/homogen_numeric_table.h"
27 #include "algorithms/boosting/boosting_model.h"
28 
29 namespace daal
30 {
31 namespace algorithms
32 {
36 namespace logitboost
37 {
38 
42 namespace interface1
43 {
54 /* [Parameter source code] */
55 struct DAAL_EXPORT Parameter : public boosting::Parameter
56 {
58  Parameter();
59 
70  Parameter(const services::SharedPtr<weak_learner::training::Batch>& wlTrainForParameter,
71  const services::SharedPtr<weak_learner::prediction::Batch>& wlPredictForParameter,
72  double acc = 0.0, size_t maxIter = 10, size_t nC = 0, double wThr = 1e-10, double zThr = 1e-10);
73 
74  double accuracyThreshold;
75  size_t maxIterations;
76  size_t nClasses;
77  double weightsDegenerateCasesThreshold;
78  double responsesDegenerateCasesThreshold;
80  services::Status check() const DAAL_C11_OVERRIDE;
81 };
82 /* [Parameter source code] */
83 
92 class DAAL_EXPORT Model : public boosting::Model
93 {
94 public:
95  DECLARE_MODEL(Model, classifier::Model)
96 
97 
105  template <typename modelFPType>
106  DAAL_EXPORT Model(size_t nFeatures, const Parameter *par, modelFPType dummy);
107 
112  Model() : boosting::Model(), _nIterations(0) { }
113 
120  static services::SharedPtr<Model> create(size_t nFeatures, const Parameter *par,
121  services::Status *stat = NULL);
122 
123  virtual ~Model() { }
124 
129  void setIterations(size_t nIterations);
130 
135  size_t getIterations() const;
136 
137 protected:
138  size_t _nIterations;
139 
140  template<typename Archive, bool onDeserialize>
141  services::Status serialImpl(Archive *arch)
142  {
143  services::Status st = boosting::Model::serialImpl<Archive, onDeserialize>(arch);
144  if (!st)
145  return st;
146  arch->set(_nIterations);
147 
148  return st;
149  }
150 
151  Model(size_t nFeatures, const Parameter *par, services::Status &st);
152 };
153 typedef services::SharedPtr<Model> ModelPtr;
155 } // namespace interface1
156 using interface1::Parameter;
157 using interface1::Model;
158 using interface1::ModelPtr;
159 
160 } // namespace daal::algorithms::logitboost
161 }
162 } // namespace daal
163 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::em_gmm::nIterations
Definition: em_gmm_types.h:97
daal::algorithms::logitboost::interface1::Parameter::responsesDegenerateCasesThreshold
double responsesDegenerateCasesThreshold
Definition: logitboost_model.h:78
daal::algorithms::logitboost::interface1::Model::Model
Model()
Definition: logitboost_model.h:112
daal::algorithms::logitboost::interface1::Parameter::weightsDegenerateCasesThreshold
double weightsDegenerateCasesThreshold
Definition: logitboost_model.h:77
daal::algorithms::logitboost::interface1::Parameter::maxIterations
size_t maxIterations
Definition: logitboost_model.h:75
daal::algorithms::logitboost::interface1::Parameter::accuracyThreshold
double accuracyThreshold
Definition: logitboost_model.h:74
daal::algorithms::logitboost::interface1::Parameter
LogitBoost algorithm parameters.
Definition: logitboost_model.h:55
daal::algorithms::logitboost::interface1::Parameter::nClasses
size_t nClasses
Definition: logitboost_model.h:76
daal::algorithms::logitboost::interface1::Model
Model of the classifier trained by the logitboost::training::Batch algorithm.
Definition: logitboost_model.h:92

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