Question 2
UnclassifiedWhat does L2 regularization (Ridge) penalize in a model?
Correct answer: B
Explanation
L2 regularization, or Ridge, adds a penalty based on the "squared magnitude of the coefficients." This means larger weights increase the loss more, which discourages overly complex models and helps reduce overfitting.
Why each option is right or wrong
A. The number of features used in the model
B. The squared magnitude of the coefficients
Under the standard Ridge objective, the loss is augmented by an L2 penalty term of \(\lambda \sum_j w_j^2\), so the model is penalized for the squared size of its coefficients, not their absolute values. In scikit-learn terms, this is the \(\|w\|_2^2\) penalty used by Ridge regression, which grows quadratically as weights increase.
C. The number of training samples in the dataset
D. The learning rate used during optimization