A leaf node is the endpoint of a tree: it has no children, so its degree is 0. In the family analogy for tree structures, it is the youngest member with no descendants. section 2.7
In a decision tree, a leaf node holds examples assigned to one class or stores the label counts used for prediction. Decision nodes ask questions; leaves contain the resulting categories. section 8.16 section 8.17
Recognize a leaf node by these properties:
- Ends a path away from the root and has no child nodes. section 2.7
- Represents a final category in a classification tree, such as Okay or Perfect. section 8.16
- Can store counts for each label, allowing the tree to represent its predictions. section 8.17
Following diamond examples to a leaf
A decision tree filters diamond examples with questions such as “Is Carat >= 0.5?” Each answer selects a branch. When no useful split remains, the recursive builder creates an ExamplesNode containing the remaining examples and their label counts. That terminal node is the leaf, such as a group categorized as Okay or Perfect. section 8.16 section 8.17
Use the tree-attributes figure to see how a leaf relates to the root, parent, children, depth, and height. section 2.7









