Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

Python Code for: A White-Box Approach to Predicting Petrol Prices in Zambia Using Machine Learning and Explainable Artificial Intelligence

Domain:

socioeconomic

Record type:

software
Creator:
Mal
Publisher:
Zenodo
Host:avatar
This repository contains the complete Python source code developed for the study entitled "A White-Box Approach to Predicting Petrol Prices in Zambia: Evidence from Machine Learning and Explainable Artificial Intelligence." The code implements the complete analytical workflow presented in the manuscript, including: Data preprocessing and cleaning Feature engineering Temporal train-validation-test data partitioning Development and evaluation of Ridge Regression, Random Forest, Support Vector Regression (SVR), and Long Short-Term Memory (LSTM) models Model performance evaluation using MAE, RMSE, R², and the Diebold–Mariano (DM) test Explainable Artificial Intelligence (XAI) techniques including Ridge coefficient analysis, SHAP (SHapley Additive Explanations), Partial Dependence Plots (PDPs), and temporal SHAP diagnostics Exploratory Data Analysis (EDA) Residual diagnostics Interactive Streamlit decision-support dashboard for petrol price prediction and model interpretation The implementation accompanies the processed research dataset archived separately on Zenodo and is provided to promote transparency, reproducibility, and future research. The software is intended for academic research, educational purposes, and methodological replication.

Visit

doi.orgzenodo.org

Licenses

Creative Commons Attribution 4.0 Internationalhttps://creativecommons.org/licenses/by/4.0/legalcodeCopyright © 2026 Melanie Maliti All rights reserved except as permitted under the accompanying MIT License.http://rightsstatements.org/vocab/InC/1.0/