Basis Lab

Trees, and Committees of Them

One Tree Is Unstable

Last timeKnowing When to Stop Growing

Change a handful of training rows and a tree can come out looking entirely different, which makes a single tree untrustworthy and is also the opening the rest of the course walks through.

Remove two rows and look again

Take the twelve applications, grow a tree, write it down. Now remove two rows

at random, grow again, and compare.

Frequently the two trees share nothing but their first question, and sometimes

not even that. If two candidate questions scored 0.210 and 0.203, removing the

right two rows swaps them, and once a different question sits at the top every

group below it is different, so every question below it is chosen on different

data.

FIG 1The same data, five times, with a different tenth removed
steprunquestion at the topsecond question on the yes sideaccuracy on held back rows
11income above 30has other debts0.81
22income above 30age above 440.79
33has other debtsincome above 280.80
44income above 31lives in a city0.78
55has other debtsincome above 330.82
5 steps
The last column barely moves and the first two move a great deal. That combination is the defining property of an unstable model, and it is the reason the rest of this course exists.

Why the flipping happens

The choice at each node is winner takes all. Two questions scoring 0.229 and

0.221 are, for practical purposes, equally good, and the procedure does not

record that. It takes the first and discards the second entirely.

So the tree magnifies a difference that was never meaningful. A gap of seven

thousandths in a quantity estimated from twelve rows is noise, and the

procedure converts it into a completely different model. Worse, the effect

compounds: a different question at the top means different groups below,

which means different comparisons, which means different winners, all the way

down.

FIG 2How often the top question changes, against how close the top two are
0.000.300.600.901.200.00.00.00.10.1gap in value between the best two questions
chance of a flip
When the top two questions are close, a flip is near certain. The gap has to reach about five hundredths before the top question is reliably stable, and on real data with many columns there are usually several questions clustered near the best. This is why the instability is the normal case and not an unlucky one.

Models in the previous course do not behave this way. Remove two rows from a

straight line fit and the knobs move slightly. There is no winner takes all

comparison anywhere in that method, so there is nothing to flip.

The lesson stops here

5 more paragraphs to go

You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.

The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.

See the planThe contents

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

The rest of this course

  1. 01Splitting on One Question
  2. 02Growing a Whole Treeopening only
  3. 03Knowing When to Stop Growingopening only
  4. 04One Tree Is Unstableyou are here
  5. 05Averaging Many Treesopening only
  6. 06Each Tree Fixing the Lastopening only
  7. 07Which Input Actually Matteredopening only
  8. 08When to Reach for a Treeopening only

Read alongside