Skip to main content
Module 4 · Lesson 2 of 616/56 in the course~22 min
Module lessons (2/6)

Overfitting and underfitting

Lesson preview6 hands-on exercises readyMachine Learning: from first principles to practice · Module 4 — Generalization and evaluation

Reading train and test error, and the bias and variance trade-off.

What you'll learn in this lesson

  • Tell underfitting from overfitting by comparing training and test error.
  • Explain the bias and variance trade-off in plain words.
  • Choose a model complexity using the test curve rather than the training curve.

Overview

Two students prepare for an exam. One skims the book and understands little: they do poorly on practice questions and on the exam. The other memorises every practice answer: they ace the practice questions but fail the exam as soon as the questions change.

The data follow a smooth curve plus noise. Raise the degree of the polynomial and watch the two errors.

Sections covered in this lesson

  1. 1The hook: the student who memorised the textbook
  2. 2Try it: polynomial fit lab
  3. 3Bias and variance in one sentence each
  4. 4Progressive examples: tracing train vs. test error
  5. 5Practice
  6. 6Check your understanding
Pro Lesson · Module 4 — Generalization and evaluation

Unlock "Overfitting and underfitting" and the full Machine Learning: from first principles to practice curriculum

Reading train and test error, and the bias and variance trade-off.

Unlock all 6 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.

  • Instant access to all advanced modules in Machine Learning: from first principles to practice plus 17 more courses
  • Hands-on browser exercises with automated test suites and solutions
  • 14-day money-back guarantee processed via Paddle.com

14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.