Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏦 Explainable Credit Risk Scoring & Approval System

An end-to-end AI-powered credit risk intelligence platform designed to simulate real-world banking and NBFC loan decision workflows using explainable machine learning, fairness monitoring, and interactive risk analytics.

This project predicts loan default probability, generates business-friendly approval decisions, explains model behavior using SHAP, and monitors fairness metrics for responsible AI governance.


πŸš€ Project Overview

Modern banking systems require more than just prediction accuracy.

Financial institutions must ensure:

  • transparent decision-making
  • explainable AI outputs
  • fairness monitoring
  • governance compliance
  • operational risk control
  • customer trust

This project demonstrates how AI can support:

  • loan approval automation
  • credit risk intelligence
  • manual review prioritization
  • explainable lending decisions
  • fairness & bias monitoring
  • responsible AI governance

🧠 Core Capabilities

  • Predict probability of loan default
  • Automate credit approval workflows
  • Generate business-friendly decision explanations
  • Monitor fairness across demographic groups
  • Provide explainable AI reasoning using SHAP
  • Simulate enterprise-grade credit risk systems
  • Support governance and compliance visibility

πŸ“Έ Dashboard Preview

βœ… Loan Approval Dashboard

Shows a low-risk applicant automatically approved by the AI system.

Loan Approval


⚠️ Manual Review Workflow

Displays a medium-risk customer routed for analyst review.

Manual Review


❌ High-Risk Rejection Analysis

Shows a rejected applicant with transparent reason codes.

Loan Rejection


βš–οΈ Fairness & Bias Monitoring

Approval-rate parity analysis for responsible AI governance.

Fairness Monitoring


🏦 Business Problem

Banks and fintech lenders constantly balance:

  • growth
  • customer acquisition
  • portfolio quality
  • credit risk
  • regulatory compliance

Approving risky borrowers increases financial losses.

Rejecting too many safe borrowers reduces revenue growth.

This system helps answer:

  • Should this loan be approved?
  • Should it be sent for manual review?
  • Why was this decision made?
  • Is the model behaving fairly?
  • Are governance thresholds being violated?

βš™οΈ Platform Features

πŸ€– AI Credit Risk Engine

  • Logistic Regression risk prediction
  • probability of default estimation
  • customer-level risk scoring
  • threshold-based decisioning
  • regulator-friendly interpretable modeling

πŸ“Œ Decision Intelligence System

βœ… Auto Approve

Low-risk applicants are automatically approved.

⚠️ Manual Review

Medium-risk applications are routed to analysts.

❌ Auto Reject

High-risk applicants are rejected with transparent reason codes.


🧠 Explainable AI (XAI)

  • SHAP explainability integration
  • feature contribution analysis
  • adverse action reasoning
  • interpretable model behavior
  • transparent AI decision support

βš–οΈ Fairness & Bias Monitoring

  • approval-rate parity analysis
  • gender fairness comparison
  • governance threshold monitoring
  • responsible AI auditing
  • ethical AI system simulation

πŸ“Š Interactive Streamlit Dashboard

The dashboard includes:

  • applicant simulation controls
  • approval probability estimation
  • manual review workflows
  • rejection explanation engine
  • fairness monitoring analytics
  • real-time decision intelligence

πŸ“ˆ Saved Model Evaluation Visuals

πŸ“‰ Confusion Matrix

Confusion Matrix


πŸ“ˆ ROC Curve

ROC Curve


πŸ” SHAP Explainability Summary

SHAP Summary


βš–οΈ Fairness Comparison Analysis

Fairness Comparison


πŸ“Š Model Performance Metrics

Evaluation metrics used:

  • Accuracy
  • Precision
  • Recall
  • F1-Score
  • ROC-AUC

The system prioritizes:

  • interpretability
  • governance readiness
  • explainability
  • operational usability
  • responsible AI principles

πŸ’Ό Business Impact Simulation

This platform demonstrates how AI can help financial institutions:

  • Reduce high-risk loan approvals
  • Improve portfolio quality
  • Accelerate lending operations
  • Increase transparency in AI decisions
  • Support compliance and governance teams
  • Enhance customer trust through explainability
  • Assist analysts with manual review prioritization

πŸ› οΈ Tech Stack

Programming & Frameworks

  • Python
  • Streamlit

Machine Learning

  • Scikit-learn
  • Logistic Regression

Explainable AI

  • SHAP

Fairness & Governance

  • Fairlearn

Data Analytics

  • Pandas
  • NumPy

Visualization

  • Matplotlib

πŸ—οΈ Enterprise AI Workflow

The platform simulates a real-world banking AI risk pipeline:

  1. Applicant financial data is collected
  2. Features are engineered for credit risk modeling
  3. AI model predicts probability of default
  4. Decision engine classifies:
    • Approved
    • Manual Review
    • Rejected
  5. SHAP explainability generates transparent reason codes
  6. Fairness monitoring evaluates governance metrics
  7. Results are visualized through the Streamlit dashboard

πŸ“‚ Project Structure

Explainable-Credit-Risk-Scoring/
β”‚
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ raw/
β”‚   β”‚   └── default of credit card clients.xls
β”‚   β”‚
β”‚   └── processed/
β”‚       β”œβ”€β”€ cleaned_data.csv
β”‚       └── features.csv
β”‚
β”œβ”€β”€ dashboard/
β”‚   └── app.py
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ data_preprocessing.py
β”‚   β”œβ”€β”€ feature_engineering.py
β”‚   β”œβ”€β”€ train_model.py
β”‚   β”œβ”€β”€ evaluate_model.py
β”‚   β”œβ”€β”€ explain_model.py
β”‚   └── fairness_analysis.py
β”‚
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ credit_model.pkl
β”‚   β”œβ”€β”€ scaler.pkl
β”‚   └── feature_columns.pkl
β”‚
β”œβ”€β”€ outputs/
β”‚   └── visuals/
β”‚       β”œβ”€β”€ confusion_matrix.png
β”‚       β”œβ”€β”€ roc_curve.png
β”‚       β”œβ”€β”€ shap_summary.png
β”‚       └── fairness_comparison.png
β”‚
β”œβ”€β”€ screenshots/
β”‚   β”œβ”€β”€ loan_approval_dashboard.png
β”‚   β”œβ”€β”€ manual_review_case.png
β”‚   β”œβ”€β”€ loan_rejection_analysis.png
β”‚   └── fairness_monitoring.png
β”‚
β”œβ”€β”€ reports/
β”‚   β”œβ”€β”€ Model_Performance.md
β”‚   β”œβ”€β”€ Explainability.md
β”‚   └── Fairness_Bias.md
β”‚
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .gitignore
└── README.md

πŸ“Š Financial Risk Dataset

UCI Credit Default Dataset

This project uses the well-known credit default dataset widely used in banking risk analytics and machine learning research.

Dataset Highlights

  • Credit card customer records
  • repayment history
  • bill statement information
  • payment behavior analytics
  • demographic variables
  • default classification target

Prediction Target

  • 1 β†’ Default Risk
  • 0 β†’ Non-Default

▢️ Installation & Setup

1️⃣ Clone Repository

git clone https://github.com/girishshenoy16/Explainable-Credit-Risk-Scoring.git

cd Explainable-Credit-Risk-Scoring

2️⃣ Create Virtual Environment

Windows

python -m venv venv
venv\Scripts\activate

Mac/Linux

python3 -m venv venv
source venv/bin/activate

3️⃣ Install Dependencies

pip install --upgrade pip
pip install -r requirements.txt

4️⃣ Run ML Pipeline

python src/data_preprocessing.py
python src/feature_engineering.py
python src/train_model.py
python src/evaluate_model.py
python src/explain_model.py
python src/fairness_analysis.py

5️⃣ Run Streamlit Dashboard

streamlit run dashboard/app.py

πŸ“ Outputs Generated

The platform generates:

  • approval probability analysis
  • loan decision outputs
  • fairness comparison reports
  • SHAP explainability visuals
  • confusion matrices
  • ROC curve analytics
  • governance monitoring outputs

βš–οΈ Responsible AI Considerations

This project demonstrates responsible AI concepts commonly used in regulated financial systems:

  • Explainable AI for transparent lending decisions
  • Fairness monitoring across demographic groups
  • Human-in-the-loop manual review workflows
  • Governance-oriented risk thresholds
  • Interpretable machine learning models
  • Bias awareness and monitoring simulation

Note: This project is an educational simulation and does not represent a production banking system.


🌍 Why This Project Matters

Modern AI systems in banking cannot function as β€œblack boxes.”

Financial institutions increasingly require:

  • explainable AI
  • responsible lending systems
  • fairness auditing
  • governance monitoring
  • transparent decision intelligence

This project demonstrates how AI can move beyond prediction into:

  • operational decision systems
  • explainable banking intelligence
  • ethical AI governance
  • enterprise-grade financial analytics

πŸ‘¨β€πŸ’» Author

Girish Shenoy

Aspiring AI & Data Analytics Professional focused on:

  • Explainable AI
  • Financial Analytics
  • Risk Intelligence
  • AI Governance
  • Machine Learning Systems
  • Decision Intelligence Platforms

πŸ™Œ Acknowledgements

Guided by Umesh Yadav Sir under EDC, IIT Delhi in association with the Indian Institute of Placement.

About

Explainable AI-powered credit risk scoring system with loan approval workflows, fairness monitoring, SHAP explainability, and interactive Streamlit dashboards for responsible financial risk analytics.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages