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

gbt_classification_model.h
1 /* file: gbt_classification_model.h */
2 /*******************************************************************************
3 * Copyright 2014-2020 Intel Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *******************************************************************************/
17 
18 /*
19 //++
20 // Implementation of class defining gradient boosted trees classification model.
21 //--
22 */
23 
24 #ifndef __GBT_CLASSIFICATION_MODEL_H__
25 #define __GBT_CLASSIFICATION_MODEL_H__
26 
27 #include "algorithms/classifier/classifier_model.h"
28 #include "algorithms/regression/tree_traverse.h"
29 #include "algorithms/tree_utils/tree_utils_regression.h"
30 
31 namespace daal
32 {
33 namespace algorithms
34 {
35 namespace gbt
36 {
45 namespace classification
46 {
50 namespace interface1
51 {
64 class DAAL_EXPORT Model : public classifier::Model
65 {
66 public:
67  DECLARE_MODEL(Model, classifier::Model)
68 
69 
74  static services::SharedPtr<Model> create(size_t nFeatures, services::Status *stat = NULL);
75 
81  virtual size_t numberOfTrees() const = 0;
82 
89  /* regression traversing is used as classification model is similar to regression in gbt algorithms */
90  virtual void traverseDF(size_t iTree, daal::algorithms::regression::TreeNodeVisitor& visitor) const = 0;
91 
98  /* regression traversing is used as classification model is similar to regression in gbt algorithms */
99  virtual void traverseBF(size_t iTree, daal::algorithms::regression::TreeNodeVisitor& visitor) const = 0;
100 
104  virtual void clear() = 0;
105 
111  virtual void traverseDFS(size_t iTree, tree_utils::regression::TreeNodeVisitor& visitor) const = 0;
112 
118  virtual void traverseBFS(size_t iTree, tree_utils::regression::TreeNodeVisitor& visitor) const = 0;
119 
124  virtual size_t getNumberOfTrees() const = 0;
125 
126 protected:
127  Model() : classifier::Model()
128  {}
129 };
131 typedef services::SharedPtr<Model> ModelPtr;
132 } // namespace interface1
133 using interface1::Model;
134 using interface1::ModelPtr;
135 
136 } // namespace classification
137 } // namespace gbt
138 } // namespace algorithms
139 } // namespace daal
140 #endif
daal::algorithms::gbt::classification::interface1::Model
Model of the classifier trained by the gbt::training::Batch algorithm.
Definition: gbt_classification_model.h:64

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