Start studying
Module 1 · Machine Learning Module contents
Module 1  ·  Card 21 / 55beginner

Overfitting

Overfitting happens when a model learns the training data too specifically.

It scores brilliantly on training data but badly on anything new.

It is like memorising past exam answers instead of understanding the subject.

A very complex model plus not enough data makes overfitting much more likely.

More data, regularization, dropout or a simpler model all help.

Learn in depth ↓
Module 01 · Machine Learning · 55 concepts
In depth  /  15 lines

Overfitting, in more detail

A model can score well on the data it was trained on and still be useless.

What counts is how it does on data it has never seen before.

Overfitting is the gap between those two scores.

Think of a student who memorised last year's exam paper.

He gets full marks on that paper and fails a new one.

Your model can do exactly the same thing with your rows.

You can watch it happen while the model trains.

Training error keeps falling, because the model keeps memorising.

Validation error falls for a while, then turns and starts rising.

That turn is the moment memorising took over from learning.

It happens when the model is too powerful for how much data you have.

The same model can be fine on a million rows and overfit on a thousand.

More data helps most, then dropout, early stopping, or just a smaller model.

Never tune your choices on the test set, or the score stops being honest.

If the model also scores badly on training data, your problem is the opposite one.

Want the full technical article? Wikipedia ↗
Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
A model scores 98% on training data and 61% on test data. What is happening?
Machine Learning

55 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close