Decision Tree Learning

Decision trees are probably the most human of all learned models. A doctor's triage flowchart, a bank's loan checklist and a 20-questions game are all decision trees. This chapter shows how to learn one automatically from examples, using an idea from information theory: ask the question that tells you the most.

Decision trees also tie together everything so far:

  • Building a tree is a greedy search through the space of trees: hill climbing (Ch 3) with no backtracking.
  • The search is guided by entropy, a measure of uncertainty built from probability (Ch 4).
  • Choosing the most informative attribute mirrors the value of information (Ch 5).
  • Trees overfit spectacularly if left unchecked, and we fix that with the validation and pruning ideas of Ch 2.
Bolt's problem

The canteen manager asks: "Can you tell me in advance which orders will be late, and why?" A neural network might predict well, but it can't explain itself. A decision tree can: "If the distance is over 3.2 km, it'll be late. Otherwise, if it's between 9 and 11 pm (rush hour) and over 1.5 km, it'll be late. Otherwise it's on time." That's a model the manager can read, check and act on.