Why is training error an overly optimistic estimate of generalization performance?

Quick Overview

Asks why a model's error on its own training data understates the error it will make on new data from the same distribution. Tests understanding of overfitting, how the gap scales with model complexity and sample size, and how to estimate generalization honestly.

Why is training error an overly optimistic estimate of generalization performance?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Why is training error an overly optimistic estimate of generalization performance? Here generalization performance means the expected error on new data drawn from the same distribution as the training set. ```hint Who chose the parameters Think about which data the parameters were picked to fit, and what that fitting does with the random noise in that particular sample. ``` ### What a Strong Answer Covers - Why fitting to a sample biases that sample's error downward, including the role of noise - How the size of the gap depends on model complexity and sample size - At least one case where training error is near zero while test error is not - Why training error cannot be used to choose model complexity - How to get an honest estimate, with held-out data or an analytic correction ### Follow-up Questions - For ordinary least squares with d parameters and n points, how large is the expected optimism? - Can validation error become optimistic too? When does that happen? - Why is the cross-validation estimate slightly pessimistic for the model you finally train on all the data? - If training and validation error are both high and close together, what does that tell you about the model?

Overview: Asks why a model's error on its own training data understates the error it will make on new data from the same distribution. Tests understanding of overfitting, how the gap scales with model complexity and sample size, and how to estimate generalization honestly.

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

Why is training error an overly optimistic estimate of generalization performance? Here generalization performance means the expected error on new data drawn from the same distribution as the training set.

What a Strong Answer Covers Guidance

  • Why fitting to a sample biases that sample's error downward, including the role of noise
  • How the size of the gap depends on model complexity and sample size
  • At least one case where training error is near zero while test error is not
  • Why training error cannot be used to choose model complexity
  • How to get an honest estimate, with held-out data or an analytic correction

Follow-up Questions Guidance

  • For ordinary least squares with d parameters and n points, how large is the expected optimism?
  • Can validation error become optimistic too? When does that happen?
  • Why is the cross-validation estimate slightly pessimistic for the model you finally train on all the data?
  • If training and validation error are both high and close together, what does that tell you about the model?