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

tree_utils.h
1 /* file: tree_utils.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 the class defining the Decision tree classification model
19 //--
20 */
21 
22 #ifndef __TREE_UTILS__
23 #define __TREE_UTILS__
24 
25 namespace daal
26 {
27 namespace algorithms
28 {
29 
35 namespace tree_utils
36 {
37 
41 namespace interface1
42 {
43 
48 struct DAAL_EXPORT NodeDescriptor
49 {
50  size_t level;
51  double impurity;
52  size_t nNodeSampleCount;
53 };
54 
59 struct DAAL_EXPORT SplitNodeDescriptor : public NodeDescriptor
60 {
61  size_t featureIndex;
62  double featureValue;
63 };
64 
73 template <typename LeafNodeDescriptorType>
74 class DAAL_EXPORT TreeNodeVisitor
75 {
76 public:
82  virtual bool onSplitNode(const SplitNodeDescriptor &desc) = 0;
83 
89  virtual bool onLeafNode(const LeafNodeDescriptorType &desc) = 0;
90 };
91 
92 } // interface1
93 using interface1::NodeDescriptor;
94 using interface1::SplitNodeDescriptor;
95 using interface1::TreeNodeVisitor;
96 } // tree_utils
97 } // algorithms
98 } // daal
99 
100 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::tree_utils::interface1::NodeDescriptor::level
size_t level
Definition: tree_utils.h:50
daal::algorithms::tree_utils::interface1::SplitNodeDescriptor::featureValue
double featureValue
Definition: tree_utils.h:62
daal::algorithms::tree_utils::interface1::SplitNodeDescriptor
Struct containing description of split node in descision tree
Definition: tree_utils.h:59
daal::algorithms::tree_utils::interface1::TreeNodeVisitor
Interface of abstract visitor used in tree traversal methods.
Definition: tree_utils.h:74
daal::algorithms::tree_utils::interface1::SplitNodeDescriptor::featureIndex
size_t featureIndex
Definition: tree_utils.h:61
daal::algorithms::tree_utils::interface1::NodeDescriptor
Struct containing base description of node in descision tree
Definition: tree_utils.h:48
daal::algorithms::tree_utils::interface1::NodeDescriptor::nNodeSampleCount
size_t nNodeSampleCount
Definition: tree_utils.h:52
daal::algorithms::tree_utils::interface1::NodeDescriptor::impurity
double impurity
Definition: tree_utils.h:51

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