How does regularization help prevent overfitting in machine learning models?
- Removes features
- Adds penalties for model complexity to discourage learning noise in training data ✓
- Increases training data size
- Improves prediction speed
Correct answer: Adds penalties for model complexity to discourage learning noise in training data
Option B is correct because regularization techniques such as L1 (Lasso) and L2 (Ridge) add a penalty term to the loss function that grows with model complexity, discouraging the model from fitting noise and spurious patterns in training data, which in turn improves generalization to unseen data. Option A is wrong because regularization does not remove features from the model; while L1 regularization can drive some coefficients to zero, this is a side effect rather than the mechanism, and the primary action is penalizing large weights rather than explicitly eliminating features. Option C is wrong because increasing training data size is a valid strategy to reduce overfitting through data augmentation, but it is a separate technique from regularization and does not describe how regularization works. Option D is wrong because regularization has no direct effect on prediction inference speed; model speed is influenced by architecture size, hardware, and optimization frameworks, not by the regularization penalty applied during training.
Topic: · regularization, overfitting, l1 l2 penalty, model generalization