Imagine deciding whether to wear a jacket: ask whether it is raining, then perhaps ask about the temperature. Following each yes-or-no answer moves down one branch of a binary tree. section 9.0
A binary tree contains nodes connected by edges. The top node is the root; a node may have two branches, while a leaf has none. Decision nodes hold questions, and each branch represents an answer. section 9.0
Useful structural terms include:
- Root node: the topmost node containing the first question. section 9.0
- Decision node: a node with two branches, one for each yes-or-no answer. section 9.0
- Leaf node: a node with no outgoing branches and therefore a final result. section 9.0
- Depth: the number of edges on the longest path from the root to a leaf. section 9.0
Decision stump
A decision stump is the smallest binary decision tree: one root question—“Is it raining?”—leading directly to two leaves: wear a jacket or do not wear one. Its depth is 1. section 9.0






