Phase 3 · Machine learning · Evaluation
Regularization
Penalize complexity so models generalize.
Open this lesson Create a free account
Why it matters
Overfitting happens when a model is free to bend around noise. Regularization takes some of that freedom away by charging a price for complexity, usually for large weights. It's built into nearly every model you'll train: the C setting in scikit-learn's logistic regression, the weight decay in AdamW that fine-tunes LLMs, dropout in neural networks. Knowing what the knob does lets you turn it on purpose.
What you'll be able to do
- Explain regularization as a penalty on model complexity added to the loss
- Compare ridge (L2) and lasso (L1) penalties, and why lasso zeroes out features
- Choose the penalty strength with validation data
- Recognize regularization in deep learning: weight decay, dropout, early stopping
Before this lesson
Next in this phase: Bias and variance