Decision Trees
Carve the data space into rectangles with a series of yes-or-no questions, predicting a single value for everyone in the same box.
Linear models fail when the data forms patches, islands, or complex shapes. You need a model that can draw corners and surround groups of points.
One Cut at a Time
A decision tree doesn't use math formulas to bend a line. It just asks a yes-or-no question about one feature at a time, making a straight, axis-aligned cut through the data.
Splitting the Splits
Once the first cut is made, the tree looks at the left side and asks the best question for just those points. Then it looks at the right side and does the same, splitting the data again and again.
Carving the Space
If you look at the cuts from above, they carve the entire feature space into a grid of rectangles. Every new data point falls into exactly one box, and receives the prediction assigned to that box.
The Staircase Problem
Trees are fast and handle messy data well, but they have a blind spot. Because every cut must be strictly horizontal or vertical, they cannot draw a simple diagonal line. To separate data that runs diagonally, a tree is forced to build a deep, fragile staircase.
The Quick Version
- Trees don't use formulas, they ask yes-or-no questions.
- Every question makes one straight, axis-aligned cut.
- The splits nest inside each other to form a tree.
- The result is a space carved into pure rectangles.
- They are forced to use jagged staircases for diagonal data.