Courseiva
ModelingmediumMultiple ChoiceObjective-mapped

MLS-C01 Modeling Practice Question

A data scientist is training a multiclass classification model to categorize support tickets into 50 categories. The dataset has 100,000 labeled tickets. The scientist uses a random forest classifier with 100 trees. The model achieves 90% accuracy on the test set, but the F1-score for some rare categories is below 0.1. The scientist wants to improve performance on rare categories without significantly reducing overall accuracy. Which approach should the scientist try?

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

Use class_weight='balanced' or compute custom class weights

(use class_weight='balanced' or compute custom class weights) helps the model focus on rare classes by assigning higher penalties to misclassifications of minority classes. Option B (reduce the number of trees to 50) may reduce model capacity and hurt overall performance. Option C (switch to a one-vs-rest logistic regression model) may not handle rare classes well without class weighting. Option A (increase the maximum depth of trees) could lead to overfitting and may not address class imbalance.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Increase the maximum depth of trees

    Why it's wrong here

    Deeper trees may overfit to majority classes.

  • Reduce the number of trees to 50 to prevent overfitting

    Why it's wrong here

    Fewer trees may reduce performance on all classes.

  • Switch to a one-vs-rest logistic regression model

    Why it's wrong here

    Logistic regression may underfit complex patterns.

  • Use class_weight='balanced' or compute custom class weights

    Why this is correct

    Class weights penalize misclassifications of rare classes more heavily.

About these practice questions

One of 1,672 original MLS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.