You need to choose between logistic regression and XGBoost for a binary classification problem with severe class imbalance and nonlinear decision boundaries. Which approach best aligns to advanced evaluation and robust training under imbalance?

Answer

Use XGBoost with class imbalance handled via scale_pos_weight and optimize log loss with stratified validation; report PR-AUC in addition to ROC-AUC

Explanation

B uses an imbalance-aware objective (scale_pos_weight) and emphasizes appropriate metrics (log loss/PR-AUC) that better reflect performance under imbalance. ROC-AUC can look optimistic when positives are rare.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error

Related questions

QuestionBack to list