How to Fix Image Classification When One Class Is Rare?

Answer Correct answer: B — Optimize for F1 score and apply image augmentation to the underrepresented class to improve the imbalanced image classifier's performance.

An ML engineer is tuning an image classification model that shows poor performance on one of two available classes during prediction. Analysis reveals that the images whose class the model performed poorly on represent an extremely small fraction of the whole training dataset. The ML engineer must improve the model’s performance. Which solution will meet this requirement?

  1. Optimize for accuracy. Use image augmentation on the less common images to generate new samples.
  2. Optimize for F1 score. Use image augmentation on the less common images to generate new samples. Correct Answer
  3. Optimize for accuracy. Use Synthetic Minority Oversampling Technique (SMOTE) on the less common images to generate new samples.
  4. Optimize for F1 score. Use Synthetic Minority Oversampling Technique (SMOTE) on the less common images to generate new samples.

Community Insight

The question tests imbalance handling for image data plus metric choice; the trap is applying SMOTE, which is built for numeric feature vectors, to raw images or optimizing accuracy on a skewed dataset.

This MLA-C01 scenario tests how to handle severe class imbalance in an image classification model that performs poorly on an underrepresented class. The correct approach combines F1-score optimization with image augmentation of the minority class, not SMOTE on raw pixels.

Many candidates choose accuracy plus augmentation or SMOTE, but accuracy is misleading under class imbalance and SMOTE interpolates numeric features rather than creating realistic image variations.

Community Discussion (2 comments)

Mohamed_Tareq 👍 1 Selected: B
F1 score balances precision and recall, making it more appropriate when the minority class is important. Image augmentation is well suited to image data because it creates realistic variations of minority-class images (rotation, cropping, flipping, etc.). SMOTE is primarily designed for numerical feature vectors, not raw image data, so it is generally not the appropriate choice here. Therefore, B is the best answer.
Alabi 👍 1 Selected: B
B. Optimize for F1 score. Use image augmentation on the less common images to generate new samples. Why B is correct The problem describes: Image classification One class is extremely underrepresented * Poor performance on the minority class This is a class imbalance problem.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Option B addresses both halves of the problem. Because one class is an extremely small fraction of the training data, accuracy can look high while the model still ignores or misclassifies the minority class; F1 score balances precision and recall and therefore gives a much better signal for the rare class. Image augmentation is the appropriate resampling technique for image data because operations such as rotation, flipping, cropping, and color jitter create new, label-preserving samples of the less common class. Together, F1 optimization and minority-class augmentation directly improve the model's ability to recognize the underrepresented class without fabricating unrealistic pixel patterns.

Why the Other Options Are Wrong

Option A uses image augmentation correctly but optimizes for accuracy, which is exactly the metric that hides poor minority-class performance in an imbalanced dataset. Options C and D rely on Synthetic Minority Oversampling Technique (SMOTE), which interpolates between numeric feature vectors; applying it to raw images produces blended pixel values that do not correspond to realistic images. Option C also combines SMOTE with the wrong metric, accuracy, so it fails on both counts. Option D pairs the right metric, F1, with an inappropriate oversampling method for image data.

Community Comment Notes

Mohamed_Tareq explains that F1 score balances precision and recall and is preferable when the minority class matters, while noting that "SMOTE is primarily designed for numerical feature vectors" rather than raw image data. Alabi frames the scenario as a class imbalance problem: image classification with one extremely underrepresented class and poor performance on that minority class. The community reasoning therefore converges on image augmentation with F1 optimization, matching the analysis above.

Exam Strategy

When an MLA-C01 question mentions imbalance, first identify the data type and the evaluation metric. For image data, prefer augmentation over SMOTE, and prefer F1 or recall-oriented metrics over accuracy when the minority class is the business concern.

Frequently Asked Questions

Why is SMOTE inappropriate for the rare image class in this scenario?

SMOTE interpolates between numeric feature vectors, so applying it to raw pixels often creates unrealistic blended images rather than meaningful variations of the minority class.

Why optimize for F1 score instead of accuracy?

With one extremely small class, high accuracy can hide poor minority-class predictions; F1 balances precision and recall so improvement on the rare class is actually measured.

More MLA-C01 FAQ →

Related Analysis

Practice All MLA-C01 Questions

Access 115 questions with complete answers and detailed explanations.

View Full MLA-C01 Practice Test →

← Back to MLA-C01 Study Guide