ML-powered credit scoring for data-scarce Kenyan markets — CTGAN synthetic data augmentation + fairness-aware Gradient Boosting
# 🇰🇪 CreditIQ Kenya — Credit Risk Scoring for Emerging Markets
**A machine learning credit risk scoring system built on real Kenyan data — designed for microfinance institutions, digital lenders, and SACCOs operating in data-scarce markets.**
🚀 Live Demo · 📄 Dissertation · 📊 Notebook
---
## The Problem
Over 80% of Kenyan SMEs lack formal credit histories. Traditional scoring models fail because:
- No structured financial records for informal sector workers
- Scarce training data for ML models
- Existing models carry demographic bias
## The Solution
A full ML pipeline that:
1. Uses **real Kenyan demographic data** from FinAccess 2021 (CBK/KNBS/FSD Kenya)
2. Overcomes data scarcity with **CTGAN synthetic data augmentation**
3. Trains a **fairness-aware Gradient Boosting** model — gender gap of only 0.71pp
4. Deploys a **live scoring app** with explainability charts and county-level risk
---
## Results
| Metric | Score |
|--------|-------|
| AUC-ROC | **76.7%** |
| Accuracy | 69.4% |
| Recall | 61.4% |
| F1 Score | 0.640 |
| Gender Gap | **0.71pp** ✅ |
| AUC-ROC 95% CI | [0.751 – 0.782] |
> **+8.1pp improvement in AUC-ROC** over baseline model trained on proxy data
---
## Data Sources
| Dataset | Source | Rows | Purpose |
|---------|--------|------|---------|
| Financial records | Proprietary | 1,000 | Income, savings, debt, default label |
| FinAccess 2021 | CBK / KNBS / FSD Kenya | 6,398 | Kenyan demographics — age, education, county, M-Pesa |
| CTGAN synthetic | Generated | 9,000 | Augment training data |
| **Hybrid total** | | **10,000** | **Model training** |
---
## Features
**Financial (ratio-only — income-level agnostic):**
- Debt-to-Income ratio (log)
- Savings-to-Income ratio (log)
- Debt-to-Savings ratio (log)
**Kenyan demographic signals:**
- All 47 counties
- Education: Primary / Secondary / Tertiary
- Marital status (Kenyan labels)
- M-Pesa usage status
- Loan histo …