Data Science / ML · Case study 06

Credit Default Risk Prediction

A risk score that ranks borrowers — optimised for ROC-AUC, not accuracy, and the README explains why.

The problem

At the moment of loan application: given everything known about a customer, how likely are they to default? The real output isn't a yes/no label but a ranking that drives approval, credit limit and risk-based pricing.

The build

A PyTorch ANN over engineered financial and behavioural features, evaluated with ROC-AUC because the classes are imbalanced and the cost of a missed defaulter far exceeds the cost of declining a good customer. The whole walkthrough is an already-executed notebook that renders with charts on GitHub.

Architecture

— one teal highlight: the ranking metric

What I found

Accuracy is the wrong metric for imbalanced risk: a model that predicts 'no default' for everyone scores well and is worthless. Ranking quality is what the credit team actually consumes.

The reps

Framing the objective correctly took longer than training the network — the modelling only makes sense once the business decision is written down first.

Results

  • ROC-AUC
    primary metric, chosen deliberately
  • ANN
    PyTorch, with baselines for comparison
  • 1
    executed notebook, charts render on GitHub

What's verified

Every case study carries this block

What was measured, and what was not. Nothing in the second column is estimated into the first.

Measured

The notebook is committed already-executed; all charts and metrics are reproducible from it.

Not executed

Lending data is simulated — real default data is confidential, and the README says so rather than implying otherwise.

PythonPyTorchpandasscikit-learnmatplotlib
View repository →