Question 908 of 1,672
MLS-C01 Modeling Practice Question
A data scientist is training a binary classifier to detect network intrusions. The dataset has 1,000 features and 10 million samples, but only 0.1% are positive (intrusions). The scientist uses XGBoost with scale_pos_weight set to 100. The model achieves a recall of 0.90 and precision of 0.05 on the test set. The business requires precision of at least 0.50 while maintaining recall above 0.80. Which technique should the scientist apply?
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
✓
Tune the decision threshold on validation data to maximize F1 score
Tuning the decision threshold on validation data adjusts the trade-off between precision and recall. The current model has high recall (0.90) but low precision (0.05). By raising the decision threshold, precision increases while recall decreases. Tuning on validation data allows finding a threshold that meets the business requirements of precision ≥0.50 and recall ≥0.80. Option A (switching to random forest) may not achieve the required precision. Option B (undersampling majority class) may reduce recall. Option D (increasing scale_pos_weight to 500) further increases recall and decreases precision.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Switch to a random forest classifier with class weights
Why it's wrong here
Random forest may not achieve the required precision either.
- ✗
Randomly undersample the majority class to achieve 1:1 ratio
Why it's wrong here
Undersampling may reduce recall due to data loss.
- ✓
Tune the decision threshold on validation data to maximize F1 score
Why this is correct
Threshold tuning directly controls precision-recall trade-off.
- ✗
Increase scale_pos_weight to 500
Why it's wrong here
Higher weight increases recall but decreases precision.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 20, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.