Gradient
Lesson 6.9ModelCode~55 min

Decision trees & forests

Twenty questions, learned from data — and why a crowd of trees beats one. Still the champion on spreadsheets.

Module 6 · 0/11 done

Twenty questions

A decision tree classifies by asking a series of yes/no questions about one feature at a time: “Is x below 0.4? If so, is y above 1.2?…” Each answer narrows things down until a leaf gives the verdict. In a picture, every question cuts the space with a straight, axis-aligned line, and the leaves are boxes.

Fig 6.9Grow the tree one level at a time. Each level adds questions and finer boxes. The rules on the right are the whole model, readable by a person.