Toward sustainable energy production: a comparative machine learning framework for predicting green hydrogen cost across the african continent
Abstract
Abstract Rapid decarbonisation of hard-to-electrify sectors requires low-emission hydrogen, but deployment is constrained by uncertainty in the Levelized Cost of Hydrogen (LCOH) across diverse national contexts. Using Africa as a case study, where green hydrogen planning spans highly heterogeneous conditions, this study develops a comparative machine learning framework for country-scale cost screening before major infrastructure commitments. A harmonized dataset of 54 African scenarios was compiled, with LCOH (EUR/kg) as the target variable and 14 predictors capturing project scale, renewable capacity, storage and transport infrastructure, investment and maturity stage, energy security and sustainability indices, market variables, CO 2 reduction potential, and water demand. The workflow integrated exploratory statistics, preprocessing, and systematic benchmarking of 11 regression models using an independent 20% holdout split, complemented by repeated nested cross-validation. Across the compiled cases, LCOH ranged from 3.75 to 5.60 EUR/kg with a median of 4.90 EUR/kg, showing clear cost stratification by project maturity stage. Holdout validation identified Hyperopt optimized Gradient Boosting as the best performing model (R 2 = 0.9762, RMSE = 0.0840 EUR/kg, MAE = 0.0663 EUR/kg), followed closely by Bayesian tuned XGBoost (R 2 = 0.9713). Nested cross-validation confirmed model stability (Hyperopt_GB: R 2 = 0.9710 ± 0.032). SHAP analysis revealed that renewable energy capacity, electrolyser capacity, and the energy security index contributed most to predicted LCOH variability within the dataset. The framework provides a transferable screening pipeline for prioritizing investment and data collection in data-scarce settings, with explicit linkages to Sustainable Development Goal (SDG) relevant indicators, including energy security, climate mitigation, and water stress. This approach complements deterministic techno-economic appraisal by enabling rapid cross-country comparison during early-stage planning Fig.S1.
Article Details
Authors (7)
Ashraf M. T. Elewa
Moustafa Gamal Snousy
Ahmed M. Saqr
Hussein M. Elshafie
Ashraf R. Abouelmagd
Ali Mahmoud Hussain
Tarek Abd El-Hafeez