credit-risk-classifier · banking · propensity

Prioritise the right customers
before the call.

A retail banking propensity model on the UCI Bank Marketing dataset: predict the probability that a customer subscribes a term deposit during a marketing campaign, so the campaign team can prioritise who to call. Built with leakage-free preprocessing and persisted, reproducible metrics.

01
problem What it solves
Retail banks run marketing campaigns over their customer base. Calling everyone is expensive; calling the wrong people wastes budget and harms the relationship. The model ranks the base by subscription probability. The dataset is imbalanced: 88.7% of customers do not subscribe versus 11.3% who do, so the evaluation centres on the ability to prioritise the positive class, not on accuracy.
Dataset
UCI Bank Marketing (41,188 records, 20 features)
Model
Random Forest, class_weight='balanced'
Output
Subscription probability + persisted metrics
02
decisions Engineering decisions
Split before transforming: the scaler and label encoders are fitted on the train set only, avoiding data leakage into the test set.
Stratified split: preserves the 88.7/11.3 class ratio in both folds.
PR-AUC and recall of the positive class: the trade-off that matters for prioritising a call list.
Persisted artefacts: encoders, scaler and column order are reused in inference so production applies exactly the training transformations.
Metrics saved to reports/metrics.json: results are reproducible, not a screenshot of a notebook.
03
results Real numbers
ROC-AUC 0.948
PR-AUC 0.651: versus a 0.113 positive-class baseline, and recall 0.92 on the positive class at precision 0.46.
Honest framing matters: this is a propensity / cross-sell model, not a credit risk model. The campaign-interaction variables (call duration, pdays) make it right for prioritising and segmenting, not for predicting the result before the call is made.