The best model on this page starts out worse than one rule anybody could write.
At twenty examples, learning from every word in the vocabulary scores 89.4% and a hand-written rule scores 96.8%. At four and a half thousand examples the same model is the best thing here. Same corpus, same measurements. Four budgets, and you choose what to spend them on.
- Score
- 0
- Right
- 0
- Streak
- ×0
- Budget
- 1/4
Your situation
You have 2000 labelled messages and a small decision tree. It scores 97.5% on messages it has never seen. You can afford one upgrade.
Start with the line that ignores the data completely. One hand-written rule, flag anything with five digits in a row, and it scores 96.8 per cent no matter how many training messages you have. It is a flat line, and everything else has to earn its way up to it.
Loading the curves…
Where you are on the curve decides it.
Back to the start+What is actually going onWhy do the curves flatten?Because each new example teaches less than the one before it, until they are mostly repeating what the model already knows.
The first hundred messages tell a model roughly what spam looks like. The next thousand refine the edges. Somewhere past that most of what arrives is a variation on something already seen, and the curve bends towards whatever ceiling the features and the model allow.
Which is why the honest question is never whether more data helps. It is what the next tenfold is worth, and the curve you have already measured is the only thing that can tell you.
Note the ceilings differ. The rule is capped at 96.8 per cent forever, and the word model is still climbing gently at the right edge. The flattening is a property of the pair, not of the data alone.
+What is actually going onIs this not just the old more-data-beats-better-algorithms slogan?Half of it. The slogan is true on the left of the curve and quietly false on the right.
Banko and Brill’s result in 2001 is the one usually cited: over three orders of magnitude of training data, the ranking between algorithms changed, and the worst algorithm with the most data beat the best algorithm with the least. That is what the crossing on this page is.
What gets dropped in the retelling is the other half. Once you are on the flat part, another tenfold buys almost nothing and the model choice is worth several times as much. Both halves are visible here in one picture, which is the reason to draw it rather than argue about it.
Zinkevich’s ordering is the practical version: a heuristic baseline first, then features and data, then sophistication. The flat dashed line on this figure is what a heuristic baseline looks like, and it beat two real models for the first hundred examples.
+Go and try this for realDraw your own curve before you buy anything
Go and try this
Draw your own curve before you buy anything
Take any model somebody near you relies on and retrain it on a tenth, a quarter, a half and all of the data. Four runs, one afternoon, one chart.
Then decide what to spend the next month on, with the chart in front of you.
What to watch for: Whether the last doubling of data moved the number more or less than the last change of model. That comparison, on your own data, settles an argument that otherwise runs on opinions.
+Check yourselfIt marks itself, and nothing is sent anywhere.
A team has 80 labelled examples and their model is disappointing. What should they do first?
You are told an accuracy. Which of these do you need to know before it means anything?
Tap an item, then tap where it belongs. Dragging works too.
Sources
- SMS Spam Collection v.1
Almeida, Gómez Hidalgo & Yamakami
Every point on every curve here, on the same seeded split the rest of the site uses.
Free to use with attribution to the authors' 2011 paper
- Scaling to Very Very Large Corpora for Natural Language Disambiguation
Banko & Brill (ACL 2001)
The paper this argument usually gets quoted from: four learning algorithms whose ranking changes as the training data grows by orders of magnitude.
- Rules of Machine Learning: Best Practices for ML Engineering
Martin Zinkevich, Google
The practical ordering: features and data first, model sophistication later, and a heuristic baseline before either.