← SKAY · Portfolio
Open Live App ↗GitHub
Production ML · Calibrated PD · Live

Credit Risk
Probability of Default

A calibrated default-risk scoring engine on 307,000 real loan applications — LightGBM, SHAP explanations per applicant, and an interactive threshold simulator. Not a notebook: a config-driven pipeline with 19 pytest tests.

0.775
AUC
0.550
Gini
0.067
Calibrated Brier
307K
Applicants

What I built

01
Real data, real scale
307,000 loan applicants and 153 features, 31 of them engineered from the bureau and credit-history tables.
02
Discrimination
LightGBM reaches AUC 0.775 / Gini 0.550 on held-out data — reported with Gini and KS, the metrics a credit team actually reads.
03
Calibration
Isotonic calibration cuts the Brier score from 0.147 to 0.067 without touching ranking — a score you can read as a probability.
04
Explainability
SHAP explains every individual score, so a decision can be justified to a regulator or a customer.

Calibration

Same ranking. A probability you can trust.

Raw LightGBMBrier 0.147
Isotonic-calibratedBrier 0.067

Lower is better. Calibration changes the probabilities, not the order — AUC stays at 0.775.

The experiment I didn’t ship

An Optuna tuning run scored below the baseline. It was documented and rejected rather than shipped — the reported model is the one that actually performed best.

LightGBMSHAPscikit-learnIsotonic calibrationOptunaPandasStreamlitpytestPython

Score an applicant yourself.

Five-tab Streamlit business simulator — move the threshold and watch approvals, defaults and SHAP reasons change.

Open Streamlit App ↗View Source

Built by SKAY · Oussama Skia — AI / ML Engineer · Casablanca