Predictive modeling of urban residential power consumption: an explainable AI approach to the Kenyan prepaid grid
Accurate electricity demand forecasting is important for utility planning and energy management, particularly in rapidly urbanizing regions where prepaid metering plays an increasingly important role in residential electricity service delivery. Because prepaid residential demand exhibits strong temporal persistence and distinct behavioural characteristics, forecasting approaches developed in other electricity-market settings may not transfer directly. This study develops an explainable forecasting framework for the Kenyan prepaid electricity sector to assess whether machine-learning complexity provides a meaningful forecasting advantage over simpler benchmarks. A longitudinal dataset spanning January 2017 to April 2026 was analysed using historical consumption, meteorological, and tariff-related variables. XGBoost was compared with Ordinary Least Squares (OLS) and a naïve Lag-1 persistence benchmark using chronological cross-validation and an independent test period from January 2025 to March 2026, with SHAP used to interpret XGBoost predictions. On the primary test period, XGBoost achieved an MAE of 19.78 kWh and MAPE of 52.31%, compared with 20.03 kWh and 57.07% for OLS, though OLS achieved a slightly lower RMSE (37.69 versus 38.35 kWh); both fitted models outperformed the naïve Lag-1 benchmark (MAE = 23.11 kWh). SHAP values confirmed that recent consumption history dominated predictions, with Lag \(_2\) , Lag \(_1\) , and Lag \(_{12}\) producing mean absolute SHAP values of 33.16, 30.70, and 7.84, respectively, compared with 0.93 for CDD and less than 0.40 for each tariff variable. These results indicate that prepaid residential electricity demand is primarily persistence-driven: XGBoost’s improvement over OLS, while statistically supported, was modest and did not hold across all metrics or the April 2026 sensitivity period—underscoring the value of rigorous temporal validation and transparent benchmarking alongside model complexity.
Authors
- Adero Awuor
- Paul Obasanjo (ORCID: https://orcid.org/0000-0001-8020-4289)
- Annette Mutinda
Institutions
- Technical University of Kenya (KE)
Publication Details
- Journal
- Energy Informatics
- Published
- 2026-10-05
- DOI
- https://doi.org/10.1186/s42162-026-00696-9
- Primary Topic
- Energy Load and Power Forecasting
- Type
- article
- Field-Weighted Citation Impact
- 0.00