Q4Machine Learning
Question
2 marks
Differentiate between L1 and L2 regularization.
Answer
L1 regularization mathematically forces absolute feature selection by driving weights exactly to zero, while L2 regularization smoothly penalizes massive weights without completely eradicating them.
L1 (Lasso) regularization adds the absolute sum of weights () to the cost function, creating a mathematically sharp diamond constraint that violently forces non-critical feature weights to exactly . L2 (Ridge) adds the squared sum of weights (), creating a smooth circular constraint that shrinks weights toward zero but rarely exactly to zero.