How does L2 regularization affect weights?
Reveal the answer and explore the explanation.
04MediumHigh priorityHow does L2 regularization affect weights?
Answer
MediumHigh priority
How does L2 regularization affect weights?
Answer
Adds a term proportional to the sum of squared coefficients.
Deeper understanding
The L2 penalty adds a term proportional to λΣwᵢ², encouraging smaller weights. It can stabilize correlated predictors and reduce model variance but introduces bias. Avoid treating penalty strength as universally comparable across libraries.
Practical example
Shrink large coefficients without generally forcing exact zeros.
Reference: Further reading ↗