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

brownboost_model.h
1 /* file: brownboost_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 Brown Boost model.
19 //--
20 */
21 
22 #ifndef __BROWN_BOOST_MODEL_H__
23 #define __BROWN_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 brownboost
37 {
38 
42 namespace interface1
43 {
54 /* [Parameter source code] */
55 struct DAAL_EXPORT Parameter : public boosting::Parameter
56 {
58  Parameter();
59 
70  Parameter(services::SharedPtr<weak_learner::training::Batch> wlTrainForParameter,
71  services::SharedPtr<weak_learner::prediction::Batch> wlPredictForParameter,
72  double acc = 0.3, size_t maxIter = 10, double nrAcc = 1.0e-3, size_t nrMaxIter = 100, double dcThreshold = 1.0e-2);
73 
74  double accuracyThreshold;
75  size_t maxIterations;
76  double newtonRaphsonAccuracyThreshold;
77  size_t newtonRaphsonMaxIterations;
78  double degenerateCasesThreshold;
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 
104  template <typename modelFPType>
105  DAAL_EXPORT Model(size_t nFeatures, modelFPType dummy);
106 
111  Model() : boosting::Model(), _alpha() { }
112 
113 
120  template<typename modelFPType>
121  DAAL_EXPORT static services::SharedPtr<Model> create(size_t nFeatures, services::Status *stat = NULL);
122 
123  virtual ~Model() { }
124 
131  data_management::NumericTablePtr getAlpha();
132 
133 protected:
134  data_management::NumericTablePtr _alpha; /* Boosting coefficients table */
135 
136  template<typename Archive, bool onDeserialize>
137  services::Status serialImpl(Archive *arch)
138  {
139  services::Status st = boosting::Model::serialImpl<Archive, onDeserialize>(arch);
140  if (!st)
141  return st;
142  arch->setSharedPtrObj(_alpha);
143 
144  return st;
145  }
146 
147  template <typename modelFPType>
148  DAAL_EXPORT Model(size_t nFeatures, modelFPType dummy, services::Status &st);
149 
150 }; // class Model
151 typedef services::SharedPtr<Model> ModelPtr;
153 } // namespace interface1
154 using interface1::Parameter;
155 using interface1::Model;
156 using interface1::ModelPtr;
157 
158 } // namespace daal::algorithms::brownboost
159 }
160 } // namespace daal
161 #endif
daal::algorithms::brownboost::interface1::Model
Model of the classifier trained by the brownboost::training::Batch algorithm.
Definition: brownboost_model.h:92
daal
Definition: algorithm_base_common.h:31
daal::algorithms::brownboost::interface1::Parameter::maxIterations
size_t maxIterations
Definition: brownboost_model.h:75
daal::algorithms::brownboost::interface1::Parameter::newtonRaphsonMaxIterations
size_t newtonRaphsonMaxIterations
Definition: brownboost_model.h:77
daal::algorithms::brownboost::interface1::Parameter::accuracyThreshold
double accuracyThreshold
Definition: brownboost_model.h:74
daal::algorithms::brownboost::interface1::Model::Model
Model()
Definition: brownboost_model.h:111
daal::algorithms::brownboost::interface1::Parameter
BrownBoost algorithm parameters.
Definition: brownboost_model.h:55
daal::algorithms::brownboost::interface1::Parameter::degenerateCasesThreshold
double degenerateCasesThreshold
Definition: brownboost_model.h:78
daal::algorithms::brownboost::interface1::Parameter::newtonRaphsonAccuracyThreshold
double newtonRaphsonAccuracyThreshold
Definition: brownboost_model.h:76

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