Train, validate, adjust, then test once
1,000 emails, split once at the start
Not to scale on small screens
1Trainon training emails
2Validatescore on validation
3Adjustchange a setting
repeat as often as you like
4Test oncenever seen before
5Reportwhatever number you get
Key points
Where the sample size formula applies
|H|rules you allow
εerror you accept
δchance of bad luck
m ≥ ln(|H| / δ) / ε
emails needed in training
Assumes at least one perfect rule exists (realizable case)
not part of m
own formula±9.6% at 200
Not to scale on small screens
Key points
How big should the list of rules be
Move the sliders. The curves show the worst-case error you can guarantee. The estimation curve comes from the agnostic bound with δ = 0.05. The approximation curve is a made-up shape, because its real shape depends on your problem
Approximation error (the list)
Estimation error (the emails)
Total you can guarantee
Sweet spot
Error you can guarantee (lower is better)
Number of rules in the list (|H|)
100100,000
11 billion
Play slides the emails from 100 to 100,000 and the sweet spot follows
At the list size you picked
Approximation error (the list)
Estimation error (the emails)
Total you can guarantee