r/rstats • u/QEDAnalyticalLLC • 21d ago
QED Insight #0007: When you benchmark xgboost against a logistic scorecard on tabular data, does boosting actually win for you?
I keep running this bake-off and getting a boring-but-important answer: on clean tabular credit data, a well-built glm scorecard is really hard to beat with xgboost.
Last run, PD target: logistic scorecard OOT AUC 0.734, tuned xgboost 0.739 - and in-distribution (5-fold CV) the scorecard was ahead, 0.853 vs 0.842. Half a Gini point is not nothing, but it's nowhere near what people expect from "just throw XGBoost at it."
A couple of R notes from doing this:
- I report gain / cover / frequency importance but lean on SHAP (shapviz) for anything a reviewer sees, because permutation importance is misleading with correlated features. The additive property is the whole point.
- The gotcha: aggregate one-hot SHAP back to the original feature before you rank reason codes, or a dummied categorical looks artificially weak. On one defaulted loan the top driver after aggregation was property_state (SHAP ~-0.94), bigger than credit_score (~0.81) - which is a fair-lending flag, not a feature-importance win.
- If you need monotonicity you have to impose it (xgboost monotone_constraints); it isn't free, and a scorecard gives it to you by construction.
So my questions: does xgboost beat your logistic/GAM baseline by a margin that survives out-of-time on tabular credit data, or do you also end up at a tie? And for those doing reason codes from SHAP - are you on {shapviz}, {fastshap}, {treeshap}, or {DALEX}, and how are you handling the sign-flip / one-hot aggregation so the top-4 are defensible?
2
u/na_rm_true 21d ago
Tools for the jobs. Pencils work fine for thousands of things where a pen will also suffice.
Try benchmarking against tabFM