MLA-C01 Question 49
Select 3You are building a machine learning model using Amazon SageMaker for a binary classification problem. The dataset is large and highly imbalanced, with 95% of the data belonging to the majority class. What steps can you take to improve the model’s performance?
- A
Use a weighted loss function to penalize misclassifications of the minority class more heavily.
- B
Collect more data for the minority class and retrain the model.
- C
Use a different AWS region with higher computational resources to improve model training speed.
- D
Apply oversampling techniques such as SMOTE (Synthetic Minority Oversampling Technique) to balance the dataset.
- E
Use a linear regression model instead of a classification model to handle the imbalance.
Show answer and explanation
Correct answers: A, B, D
Explanation
Imbalanced datasets can lead to models that are biased toward the majority class. Techniques such as using a weighted loss function, collecting more data for the minority class, and applying oversampling methods (e.g., SMOTE) are effective strategies to improve model performance on such datasets. Simply switching AWS regions or using an incorrect model type does not help address the core problem.
- A. Correct.
Using a weighted loss function is a standard approach to handle imbalanced datasets. It ensures the model pays more attention to the minority class.
- B. Correct.
Collecting more data for the minority class can improve the representation of the minority class in the dataset, leading to better model performance.
- C. Incorrect.
Switching AWS regions does not address the dataset imbalance or improve model performance. It may only affect resource availability or pricing.
- D. Correct.
Oversampling techniques like SMOTE can help balance the dataset by synthetically generating samples for the minority class, leading to better training outcomes.
- E. Incorrect.
Using a linear regression model for a classification task is inappropriate and does not address the issue of class imbalance.