MLS-C01 · Question #261
An online advertising company is developing a linear model to predict the bid price of advertisements in real time with low-latency predictions. A data scientist has trained the linear model by…
The correct answer is A. Retrain the model with L1 regularization applied. To prevent overfitting in a linear model with many features and also reduce the number of features, retraining the model with L1 regularization is the most effective solution.
Question
An online advertising company is developing a linear model to predict the bid price of advertisements in real time with low-latency predictions. A data scientist has trained the linear model by using many features, but the model is overfitting the training dataset. The data scientist needs to prevent overfitting and must reduce the number of features. Which solution will meet these requirements?
Options
- ARetrain the model with L1 regularization applied.
- BRetrain the model with L2 regularization applied.
- CRetrain the model with dropout regularization applied.
- DRetrain the model by using more data.
How the community answered
(19 responses)- A68% (13)
- B11% (2)
- C16% (3)
- D5% (1)
Why each option
To prevent overfitting in a linear model with many features and also reduce the number of features, retraining the model with L1 regularization is the most effective solution.
L1 regularization (Lasso regularization) adds a penalty to the loss function that is proportional to the absolute value of the model's weights. This encourages sparsity by driving the weights of less important features exactly to zero, effectively performing automatic feature selection and reducing the number of features while preventing overfitting.
L2 regularization (Ridge regularization) adds a penalty proportional to the square of the weights. While it helps prevent overfitting by shrinking weights, it rarely drives them completely to zero, so it does not primarily reduce the number of features.
Dropout regularization is primarily used in neural networks to prevent overfitting by randomly dropping units, but it is not typically applied directly to linear models to reduce the number of features.
Retraining the model with more data can help reduce overfitting, but the question specifically asks to reduce the number of features, which L1 regularization directly addresses more effectively than simply adding more data.
Concept tested: L1 regularization, feature selection, overfitting
Source: https://scikit-learn.org/stable/modules/linear_model.html#lasso
Topics
Community Discussion
No community discussion yet for this question.