Which approach is best for handling class imbalance during training in Amazon SageMaker?
Answer
B) Using class weights or balanced sampling to adjust the loss or sampling distribution
Explanation
Class weights and balanced sampling directly address imbalance by influencing gradient updates. Duplicating blindly, label conversion, or learning-rate changes do not specifically correct imbalance.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
You need to store and retrieve embeddings for similarity search in ML inference. Which AWS service is most appropriate?
View question →
In Amazon SageMaker, which feature helps you deploy a model and automatically scale the number of instances based on traffic?
View question →
A company wants to fine-tune a pre-trained model for text classification and deploy it for real-time predictions. Which SageMaker capability best supports this workflow?
View question →
A model’s training set contains 5% fraud cases. You want to maximize the F1 score on a validation set while training. Which actions are most appropriate?
View question →
A training pipeline uses Amazon S3 as the data lake and must trigger a training run when new files arrive. Which combination best implements an event-driven trigger?
View question →
Which AWS service can you use to run large-scale preprocessing and feature extraction jobs using Spark on data in S3?
View question →