What is generalization error?

Quick Overview

Asks what generalization error is and how it differs from training error. Tests whether you can define it as expected loss on new data, read the generalization gap, estimate it with held-out data or cross-validation, and explain the bias, variance and noise decomposition.

What is generalization error?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

A model that scores well on its training data can still do poorly once it is deployed. What is generalization error? ```hint Which data, which distribution Ask which data the error is measured on and which distribution that data comes from, then compare it with training error. ``` ### What a Strong Answer Covers - A definition of generalization error as expected error on new data - How it relates to training error and what the generalization gap indicates - How to estimate it in practice and what biases the estimate - The bias, variance and noise decomposition under squared loss - The assumption about the data distribution and what happens when it fails ### Follow-up Questions - How would you tell overfitting from underfitting using training and validation error? - The bias-variance decomposition averages over training sets. What does that mean when you look at a single fitted model? - Validation error is 8% but error in production is 14%. What could explain the difference? - How does adding training data affect each term of the decomposition?

Overview: Asks what generalization error is and how it differs from training error. Tests whether you can define it as expected loss on new data, read the generalization gap, estimate it with held-out data or cross-validation, and explain the bias, variance and noise decomposition.

General logo
General
Nov 25, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

A model that scores well on its training data can still do poorly once it is deployed. What is generalization error?

What a Strong Answer Covers Guidance

  • A definition of generalization error as expected error on new data
  • How it relates to training error and what the generalization gap indicates
  • How to estimate it in practice and what biases the estimate
  • The bias, variance and noise decomposition under squared loss
  • The assumption about the data distribution and what happens when it fails

Follow-up Questions Guidance

  • How would you tell overfitting from underfitting using training and validation error?
  • The bias-variance decomposition averages over training sets. What does that mean when you look at a single fitted model?
  • Validation error is 8% but error in production is 14%. What could explain the difference?
  • How does adding training data affect each term of the decomposition?