liveBook · Manning

Leaf node

As explained in Ensemble Methods for Machine Learning

A leaf node is a terminal node of a decision tree that stores the prediction returned for an input reaching it.

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.
CH01_F03_Kunapuli

Visualize how feature tests funnel an example through branches until a leaf assigns its classification label. section 1.3.1

How Ensemble Methods for Machine Learning covers it

How deep it goes
Explains leaf outputs, root-to-leaf rules, and space partitioning; stops short of detailing how leaf values are calculated.
Examples
Demonstrates leaves with a binary tree diagram and Iris species rules based on petal width and petal length.
What it assumes
Assumes familiarity with decision trees, features, classification, and regression while reinforcing branching and prediction flow.
What you can do after
Evaluate and understand how a decision tree converts a sequence of feature tests into a final prediction.
How it connects
Connects leaf nodes with decision trees, decision nodes, decision rules, feature-space partitions, classification, and regression.

Also explained in

Compare how 10 books explain leaf node →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Ensemble Methods for Machine Learning. The section links point to the parts of the book it draws on.