MLA-C01 Question 117
Select 2You are tasked with building a machine learning model to predict customer churn for a subscription-based business. The dataset contains categorical features such as 'Subscription Type' and 'Region', as well as numerical features like 'Monthly Spend' and 'Tenure'. During the development of the model, you notice that the dataset has missing values in some features and significant class imbalance (only 5% of the data represents churned customers). Which of the following steps should you take to ensure the model performs well on the imbalanced dataset?
- A
Use SMOTE (Synthetic Minority Oversampling Technique) to oversample the minority class.
- B
Normalize numerical features to ensure they are on the same scale.
- C
Evaluate the model using accuracy as the primary metric.
- D
Use a weighted loss function to penalize misclassifications of the minority class more heavily.
- E
Drop rows with missing values to simplify the dataset.
Show answer and explanation
Correct answers: A, D
Explanation
Class imbalance is a common challenge in machine learning tasks, especially in scenarios like churn prediction where the minority class is often underrepresented. To address this, techniques like SMOTE can be used to oversample the minority class, and weighted loss functions can ensure the model pays more attention to the minority class during training. Focusing on metrics such as precision, recall, or F1-score, rather than accuracy, is also critical when dealing with imbalanced datasets.
- A. Correct.
Using SMOTE (Synthetic Minority Oversampling Technique) is an appropriate method for addressing class imbalance by generating synthetic samples for the minority class. This helps the model learn from a more balanced dataset.
- B. Incorrect.
Normalizing numerical features is generally a good practice, but it is not specific to the problem of handling class imbalance. While it may improve model performance overall, it does not directly address the issue of imbalanced classes.
- C. Incorrect.
Accuracy should not be used as the primary metric in this scenario because it can be misleading with imbalanced datasets. For example, predicting the majority class 100% of the time could yield high accuracy but poor performance for the minority class.
- D. Correct.
Using a weighted loss function is a valid approach to address class imbalance. By penalizing misclassifications of the minority class more heavily, the model learns to focus more on predicting the minority class correctly.
- E. Incorrect.
Dropping rows with missing values can lead to significant data loss, especially in scenarios where the dataset is already imbalanced. Techniques like imputation are generally preferred over dropping rows to handle missing values.