MLS-C01 Modeling Practice Question
A data scientist is training a random forest model on a dataset with 50 features. After training, the model achieves 98% accuracy on the training set but only 85% on the test set. Which technique is most appropriate to reduce the generalization error?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Reduce the maximum depth of each tree
The gap indicates overfitting. Random forest can overfit if trees are too deep or if the number of trees is too high. Reducing the maximum depth of trees limits model complexity and helps generalization. Increasing the number of trees typically reduces overfitting but can also increase computational cost; however, reducing depth is more direct. Feature selection or PCA might help but are less direct than controlling tree complexity.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Apply Principal Component Analysis (PCA) to reduce dimensionality
Why it's wrong here
PCA could help but is not the most direct method; it may lose interpretability.
- ✗
Add more training data
Why it's wrong here
More data can help, but the question asks for a technique to apply, and reducing tree depth is a standard regularization for random forests.
- ✗
Increase the number of trees in the forest
Why it's wrong here
While more trees can reduce overfitting, they also increase computational cost and may not be as effective as limiting tree depth.
- ✓
Reduce the maximum depth of each tree
Why this is correct
Shallow trees are simpler and less likely to overfit, thus improving test accuracy.
Go deeper
Related to this question
About these practice questions
This MLS-C01 question is part of Courseiva's 1,672-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.