Decision Tree & SHAP: Bank Marketing Prediction
A tree-based model comparison and SHAP interpretability study on the UCI Bank Marketing dataset, identifying which factors genuinely drive term-deposit subscription success under substantial class imbalance, and turning that into an actionable campaign strategy.
The Challenge
Gradient Boosting reached 0.9485 ROC-AUC predicting term-deposit subscriptions, with SHAP analysis revealing call duration, not customer demographics, as the dominant driver of conversion.
A marketing team running these campaigns needed to know which contacts were worth calling, and why some conversations converted while most didn't. The dataset was heavily imbalanced (88.6% no-subscription vs 11.4% subscription), which makes naive accuracy misleading and model interpretability essential for turning predictions into an actual campaign strategy.
Approach
Results
Gradient Boosting was the clear winner at 0.9485 ROC-AUC, narrowly ahead of a tuned Decision Tree (0.921) and XGBoost (0.920), with the untuned baseline Decision Tree trailing well behind at 0.738, a result that shows how much of tree-based model performance comes down to tuning discipline rather than algorithm choice alone.
SHAP analysis identified call duration as by far the strongest predictor of a successful subscription, with a clear positive relationship: longer, more substantive conversations converted more often. Macroeconomic indicators (employment variation rate, number employed) were the next most influential signals, both negatively correlated with subscription, ahead of campaign contact frequency and customer age.
Business Impact
The SHAP findings translate directly into a call-quality-over-quantity strategy: training agents toward longer, higher-value conversations rather than maximising call volume, timing campaign intensity around favourable macroeconomic conditions, and capping contact frequency to avoid the fatigue effect the model surfaced. Deployed for real-time lead scoring, the Gradient Boosting model gives the marketing team a way to prioritise high-potential contacts before they pick up the phone, rather than after.