liveBook · Manning

Branch

As explained in Grokking Machine Learning

A decision-tree path segment connecting a node to a child node or resulting subtree.

A branch is a path segment in a decision tree. It leaves a node after a yes-or-no answer and leads to another decision node or a leaf. section 9.0

Use branches to read a decision tree from top to bottom:

  • Start at the root node, which contains the first question. section 9.0
  • Take the branch matching the answer to that question. section 9.0
  • Continue through later branches until reaching a leaf and its decision. section 9.0

Should you wear a jacket?

Ask whether it is raining. Follow the matching branch: a rainy day immediately reaches the jacket decision; otherwise, follow a second branch based on temperature. A decision stump has only one question and two branches. section 9.0

Figure 9.2 A regular decision tree with a root node, decision nodes, branches, and leaves. Note that each decision node contains a yes-or-no question. From each possible answer, one branch emanates, which can lead to another decision node or a leaf. This tree has a depth of 2, because the longest path from a leaf to the root goes through two branches.

Visualize how each answer produces one branch and how branches connect decision nodes to leaves. section 9.0

How Grokking Machine Learning covers it

How deep it goes
Defines branches structurally and visually, but stops short of explaining how algorithms select individual splits.
Examples
Uses jacket decisions, a one-question decision stump, and feature-space regions divided by vertical and horizontal boundaries.
What it assumes
Assumes only familiarity with yes-or-no questions and introduces decision-tree vocabulary from the beginning.
What you can do after
Evaluate/understand how a decision-tree prediction follows a sequence of branches from root to leaf.
How it connects
Connects branches to decision trees, nodes, root nodes, decision nodes, leaf nodes, decision stumps, and classification boundaries.

Related concepts

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