A multi-class classifier is evaluated with macro-F1 and shows improvement for frequent classes but degradation for rare classes. You want to address this while maintaining overall stability. Which strategy is most appropriate for SageMaker training workflows?
Answer
Use class-weighted loss (or balanced sampling) and monitor macro-F1 alongside per-class precision/recall
Explanation
Class weighting or balanced sampling targets representation of rare classes. Monitoring macro-F1 and per-class metrics ensures improvements aren’t limited to majority classes.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
In a SageMaker feature store scenario, you must ensure training and online inference both see identical feature transformations, including event-time correctness for late-arriving data. Which design most reliably achieves that?
View question →
A pipeline needs to train, evaluate, and conditionally register a model in a multi-account environment. Which combination of AWS services and settings most directly supports automated deployment governance while enforcing least-privilege access to the trained model artifacts?
View question →
A dataset includes user events. You need to build an online feature set that reflects the last known state at request time, even when events arrive out of order. Which SageMaker Feature Store pattern best satisfies point-in-time correctness requirements?
View question →
You have a trained model and must decide between using a SageMaker model package for deployment and using a raw training artifact directly. Which choice best supports reproducibility and auditability in a governed workflow?
View question →
You want to deploy a model with real-time inference, but you expect high variance in request sizes and latency. Which SageMaker deployment configuration most directly helps stabilize inference performance and reduce tail latency?
View question →
You’re building a K-Nearest Neighbors (KNN) model in SageMaker with mixed numeric/categorical features. Which approach best prevents data leakage during feature preprocessing when using multiple training jobs for model evaluation and hyperparameter tuning?
View question →