QUESTION 4 OF 10

How does L2 regularization affect weights?

Reveal the answer and explore the explanation.

04
MediumHigh priority

How does L2 regularization affect weights?

Answer
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 ↗

Last 30 min revisionHigh-yield interview Q&As