Artificial intelligence · lesson 4 of 4
Overfitting, regularization and data distribution
A model can fit training-specific noise or patterns that do not generalize. Compare training and appropriately held-out performance.
Learn the ideas
Prerequisites: Training losses, validation and algebra.
Overfitting
A model can fit training-specific noise or patterns that do not generalize. Compare training and appropriately held-out performance.
Regularization
Penalties or constraints can prefer simpler parameter solutions. Their effect depends on the model, scaling and chosen strength.
Bias-variance
Model flexibility, sample size and noise influence prediction error. The tradeoff is a framework, not a universal curve guaranteed in all modern settings.
Distribution shift
New data may differ from training data. Validation should reflect the intended use, and monitoring may reveal later drift.
Worked examples
Which pattern often suggests overfitting?
A generalization gap can indicate training-specific fit, though other problems should also be checked.
Very low training error but much worse held-out error
For w=(3,4), calculate squared L2 norm.
3²+4²=25.
25
Check your understanding
8 questionsDecimals or fractions are accepted for numeric answers. Proofs and written responses use sample answers and require human marking. This is practice, not a protected examination.
Further reading and review references
These are reference links, not copied exercises, institutional endorsement or proof of independent review.