AWS Certified Machine Learning – Specialty — Question 230
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?
Answer options
- A. Retrain the model with L1 regularization applied.
- B. Retrain the model with L2 regularization applied.
- C. Retrain the model with dropout regularization applied.
- D. Retrain the model by using more data.
Correct answer: A
Explanation
The correct answer is A because L1 regularization encourages sparsity in the feature set, effectively reducing the number of features used and preventing overfitting. While L2 regularization (option B) also addresses overfitting, it does not reduce the number of features in the same way. Dropout regularization (option C) is typically used in neural networks, and using more data (option D) may help but doesn't directly address feature reduction.