Skip to content
M.U.N.U.O.Data × AI × Systems

Machine Learning Foundations

Overfitting, Underfitting, and Regularization

Module 9 of 10

Learning objectives

  • Explain the ideas behind overfitting, underfitting, and regularization.
  • Apply the ideas to the example and identify how you would check the result.

Concepts

Underfitting misses useful patterns even on training data. Overfitting captures training-specific noise and generalizes poorly. Limit tree depth or penalize large coefficients to reduce complexity, and validate the trade-off.

Practical example

Compare train and test results as a tree gets deeper. A widening gap can signal overfitting.

Try the exercise
  1. Define the task. Compare train and test results as a tree gets deeper. A widening gap can signal overfitting.
  2. Identify the key idea. Underfitting misses useful patterns even on training data.
  3. Check your decision. Describe an alternative and how you would compare its results.
Open the interactive lab

Knowledge check

Which pattern suggests overfitting?

What does L2 regularization penalize?

How should you select regularization strength?