Solution for the Zindi Financial Health Index Prediction Challenge — Southern African SME classification using XGBoost, LightGBM, CatBoost and MLP ensemble
# Financial Health Index (FHI) Prediction
## Zindi Competition — Southern African SME Financial Health Classification
---
## Results
| Split | Score |
|-------|-------|
| Public Leaderboard | 0.8847 |
| **Private Leaderboard** | **0.8860** ✅ |
---
## Overview
This repository contains the solution for the **Financial Health Index Prediction Challenge**, a Zindi competition focused on predicting the financial well-being of small and medium-sized enterprises (SMEs) across four Southern African countries: Eswatini, Lesotho, Zimbabwe, and Malawi.
The task is a **multiclass classification problem** — predicting whether a business has **Low**, **Medium**, or **High** financial health — evaluated using **Macro F1 Score**.
---
## Problem Statement
Traditional measures like revenue or profit do not fully capture an SME's financial well-being. This competition introduces a holistic **Financial Health Index (FHI)** — a composite measure reflecting resilience, savings habits, and access to finance across four dimensions:
- Savings and assets
- Debt and repayment ability
- Resilience to shocks
- Access to credit and financial services
Participants build machine learning models to predict FHI using socio-economic and business survey data.
---
## Repository Structure
```
├── winning_solution.ipynb # ⭐ Main solution — best private LB (0.8860)
├── experiments.ipynb # Experimental notebook — additional approaches explored
├── README.md
├── VariableDefinitions.csv
├── requirements.txt
├── .gitignore
└── outputs/
├── submission_final.csv
├── experiment_log.json
└── README.md
```
### Solution Files
| File | Description | Private LB |
|------|-------------|------------|
| `winning_solution.ipynb` | **Main solution** — clean preprocessing, feature engineering, 3-model ensemble (XGB + LGB + CAT), Optuna tuning, SMOTE, threshold optimization | **0.8860** ✅ |
| `experiments.ipynb` | Extended experiments — pseudo-labeling, target encoding, MLP ensemble, additional f …