Gradient-boosted ensemble predicting SME Financial Health Index across Eswatini, Lesotho, Zimbabwe, and Malawi. Zindi competition, ranked 82/832.
# FHI SME Financial Health Prediction
This project trains a gradient-boosted ensemble to predict the Financial Health Index (FHI)
category of small and medium enterprises across four Southern African countries: Eswatini,
Lesotho, Zimbabwe and Malawi. The FHI is an ordinal three-class label (Low / Medium / High)
constructed from SME survey responses across four dimensions: savings and assets, debt and
repayment ability, resilience to shocks, and access to credit and financial services. The
dataset is from the Zindi data.org Financial Health Prediction Challenge,
comprising 9,618 training rows and 2,405 test rows collected via FinScope-style MSME surveys.
---
## Model Performance
Evaluation metric: **weighted F1** (support-weighted across classes).
| Split | Weighted F1 |
|---|---|
| OOF cross-validation | 0.8791 |
| Public leaderboard | 0.8857 |
| Private leaderboard | 0.8852 |
Per-class breakdown on OOF predictions:
| Class | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| Low | 0.876 | 0.992 | 0.930 | 6,280 |
| Medium | 0.892 | 0.692 | 0.779 | 2,868 |
| High | 0.930 | 0.562 | 0.700 | 470 |
| **Weighted avg** | **0.883** | **0.881** | **0.874** | **9,618** |
Per-country OOF weighted F1:
| Country | Rows | High cases | OOF WF1 |
|---|---|---|---|
| Eswatini | 2,674 | 307 (11.5%) | 0.886 |
| Zimbabwe + Malawi | 5,000 | 157 (3.1%) | 0.936 |
| Lesotho | 1,944 | 6 (0.3%) | 0.719 |
---
## Repository Structure
```
fhi-sme-challenge/
|
├── data/
│ ├── raw/ # Place Train.csv, Test.csv, SampleSubmission.csv here
│ └── processed/ # Generated by pipeline -- do not edit manually
│ ├── train_clean.csv # After preprocess.py
│ ├── test_clean.csv
│ ├── train_features.csv # After features.py
│ └── test_features.csv
│
├── models/
│ └── ordinal_artifacts.pkl # Saved models, OOF arrays, thresholds, encoders
│
├── notebooks/
│ ├── eda.ipynb # Data explorati …