We Belong (10 Feb 2023)
-
Your skin,
Soft as the life I work hard to live.
Your eyes,
Bright as the dreams I chase.
Your heart,
Warm. My home.
Together
We belong.
-
Malambo "Shamet Youngi" Mutila
@EscobarChim@Peter_Kays What's to stop my brothers in matero from adding ZAQA seals on fake certificates?
Maybe a QR code or similar, that when scanned takes you to an official ZAQA page, would be ideal.
PREDICTING THE FINANCIAL WELL-BEING OF SMALL AND MEDIUM-SIZED ENTERPRISES (SMEs) IN SOUTHERN AFRICA - DAYS 12 - 17 OF 26
For the last 17 days, I have been participating in a machine learning challenge to deliver the best machine learning model that predicts the Financial Health Index (FHI) of SMEs across Eswatini, Lesotho, Malawi, and Zimbabwe. This challenge is available on Zindi and is open to everyone, so you too can join in and have some fun.
To prep for this challenge, I reserved days for literature review, exploratory data analysis and data cleaning. When I started the supervised modelling, my baseline CatBoost model scored 0.8807 and had me sitting 431st on the public leaderboard chasing after “Nostalgic Mathematics,” who was and still is in the 1st position with an F1 score of 0.9212. This King has had the 1st position since I joined the challenge over two weeks ago; he’s a problem.
Without going in heavily, I kept the original features, and I’m yet to engineer new ones. I wanted to see how much could be squeezed out of the clean data without new features.
More Data = Better Generalisation
I trained my baseline on 80% of the labelled data and used 20% for validation. Once I stopped seeing more gains on the validation set’s F1 score, I picked my best parameters and retrained my best models (V2 and V3) on 100% of the labelled data. The submission scored 0.8829, a small gain from 0.8807, but a significant indicator to continue improving on 100% of the data.
Ensembles Make the Dream Work
Since the two models (V2 and V3) had different strengths, with one being more conservative on the "High" class (high precision, lower recall and the other being more aggressive (lower precision, higher recall) I figured it would be worth trying their average predicted probabilities. The ensemble submission scored 0.8873, moving me into the 300s, up from 431st.
Optuna Hyperparameter Search
At this point, I had been hand-tuning hyperparameters, which didn’t go far. So... I set up an Optuna study to search across depth, learning rate, iterations, regularisation strength, bagging temperature, and class weights. With 100 trials in total, each evaluated via 5-fold stratified cross-validation, I seeded the Optuna study with my two configs from V2 and V3. Unfortunately, the entire run took over 2 hours to complete, even withthe GPU activated. However, to its advantage, the Optuna search scored 0.9019 on the public leaderboard, moving me from 421st to 28th in just 7 submissions.
What’s Next?
In the following days, I will be using the information I gathered during my literature review to engineer and transform features. Hopefully, that’ll lead to some gains; if not, then it’ll be time to try another ML model.
DAY 4 to 11 OF 26 TO PREDICT THE FINANCIAL WELL-BEING OF SMALL AND MEDIUM-SIZED ENTERPRISES (SMEs) IN SOUTHERN AFRICA
After the literature review, I moved into modelling.
The papers I read consistently treated financial health as a combination of behaviours and constraints: access to digital finance, reliance on informal credit, record-keeping discipline, insurance uptake, liquidity stress, and entrepreneurial expectations.
Before fitting any model, I spent time cleaning the data so that features reflected patterns suggested in the research. The raw survey data had inconsistent response formats, mojibake, and mixed representations of missing values. I wrote custom functions to standardise inconsistent responses to single canonical values and handled missing values with a sentinel token.
I split the original training data into two portions: one for fitting the model and one for validation, using stratified sampling to preserve the distribution of “Low”, “Medium”, and “High” classes. The test set came directly from the competition file and contained no target labels. This three-way structure gave me two datasets unseen by the model during training, making it easier to detect overfitting.
The dataset was heavily categorical with 33 object-type features and only 6 numeric ones, making CatBoost the natural choice for the baseline model. The baseline model achieved a macro-F1 of 0.825 and a weighted-F1 of 0.881 on my evaluation set, with a high performance on the dominant “Low” class (F1 = 0.93) and surprisingly strong results on the rare “High” class (F1 = 0.75, despite only 93 samples). The main weakness was recall for the “High” and “Medium��� classes, which was expected given the class imbalance.
Using the same preprocessing pipeline, I ran the model on the test dataset and uploaded predictions to Zindi. The baseline submission scored 0.8807, placing me 431st on the leaderboard. The top score was just above 0.92, a difference of 0.0393 (4.5%).
This baseline score validated my data cleaning approach and my choice of CatBoost.
In my next steps, I will tune the CatBoost hyperparameters, engineer new features, and iterate until I achieve the best CatBoost model, then explore other algorithms.
DAY 2 OF 26 TO PREDICT THE FINANCIAL WELL-BEING OF SMALL AND MEDIUM-SIZED ENTERPRISES (SMEs) IN SOUTHERN AFRICA
Continuing my literature review, I read a methodological note that felt made for this Zindi challenge: “Small Business Financial Health Scorecard: A Methodological Note” by Piotr Korynski and the Microfinance Centre. The core idea is simple but powerful, and that is that most small businesses do not keep perfect financial statements, so measuring (and predicting) financial health should rely on survey-friendly “rules of thumb” rather than complex accounting ratios.
Piotr breaks financial health into five dimensions:
1. Financial Standing. Can the business cover costs and stay afloat?
2. Access to Finance. Can it access funding when needed (for shocks or growth)?
3. Financial Management. Are basic management practices in place (like record keeping)?
4. Stability & Survival. Can the business withstand shocks and keep operating?
5. Revenue Potential. Does the business have signs of future growth?
Our dataset for this Zindi challenge is also not full financial statements, but it does contain signals that align with these pillars, such as turnover vs expenses, cash-flow stress questions, access to financial services (loan accounts, cards, mobile money), insurance, and recordkeeping.
Like the Financial Health Index (FHI) used in the challenge, the paper proposes a Composite Financial Health Score (CFHS) by averaging the five pillar scores into one number.
It would be nice to reproduce the CFHS and apply it to our dataset, but several of the scorecard’s specific questions do not exist in our features (e.g., repayment history, late scheduled payments, separation of personal vs business finances, idle inventory, customer-loss recovery, etc.).
However, I believe we can take inspiration from the CFHS approach and build a proxy Composite Financial Health Score with the few features in the dataset.
At the end of the day, Piotr’s methodological note emphasises how predictive modelling is not just a “throw the data into a model” moment, but it starts with a good definition of what you are predicting. Financial health is not only about profit but also liquidity, resilience, access, and good practices. Consequently, these show up in data in very human ways: coping mechanisms, tools people use, and whether they track their finances.
Looking ahead:
Day 0: Dataset reviewed | Done.
Days 1 – 5: Literature review | In progress.
Day 6: EDA and data cleaning.
Day 7: Baseline submission; my first score.
P.S. This challenge is open to everyone on “https://t.co/SihGAyDqeJ”, so you too can join in and have some data science/machine learning fun.
DAY 1 OF 26 TO PREDICT THE FINANCIAL WELL-BEING OF SMALL AND MEDIUM-SIZED ENTERPRISES (SMEs) IN SOUTHERN AFRICA
For 26 days, I will be participating in a machine learning challenge to deliver the best machine learning model that predicts the Financial Health Index (FHI) of SMEs across Eswatini, Lesotho, Malawi, and Zimbabwe. This challenge is available on Zindi and is open to everyone, so you too can join in and have some fun.
To prep myself for the predictive modelling, I set aside some time to review literature related to the challenge. Even though this will not be equivalent to domain knowledge, I believe it will be valuable.
Today, I read three papers:
1. “Measuring Financial Health: What Policymakers Need to Know.” (2015) — Elisabeth Rhyne.
2. “A Framework for Understanding the Financial Health of Micro, Small and Medium-sized Enterprise (MSME) Entrepreneurs” (2020) — Centre for Financial Services Innovation (CFSI).
3. “Analysing Financial Health of the SMEs Listed in the AERO Market” (2020) — Sabău-Popa et. al.
Across the three, one theme came through strongly, and that was that financial health is not only about profit but about whether a business can operate smoothly, withstand shocks, and keep functioning over time.
The literature argues that financial health often shows up in a few practical dimensions such as cash-flow stability, capacity to handle unexpected expenses, manageable debt, and use of financial tools like savings, insurance, and formal financial services (Rhyne, 2015). The MSME framework emphasises the “lived reality” of entrepreneurs and maintains that financial health is shaped not just by revenue and costs, but also by capabilities, constraints, and the surrounding environment, including demographic factors and access barriers (CFSI, 2020). The SME financial analysis paper reinforced a more traditional finance angle: many approaches define business health using combinations of profitability, liquidity, and solvency-like indicators, even when the exact measures differ (Sabău-Popa et. al., 2020).
The Power of Gender
The MSME framework argues that gender is “arguably the most important” demographic feature to consider when studying MSME financial health (CFSI, 2020) because gender often reflects structural constraints that change how businesses operate and access resources. The paper highlights persistent inequalities that women entrepreneurs can face, such as greater household responsibilities, lower decision-making power in the family, fewer education/employment opportunities, and weaker legal protections in some contexts.
From this first reading and four more to go, I believe the strongest signal will not come from one feature but from how features complement each other.
Looking ahead:
Day 0: Dataset reviewed.
Days 1 – 5: Literature review.
Day 6: EDA and data cleaning.
Day 7: Baseline submission; my first score.
Introducing Collaborative Surveillance! @AfricaCDC and partners invite you to a webinar exploring this new approach to public health surveillance.
Learn what Collaborative Surveillance is, how it strengthens existing systems and tools, and what it looks like in practice at country level.
🗓️ Date: 1 October 2025
🔗 Register here: https://t.co/PJAjJA1PJB
Don’t miss this opportunity to deepen your understanding and be part of the conversation on the future of surveillance in Africa!
#AfricaCDC
How do they sleep at night, knowing they’ve destroyed a young girl’s life? Knowing they’ve left a permanent scar on an innocent child? Honestly, 18 years is nowhere near enough!
One thing I find funny about uni debates are the people that brag about how hard it is to graduate from a university as a thing of pride.
Harvard has a 98% graduation rate. Let’s stop this notion that high failure rates somehow make a uni better.
I hate struggle culture.
[3/3] Research into cheaper AI training methods could also help, but this too requires funds that Africa has a challenge with.
Can Africa lead the AI race? If so, how?
[1/3] Needing substantial CPU, GPU, RAM, storage and electricity, it would cost you $30 million to $640 million to build and train your own large language model (LLM) to the level of Meta's LlaMA 3.1 or OpenAI's ChatGPT-4o.
---
Image Source: Malik Afegbua, Nigerian AI Artist
[2/3] At our economic rate, Africa lags behind in AI advancements. We can still make significant progress by fine-tuning existing LLMs with our own datasets and custom instructions.