cat ~/projects/loan-default-prediction/README.md

Loan Default Prediction

ML model for loan default prediction with contextual loss evaluation and interactive Streamlit dashboard.

Pythonpushed 2mo ago
Credit RiskLogistic RegressionXGBoostSHAPCost-Sensitive Learning50,000+ loan recordsSolo Developer
signal.overview

When a bank approves a loan, it's making a bet — and the cost of losing that bet (default) is asymmetric. Missing a high-risk applicant costs far more than rejecting a borderline one. This project builds a default prediction model that explicitly accounts for that asymmetry through contextual loss evaluation.

The model pipeline runs standard feature engineering (income ratios, credit utilization, employment stability) through both logistic regression and XGBoost, then uses SHAP values to make every prediction explainable. A loan officer doesn't just see 'high risk' — they see exactly which factors drove that assessment and by how much.

The interactive dashboard lets users explore the model's behavior: adjust applicant profiles, see how predictions shift, compare model explanations side by side. It's designed to build trust in the model by making its reasoning transparent.

run.simulation()
loan-default-prediction — interactive demo
Try:
cat ARCHITECTURE.md
Pythonscikit-learnXGBoostSHAPStreamlitpandas
  • Two-model ensemble: logistic regression (interpretable baseline) + XGBoost (performance). Final prediction blends both with learned weights.
  • Cost-sensitive learning: custom loss function weights false negatives (missed defaults) at 5x false positives.
  • SHAP waterfall charts generated per-prediction for feature-level explainability.
© 2026 Om Gorakhiasys.uptime: ∞