A machine learning engineer is performing exploratory data analysis on a dataset containing customer transactions. They notice that the target variable is highly imbalanced: 99% of samples belong to class 0 and 1% to class 1. Which technique should they use to address this imbalance before training a classification model?
SMOTE creates synthetic minority samples, helping balance the dataset.
Why this answer
SMOTE (Synthetic Minority Over-sampling Technique) generates synthetic samples for the minority class, which helps balance the dataset and improves model performance on the minority class without losing information from the majority class. Option A is wrong: training on raw data without addressing imbalance will cause the model to be biased toward the majority class and perform poorly on the minority class. Option C is wrong: accuracy is not a suitable evaluation metric for imbalanced datasets because a model that always predicts the majority class will achieve 99% accuracy, masking poor performance on the minority class; instead, metrics like precision, recall, F1-score, or AUC should be used.
Option D is wrong: under-sampling the majority class to match the minority class size discards a large amount of data, potentially losing valuable patterns and reducing model performance.