Logo Lanfrica

Nqobileee/financial-prediction

Domain:

socioeconomic

Record type:

model
Creator:
Nqo
Host:
ML-powered platform predicting financial health for 9,618 SMEs across Southern Africa. Using a Random Forest model, it provides real-time risk categorization, confidence scores, and tailored recommendations via a responsive Next.js web app. # FinHealth — Financial Health Prediction for Southern African SMEs > Machine learning and interactive tooling for classifying MSME financial health (**Low**, **Medium**, **High**) using survey data from Eswatini, Lesotho, Malawi, and Zimbabwe. --- ## Overview | Area | Purpose | README | |------|---------|--------| | `financial-prediction-model/` | EDA, LightGBM training, submissions | ML workspace | | `src/` | Next.js survey UI and demo API | Web app | | `CITATIONS.md` | Data attribution and licensing | — | **Production classifier:** LightGBM v3 (Python). **Web app:** rule-based demo scorer unless an external ML API is connected. **Dataset:** 9,618 labeled training rows, 39 features, imbalanced target (~65% Low, ~30% Medium, ~5% High). --- ## Research findings (summary) Analysis in `financial-prediction-model/eda/` highlights the following. ### Data and target - **Class imbalance** is severe (~13:1 between the largest and smallest class). Stratified K-fold is used for validation. - **Geography matters:** Malawi skews Low; Eswatini shows relatively more High outcomes than other countries. - **Missingness** is structured (often by product/country), not random — missing-count features help the model. ### Strongest signals | Signal | Evidence | |--------|----------| | `funeral_insurance` | Highest Cramér's V (~0.55) and top mutual information | | Insurance adoption (count) | Clear tiering toward Medium/High as current products increase | | Financial services (mobile money, cards, loans, etc.) | More active services associate with better health | | Formalization | Record-keeping and tax compliance support Medium/High | | Country | Encoded market effects and interactions with insurance | ### Model performance (LightGBM, 5-fold OOF) | Metric | Value | |--------|-------| | Accuracy | 0.874 | | F1 (macro) | 0.805 | | Macro ROC-AUC (one-vs-rest) | 0.944 | Full parameter table: `decision_parameters_summary.csv`. --- ### Selected figures **Target distributio …