A leaf node is where a decision-tree path ends. After each decision node tests a condition and sends an input left or right, the reached leaf returns the prediction. section 1.3.1
Use the leaf node to understand what a tree predicts and how its structure controls complexity:
- Returns a class label for classification and a regression value for regression. section 1.3.1
- Represents a subpopulation defined by the conditions along its path from the root. section 9.1.2
- Combines with other leaves to partition the feature space into nonoverlapping regions that cover every input. section 9.1.2
- Increases with tree depth, enabling richer functions but also producing more rules and potentially reducing interpretability. section 1.3.1 section 9.1.2
Iris classification
A tree can send an iris with petal width <= 0.8 directly to a leaf predicting Iris-Setosa. Other leaves apply additional petal-length conditions and predict Iris-Versicolour or Iris-Virginica. section 9.1.2
Figure 1.3 Decision trees partition the feature space into axis-parallel rectangles. When used for classification, the tree checks for conditions on the features in the decision nodes, funneling the example to the left or right after each test. Ultimately, the example filters down to a leaf node, which will give its classification label. The partition of the feature space according to this decision tree is shown on the left.
Visualize how feature tests funnel an example through branches until a leaf assigns its classification label. section 1.3.1









