Explainable credit risk intelligence

Credit risk,
made accountable.

An end-to-end data science system that turns Home Credit data into calibrated risk evidence—then makes every prediction traceable, governed and ready for human review.

0.784ROC-AUC
01 calibrated probability
02 local reason codes
03 human decision
0.7840Final holdout ROC-AUC
0.2732Final holdout PR-AUC
0.0663Brier score
113Automated tests

The portfolio case

Beyond a good model score.

A credible lending model is more than an algorithm. RiskLens documents the data, split strategy, calibration, operating threshold, subgroup behavior, explanations and post-deployment drift.

Research decision support only. It does not autonomously approve or decline loans.

Frozen portfolio evidence

● model locked
DimensionMeasureResultEvidence
DiscriminationROC-AUC0.7840One-time holdout
Minority-class qualityPR-AUC0.2732One-time holdout
Probability accuracyBrier score0.0663Calibrated
Decision policyRecall / precision42.57% / 27.28%Threshold 0.1667

Evaluated once on 30,752 untouched applicants. Post-holdout tuning is prohibited.

Two assessment modes

One platform. Two honest contexts.

RiskLens never pretends that a brand-new application has the same evidence as an applicant already represented in historical records.

01

Existing applicant

Full-history assessment

Scores an applicant from the Kaggle population using application data plus bureau, prior application, installment, credit-card and POS history.

  • 688 transformed governed features
  • Applicant-specific SHAP drivers
  • Frozen calibrated model
RiskLens existing applicant assessment dashboard
02

New application

Application-time simulator

Accepts only information available at application time and uses a separately evaluated application-only model. It estimates risk; it does not grant a loan.

  • Input range and ratio checks
  • Transparent application context
  • Direct sensitive fields excluded
RiskLens new application risk simulator

Reproducible workflow

Evidence at every stage.

Each stage is executable from the CLI, tested, versioned and represented by saved artifacts.

01

Validate

Contract checks and relational coverage across Home Credit tables.

02

Engineer

Application attributes plus 196 leakage-safe historical aggregates.

03

Model

Benchmarks, XGBoost selection, calibration and cost-sensitive policy.

04

Govern

SHAP, subgroup diagnostics, model card and permanently sealed holdout.

05

Serve

FastAPI, Streamlit, Docker, monitoring and evidence-grounded assistant.

System architecture

From raw records to governed decisions

Raw Kaggle tables feed validated feature pipelines. Frozen artifacts power the authenticated API, while the dashboard presents decisions, evidence, monitoring and retrieval-grounded policy answers.

Home Credit dataFeature storeFrozen modelsFastAPIStreamlit

Responsible AI

Built for scrutiny.

The design surfaces limitations instead of hiding them behind a single performance number.

Explainability

Global and local SHAP analysis with business-readable labels. Explanations describe model behavior—not causality.

Fairness diagnostics

Recall, false-positive rate, selection rate and calibration are reported by gender and age band for audit only.

Drift monitoring

Frozen references track prediction and feature PSI. Alerts trigger investigation, never silent post-holdout tuning.

Evidence assistant

Retrieval-grounded answers cite approved project evidence. Retrieval reached 100% hit@3 on its evaluation set.

Known limitation

Age-band disparities remain material.

Subgroup gaps are diagnostic, not proof of fairness or legal compliance. Any real deployment would require lender-specific data, validation, policy review and ongoing human oversight.

Review limitations ↗

Production-minded engineering

Built to run, test and explain.

Python 3.12XGBoostscikit-learnSHAPFastAPIStreamlitDockerGitHub ActionsRuffPytest