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

logitboost_model.h
1 /* file: logitboost_model.h */
2 /*******************************************************************************
3 * Copyright 2014-2017 Intel Corporation
4 * All Rights Reserved.
5 *
6 * If this software was obtained under the Intel Simplified Software License,
7 * the following terms apply:
8 *
9 * The source code, information and material ("Material") contained herein is
10 * owned by Intel Corporation or its suppliers or licensors, and title to such
11 * Material remains with Intel Corporation or its suppliers or licensors. The
12 * Material contains proprietary information of Intel or its suppliers and
13 * licensors. The Material is protected by worldwide copyright laws and treaty
14 * provisions. No part of the Material may be used, copied, reproduced,
15 * modified, published, uploaded, posted, transmitted, distributed or disclosed
16 * in any way without Intel's prior express written permission. No license under
17 * any patent, copyright or other intellectual property rights in the Material
18 * is granted to or conferred upon you, either expressly, by implication,
19 * inducement, estoppel or otherwise. Any license under such intellectual
20 * property rights must be express and approved by Intel in writing.
21 *
22 * Unless otherwise agreed by Intel in writing, you may not remove or alter this
23 * notice or any other notice embedded in Materials by Intel or Intel's
24 * suppliers or licensors in any way.
25 *
26 *
27 * If this software was obtained under the Apache License, Version 2.0 (the
28 * "License"), the following terms apply:
29 *
30 * You may not use this file except in compliance with the License. You may
31 * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
32 *
33 *
34 * Unless required by applicable law or agreed to in writing, software
35 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
36 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37 *
38 * See the License for the specific language governing permissions and
39 * limitations under the License.
40 *******************************************************************************/
41 
42 /*
43 //++
44 // Implementation of class defining LogitBoost model.
45 //--
46 */
47 
48 #ifndef __LOGIT_BOOST_MODEL_H__
49 #define __LOGIT_BOOST_MODEL_H__
50 
51 #include "algorithms/algorithm.h"
52 #include "data_management/data/homogen_numeric_table.h"
53 #include "algorithms/boosting/boosting_model.h"
54 
55 namespace daal
56 {
57 namespace algorithms
58 {
62 namespace logitboost
63 {
64 
68 namespace interface1
69 {
80 /* [Parameter source code] */
81 struct DAAL_EXPORT Parameter : public boosting::Parameter
82 {
84  Parameter();
85 
96  Parameter(const services::SharedPtr<weak_learner::training::Batch>& wlTrainForParameter,
97  const services::SharedPtr<weak_learner::prediction::Batch>& wlPredictForParameter,
98  double acc = 0.0, size_t maxIter = 10, size_t nC = 0, double wThr = 1e-10, double zThr = 1e-10);
99 
100  double accuracyThreshold;
101  size_t maxIterations;
102  size_t nClasses;
103  double weightsDegenerateCasesThreshold;
104  double responsesDegenerateCasesThreshold;
106  services::Status check() const DAAL_C11_OVERRIDE;
107 };
108 /* [Parameter source code] */
109 
118 class DAAL_EXPORT Model : public boosting::Model
119 {
120 public:
121  DECLARE_MODEL(Model, classifier::Model)
122 
123 
131  template <typename modelFPType>
132  DAAL_EXPORT Model(size_t nFeatures, const Parameter *par, modelFPType dummy);
133 
138  Model() : boosting::Model(), _nIterations(0) { }
139 
146  static services::SharedPtr<Model> create(size_t nFeatures, const Parameter *par,
147  services::Status *stat = NULL);
148 
149  virtual ~Model() { }
150 
155  void setIterations(size_t nIterations);
156 
161  size_t getIterations() const;
162 
163 protected:
164  size_t _nIterations;
165 
166  template<typename Archive, bool onDeserialize>
167  services::Status serialImpl(Archive *arch)
168  {
169  services::Status st = boosting::Model::serialImpl<Archive, onDeserialize>(arch);
170  if (!st)
171  return st;
172  arch->set(_nIterations);
173 
174  return st;
175  }
176 
177  Model(size_t nFeatures, const Parameter *par, services::Status &st);
178 };
179 typedef services::SharedPtr<Model> ModelPtr;
181 } // namespace interface1
182 using interface1::Parameter;
183 using interface1::Model;
184 using interface1::ModelPtr;
185 
186 } // namespace daal::algorithms::logitboost
187 }
188 } // namespace daal
189 #endif
daal
Definition: algorithm_base_common.h:57
daal::algorithms::em_gmm::nIterations
Definition: em_gmm_types.h:123
daal::algorithms::logitboost::interface1::Parameter::responsesDegenerateCasesThreshold
double responsesDegenerateCasesThreshold
Definition: logitboost_model.h:104
daal::algorithms::logitboost::interface1::Model::Model
Model()
Definition: logitboost_model.h:138
daal::algorithms::logitboost::interface1::Parameter::weightsDegenerateCasesThreshold
double weightsDegenerateCasesThreshold
Definition: logitboost_model.h:103
daal::algorithms::logitboost::interface1::Parameter::maxIterations
size_t maxIterations
Definition: logitboost_model.h:101
daal::algorithms::logitboost::interface1::Parameter::accuracyThreshold
double accuracyThreshold
Definition: logitboost_model.h:100
daal::algorithms::logitboost::interface1::Parameter
LogitBoost algorithm parameters.
Definition: logitboost_model.h:81
daal::algorithms::logitboost::interface1::Parameter::nClasses
size_t nClasses
Definition: logitboost_model.h:102
daal::algorithms::logitboost::interface1::Model
Model of the classifier trained by the logitboost::training::Batch algorithm.
Definition: logitboost_model.h:118

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