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

gbt_classification_model.h
1 /* file: gbt_classification_model.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 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 gradient boosted trees classification model.
19 //--
20 */
21 
22 #ifndef __GBT_CLASSIFICATION_MODEL_H__
23 #define __GBT_CLASSIFICATION_MODEL_H__
24 
25 #include "algorithms/classifier/classifier_model.h"
26 #include "algorithms/regression/tree_traverse.h"
27 #include "algorithms/tree_utils/tree_utils_regression.h"
28 
29 namespace daal
30 {
31 namespace algorithms
32 {
33 namespace gbt
34 {
43 namespace classification
44 {
48 namespace interface1
49 {
62 class DAAL_EXPORT Model : public classifier::Model
63 {
64 public:
65  DECLARE_MODEL(Model, classifier::Model)
66 
67 
72  static services::SharedPtr<Model> create(size_t nFeatures, services::Status *stat = NULL);
73 
79  virtual size_t numberOfTrees() const = 0;
80 
87  /* regression traversing is used as classification model is similar to regression in gbt algorithms */
88  virtual void traverseDF(size_t iTree, daal::algorithms::regression::TreeNodeVisitor& visitor) const = 0;
89 
96  /* regression traversing is used as classification model is similar to regression in gbt algorithms */
97  virtual void traverseBF(size_t iTree, daal::algorithms::regression::TreeNodeVisitor& visitor) const = 0;
98 
102  virtual void clear() = 0;
103 
109  virtual void traverseDFS(size_t iTree, tree_utils::regression::TreeNodeVisitor& visitor) const = 0;
110 
116  virtual void traverseBFS(size_t iTree, tree_utils::regression::TreeNodeVisitor& visitor) const = 0;
117 
122  virtual size_t getNumberOfTrees() const = 0;
123 
124 protected:
125  Model() : classifier::Model()
126  {}
127 };
129 typedef services::SharedPtr<Model> ModelPtr;
130 } // namespace interface1
131 using interface1::Model;
132 using interface1::ModelPtr;
133 
134 } // namespace classification
135 } // namespace gbt
136 } // namespace algorithms
137 } // namespace daal
138 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::gbt::classification::interface1::Model
Model of the classifier trained by the gbt::training::Batch algorithm.
Definition: gbt_classification_model.h:62

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