TensorTau PathToAGI Doing Machine Learning Honestly Level 05

Level 05 · Doing Machine Learning Honestly · Chapter 068

Sample Complexity Intuition

How much data is enough to trust what a model has learned?

There is no universal number. Required sample size depends on noise, desired accuracy, confidence, model class and data diversity.

1. Estimation gets steadier with more samples

For many averages, uncertainty shrinks roughly like

1N.\frac{1}{\sqrt N}.

To cut this kind of sampling uncertainty in half, we often need roughly four times as many independent examples—not merely twice as many.

2. More choices require more evidence

If a learner can choose among a very large collection of hypotheses, some may fit a small dataset by luck. More expressive search generally requires more evidence to rule out accidental patterns.

3. Accuracy has a price

A simplified concentration-style bound often has the flavour

N∝complexity+log⁡(1/δ)ϵ2,N \propto \frac{\text{complexity}+\log(1/\delta)}{\epsilon^2},

where ϵ\epsilon is desired error tolerance and 1−δ1-\delta is desired confidence. Do not memorize this as a universal formula; notice the relationships: tighter tolerance, higher confidence or more complexity demands more data.

4. Diversity beats raw duplication

A million near-duplicate images are not equivalent to a million independent situations. Effective sample size depends on how much new information each example contributes.

What to Remember

“More data” matters because it reduces uncertainty and constrains flexible models, but useful sample size is about independent, representative information—not row count alone.

Next → VC Dimension Intuition: can we describe model capacity by asking how many label patterns a hypothesis class can realize?

Six ways to work the chapter, climbing from explaining it in your own words to investigating it like a researcher. Reading is not enough — this is where the chapter lands.

  1. Explain: Why does halving standard-error-like uncertainty often require ~4× data?
  2. Calculate: Compare 1/N1/\sqrt N for N=100, 400 and 1600.
  3. Predict: How does heavy label noise affect required sample size?
  4. Break: Duplicate each training row 100 times and show why information barely changes.
  5. Build: Simulate estimating a Bernoulli probability as N grows.
  6. Investigate: Plot test error versus dataset size for a simple and flexible model.