A data scientist is training a regression model to predict house prices. The model performs near perfectly on the training data but poorly on a held-out test set. The scientist suspects the model is memorizing the training data instead of learning general patterns. Which technique is most appropriate to directly address this issue?
Trap 1: Increase the size of the training dataset
More data can help, but it is not a direct modeling technique; regularization is applied at training time to constrain the model and prevent memorization.
Trap 2: Increase the complexity of the model (e.g., add more features)
Increasing complexity typically makes overfitting worse, as the model becomes more capable of memorizing noise.
Trap 3: Switch to a different regression algorithm
Changing algorithms may help, but regularization is a direct and standard technique for reducing overfitting in regression models.
- A
Increase the size of the training dataset
Why wrong: More data can help, but it is not a direct modeling technique; regularization is applied at training time to constrain the model and prevent memorization.
- B
Increase the complexity of the model (e.g., add more features)
Why wrong: Increasing complexity typically makes overfitting worse, as the model becomes more capable of memorizing noise.
- C
Apply L2 regularization to the model
L2 regularization penalizes large coefficients, reducing the model's tendency to fit noise and improving generalization.
- D
Switch to a different regression algorithm
Why wrong: Changing algorithms may help, but regularization is a direct and standard technique for reducing overfitting in regression models.