Replication Data and Code for “Classifying Economic Growth Regimes in African Economies with Interpretable Ensemble Learning”

Published: 11 June 2026| Version 1 | DOI: 10.17632/p563rdgkty.1
Contributors:
Spencer Dawson-Amoah,
,
,
,

Description

This dataset supports the study titled “Classifying Economic Growth Regimes in African Economies with Interpretable Ensemble Learning.” The study develops a reproducible machine learning framework for classifying high-growth and low-growth regimes in African economies. The repository contains the processed analytical dataset and Python code used for the empirical analysis. The data cover 54 African economies from 1985 to 2024, producing a balanced country-year panel of 2,160 observations. GDP growth is converted into a binary regime outcome using the sample median growth rate of 4.140 percent. Observations above the median are coded as high-growth regimes, while observations at or below the median are coded as low-growth regimes. The modelling predictors include trade openness, foreign direct investment inflows, inflation, industry value added, services value added, agriculture value added, unemployment, internet use, access to electricity, tertiary school enrolment, and current health expenditure. Country, subregion, income group, lending type, and year are retained for descriptive interpretation but excluded from the supervised classifiers. The accompanying Python notebook reproduces the full analysis. It estimates logistic regression, random forest, and gradient boosting classifiers. Model performance is assessed using five-fold cross-validation and a stratified 80:20 holdout test. The notebook reports accuracy, precision, recall, F1-score, and ROC-AUC. It also generates permutation importance results for the best-performing model, alongside principal component analysis and K-means clustering for country-profile interpretation. The files are shared to support transparency, replication, and further research on African growth regimes, structural transformation, digital readiness, infrastructure, and capability-based development. The data were drawn from publicly available World Development Indicators and processed for the purpose of this study.

Files

Steps to reproduce

Download all repository files into one working folder. Open the Python notebook named Topic_02_Growth_Regimes.ipynb in Jupyter Notebook, JupyterLab, VS Code, or Google Colab. Place the Excel file named Topic_02_data.xlsx in the same folder as the notebook. If the Excel file has a different name, update the DATA_FILE line in the notebook. Install the required Python packages before running the notebook: pandas, numpy, matplotlib, scikit-learn, openpyxl. Run the notebook cells from top to bottom without skipping any cell. The notebook first loads the harmonised World Development Indicators panel. It creates the binary GDP growth regime variable using the sample median growth rate of 4.140 percent. It prepares the eleven predictors used in the supervised models. It estimates logistic regression, random forest, and gradient boosting classifiers. It evaluates the models using five-fold cross-validation and a stratified holdout test. It reports accuracy, precision, recall, F1-score, and ROC-AUC. It generates the interpretation outputs, including permutation feature importance, PCA, and K-means clustering. Tables, figures, and model outputs are saved in the output folder created by the notebook.

Institutions

Categories

Economics, Econometrics

Licence