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

tree_utils.h
1 /* file: tree_utils.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 the class defining the Decision tree classification model
21 //--
22 */
23 
24 #ifndef __TREE_UTILS__
25 #define __TREE_UTILS__
26 
27 namespace daal
28 {
29 namespace algorithms
30 {
31 
37 namespace tree_utils
38 {
39 
43 namespace interface1
44 {
45 
50 struct DAAL_EXPORT NodeDescriptor
51 {
52  size_t level;
53  double impurity;
54  size_t nNodeSampleCount;
55 };
56 
61 struct DAAL_EXPORT SplitNodeDescriptor : public NodeDescriptor
62 {
63  size_t featureIndex;
64  double featureValue;
65 };
66 
75 template <typename LeafNodeDescriptorType>
76 class DAAL_EXPORT TreeNodeVisitor
77 {
78 public:
84  virtual bool onSplitNode(const SplitNodeDescriptor &desc) = 0;
85 
91  virtual bool onLeafNode(const LeafNodeDescriptorType &desc) = 0;
92 };
93 
94 } // interface1
95 using interface1::NodeDescriptor;
96 using interface1::SplitNodeDescriptor;
97 using interface1::TreeNodeVisitor;
98 } // tree_utils
99 } // algorithms
100 } // daal
101 
102 #endif
daal::algorithms::tree_utils::interface1::TreeNodeVisitor
Interface of abstract visitor used in tree traversal methods.
Definition: tree_utils.h:76
daal::algorithms::tree_utils::interface1::SplitNodeDescriptor::featureIndex
size_t featureIndex
Definition: tree_utils.h:63
daal::algorithms::tree_utils::interface1::SplitNodeDescriptor
Struct containing description of split node in descision tree
Definition: tree_utils.h:61
daal::algorithms::tree_utils::interface1::NodeDescriptor::impurity
double impurity
Definition: tree_utils.h:53
daal::algorithms::tree_utils::interface1::NodeDescriptor
Struct containing base description of node in descision tree
Definition: tree_utils.h:50
daal::algorithms::tree_utils::interface1::NodeDescriptor::level
size_t level
Definition: tree_utils.h:52
daal::algorithms::tree_utils::interface1::SplitNodeDescriptor::featureValue
double featureValue
Definition: tree_utils.h:64
daal::algorithms::tree_utils::interface1::NodeDescriptor::nNodeSampleCount
size_t nNodeSampleCount
Definition: tree_utils.h:54

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