← geetpurohit.com

Credit-Default Scorecard

A loan-level model that estimates how likely a borrower is to default. I built it the way banks actually build credit models, with weight-of-evidence (WOE) binning and logistic regression, so every prediction can be explained. Then I benchmarked it against an XGBoost challenger with SHAP. It's trained on public LendingClub data, which stands in for the kind of proprietary credit-risk work I do day to day.

Python scikit-learn WOE / IV Logistic Regression XGBoost SHAP Calibration

Try it live

Adjust an applicant’s profile and the model scores it right in your browser, instantly. No server, nothing sent anywhere.

Probability of default
-
-
Credit score
-
Risk band
Why this score lowers risk  raises risk

Each bar is that feature’s exact contribution to the score (points added or removed). Because the model is additive, the pieces add up to the total. It's the same idea as a SHAP explanation, just computed out in the open.

Model performance

-
ROC-AUC scorecard
-
KS statistic
-
Gini
-
ROC-AUC XGBoost challenger
ROC curve
ROC: scorecard vs. challenger
Calibration curve
Calibration: predicted vs. actual default rate
KS separation
KS separation of goods vs. bads
Information value by feature
Predictive power (IV) by feature
SHAP summary
SHAP summary: XGBoost challenger

How it works

  1. Label. Completed LendingClub loans are labelled default (charged-off) vs. paid; in-flight loans are dropped to avoid unknown outcomes.
  2. WOE binning. Each feature is binned and mapped to its weight-of-evidence (the log-odds of good vs. bad), which linearises the relationship and keeps the model monotonic and easy to read.
  3. Scorecard. A logistic regression on the WOE features produces calibrated probabilities, scaled into a familiar points-based credit score (PDO scaling).
  4. Challenger + SHAP. An XGBoost model is trained as a performance ceiling; SHAP confirms the drivers agree with the scorecard’s logic.
  5. Validation. Held-out ROC-AUC, KS, Gini, and a calibration curve, the metrics a model-risk review actually asks for.