Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

A machine-learning approach to predicting Africa’s electricity mix based on planned power plants and their chances of success


Energy scenarios, relying on wide-ranging assumptions about the future, do not always adequately reflect the lock-in risks caused by planned power-generation projects and the uncertainty around their chances of realization. In this study we built a machine-learning model that demonstrates high accuracy in predicting power-generation project failure and success using the largest dataset on historic and planned power plants available for Africa, combined with country-level characteristics. We found that the most relevant factors for successful commissioning of past projects are at plant level: capacity, fuel, ownership and connection type. We applied the trained model to predict the realization of the current project pipeline. Contrary to rapid transition scenarios, our results show that the share of non-hydro renewables in electricity generation is likely to remain below 10% in 2030, despite total generation more than doubling. These findings point to high carbon lock-in risks for Africa, unless a rapid decarbonization shock occurs leading to large-scale cancellation of the fossil fuel plants currently in the pipeline.

Your institute does not have access to this article

Relevant articles

Open Access articles citing this article.

Access options

Buy article

Get time limited or full article access on ReadCube.


All prices are NET prices.

Fig. 1: The impact of project- and country-level variables on predicting the successful commissioning of past projects.
Fig. 2: The impact of selected features on the model’s prediction.
Fig. 3: The predicted success probabilities of African countries’ planned project pipelines.
Fig. 4: The contribution of individual features to the predicted realization of regional planned project pipelines.
Fig. 5: Africa’s current and predicted 2030 electricity capacity mix by fuel type.
Fig. 6: Comparison of the 2030 generation mix, as projected by extant RE-heavy scenarios and predicted by the present study.

Data availability

The data on power-generation assets from LiveData were obtained under licence from African Energy ( The country-level data on macroeconomic variables were retrieved from the World Bank World Development Indicators (, on institutional variables from the World Bank World Governance Indicators ( and on countries’ regime types from the Polity IV Project of the Center for Systemic Peace ( The data on feed-in-tariff introduction dates were retrieved from RE21 annual Global Status Reports and are publicly available from The data on fossil fuel subsidies were retrieved from the International Monetary Fund and are publicly available from The data that support the figures and other findings of the study are available from the corresponding author upon reasonable request.

Code availability

In this study a gradient boosted tree model was built using LightGBM, which is an open-source free algorithm developed by Microsoft. This code is available from the corresponding author upon reasonable request.


  1. Africa Energy Outlook 2019 (IEA/OECD, 2019).

  2. Ouedraogo, N. S. Modeling sustainable long-term electricity supply-demand in Africa. Appl. Energy 190, 1047–1067 (2017).

    Article  Google Scholar 

  3. World Population Prospects 2019 - Volume I: Comprehensive Tables (United Nations, 2019).

  4. Steckel, J. C., Hilaire, J., Jakob, M. & Ottmar, E. Coal and carbonization in sub-Saharan Africa. Nat. Clim. Chang. 10, 83–88 (2020).

    Article  Google Scholar 

  5. van der Zwaan, B., Kober, T., Longa, F. D., van der Laan, A. & Jan Kramer, G. An integrated assessment of pathways for low-carbon development in Africa. Energy Policy 117, 387–395 (2018).

    Article  Google Scholar 

  6. Lucas, P. L. et al. Future energy system challenges for Africa: insights from integrated assessment models. Energy Policy 86, 705–717 (2015).

    Article  Google Scholar 

  7. Sanoh, A., Kocaman, A. S., Kocal, S., Sherpa, S. & Modi, V. The economics of clean energy resource development and grid interconnection in Africa. Renew. Energy 62, 598–609 (2014).

    Article  Google Scholar 

  8. Africa Power Sector: Planning and Prospects for Renewable Energy (IRENA, 2015).

  9. Taliotis, C. et al. An indicative analysis of investment opportunities in the African electricity supply sector — using TEMBA (The Electricity Model Base for Africa). Energy Sustain. Dev. 31, 50–66 (2016).

    Article  Google Scholar 

  10. Trotter, P. A., Maconachie, R. & McManus, M. C. Solar energy’s potential to mitigate political risks: the case of an optimised Africa-wide network. Energy Policy 117, 108–126 (2018).

    Article  Google Scholar 

  11. Panos, E., Turton, H., Densing, M. & Volkart, K. Powering the growth of sub-Saharan Africa: the jazz and symphony scenarios of world energy council. Energy Sustain. Dev. 26, 14–33 (2015).

    Article  Google Scholar 

  12. Ouedraogo, N. S. Africa energy future: alternative scenarios and their implications for sustainable development strategies. Energy Policy 106, 457–471 (2017).

    Article  Google Scholar 

  13. Scenarios for Sustainable Energy, SDG 7 Outlook for Africa (IISD, 2019).

  14. Goldemberg, J. Leapfrog energy technologies. Energy Policy 26, 729–741 (1998).

    Article  Google Scholar 

  15. Gujba, H., Thorne, S., Mulugetta, Y., Rai, K. & Sokona, Y. Financing low carbon energy access in Africa. Energy Policy 47, 71–78 (2012).

    Article  Google Scholar 

  16. Trutnevyte, E., Guivarch, C., Lempert, R. & Strachan, N. Reinvigorating the scenario technique to expand uncertainty consideration. Clim. Change 135, 373–379 (2016).

    Article  Google Scholar 

  17. Collins, S. et al. Planning the European power sector transformation: the REmap modelling framework and its insights. Energy Strategy Rev. 22, 147–165 (2018).

    Article  Google Scholar 

  18. Eberhard, A., Gratwick, K., Morello, E. & Antmann, P. Accelerating investments in power in sub-Saharan Africa. Nat. Energy 2, 17005 (2017).

    Article  Google Scholar 

  19. Onyeji, I., Bazilian, M. & Nussbaumer, P. Contextualizing electricity access in sub-Saharan Africa. Energy Sustain. Dev. 16, 520–527 (2012).

    Article  Google Scholar 

  20. Trotter, P. A. Rural electrification, electrification inequality and democratic institutions in sub-Saharan Africa. Energy Sustain. Dev. 34, 111–129 (2016).

    Article  Google Scholar 

  21. Ahlborg, H., Boräng, F., Jagers, S. C. & Söderholm, P. Provision of electricity to African households: the importance of democracy and institutional quality. Energy Policy 87, 125–135 (2015).

    Article  Google Scholar 

  22. Brown, D. S. & Mobarak, A. M. The transforming power of democracy: regime type and the distribution of electricity. Am. Polit. Sci. Rev. (2009).

  23. Friedman, J. H. Stochastic gradient boosting. Comput. Stat. Data Anal. 38, 367–378 (2002).

    MathSciNet  MATH  Article  Google Scholar 

  24. Friedman, J. H. Greedy function approximation: a gradient boosting machine. Ann. Stat. 29, 1189–1232 (2001).

    MathSciNet  MATH  Article  Google Scholar 

  25. Arndt, C. et al. A sequential approach to integrated energy modeling in South Africa. Appl. Energy 161, 591–599 (2016).

    Article  Google Scholar 

  26. Rady, Y. Y., Rocco, M. V., Serag-Eldin, M. A. & Colombo, E. Modelling for power generation sector in developing countries: case of Egypt. Energy 165, 198–209 (2018).

    Article  Google Scholar 

  27. Moksnes, N., Korkovelos, A., Mentis, D. & Howells, M. Electrification pathways for Kenya–linking spatial electrification analysis and medium to long term energy planning. Environ. Res. Lett. 12, 095008 (2017).

    Article  Google Scholar 

  28. Pfeiffer, A., Hepburn, C., Vogt-Schilb, A. & Caldecott, B. Committed emissions from existing and planned power plants and asset stranding required to meet the Paris Agreement. Environ. Res. Lett. 13, 054019 (2018).

    Article  Google Scholar 

  29. Eberhard, A. & Naude, R. The South African renewable energy independent power producer procurement programme: a review and lessons learned. J. Energy South. Afr. 27, 1–14 (2016).

    Article  Google Scholar 

  30. Khobai, H., Mugano, G. & Le Roux, P. The impact of electricity price on economic growth in South Africa. Int. J. Energy Econ. Policy 7, 108–116 (2017).

    Google Scholar 

  31. Green, N., Sovacool, B. K. & Hancock, K. Grand designs: assessing the African energy security implications of the Grand Inga Dam. Afr. Stud. Rev. 58, 133–158 (2015).

    Article  Google Scholar 

  32. Steffen, B. & Schmidt, T. S. A quantitative analysis of 10 multilateral development banks’ investment in conventional and renewable power-generation technologies from 2006 to 2015. Nat. Energy 4, 75–82 (2019).

    Article  Google Scholar 

  33. Steffen, B., Matsuo, T., Steinemann, D. & Schmidt, T. S. Opening new markets for clean energy: the role of project developers in the global diffusion of renewable energy technologies. Bus. Polit. 20, 553–587 (2018).

    Article  Google Scholar 

  34. Ansar, A., Flyvbjerg, B., Budzier, A. & Lunn, D. Should we build more large dams? The actual costs of hydropower megaproject development. Energy Policy 69, 43–56 (2014).

    Article  Google Scholar 

  35. State of the River Nile Basin 2012 (Nile Basin Initiative, 2013).

  36. Eberhard, A., Gratwick, K., Morella, E. & Antmann, P. Independent Power Projects in Sub-Saharan Africa: Lessons from Five Key Countries (World Bank, 2016);

  37. Power, M. et al. The political economy of energy transitions in Mozambique and South Africa: the role of the rising powers. Energy Res. Soc. Sci. 17, 10–19 (2016).

    Article  Google Scholar 

  38. Mah, D. N., Wu, Y.-Y., Ip, J. C. & Hills, P. R. The role of the state in sustainable energy transitions: a case study of large smart grid demonstration projects in Japan. Energy Policy 63, 726–737 (2013).

    Article  Google Scholar 

  39. Off-Grid Renewable Energy Solutions: Global and Regional Status and Trends (IRENA, 2018).

  40. Kemausuor, F., Adkins, E., Adu-Poku, I., Brew-Hammond, A. & Modi, V. Electrification planning using Network Planner tool: the case of Ghana. Energy Sustain. Dev. (2014).

  41. GET FiT Uganda Annual Report 2019 (KFW, 2020).

  42. Huld, T., Müller, R. & Gambardella, A. A new solar radiation database for estimating PV performance in Europe and Africa. Sol. Energy 86, 1803–1815 (2012).

    Article  Google Scholar 

  43. Unruh, G. C. Understanding carbon lock-in. Energy Policy 28, 817–830 (2000).

    Article  Google Scholar 

  44. Seto, K. C. et al. Carbon lock-in: types, causes, and policy implications. Annu. Rev. Environ. Resour. 41, 425–452 (2016).

    Article  Google Scholar 

  45. World Development Indicators (World Bank, accessed 1 September 2019);

  46. Conway, D., Dalin, C., Landman, W. A. & Osborn, T. J. Hydropower plans in eastern and southern Africa increase risk of concurrent climate-related electricity supply disruption. Nat. Energy 2, 946–953 (2017).

    Article  Google Scholar 

  47. Thomas, N. & Nigam, S. Twentieth-century climate change over Africa: seasonal hydroclimate trends and Sahara desert expansion. J. Clim. 31, 3349–3370 (2018).

    Article  Google Scholar 

  48. China continues to build much-needed power capacity in Africa. Power Technology (2019).

  49. Labordena, M., Patt, A., Bazilian, M., Howells, M. & Lilliestam, J. Impact of political and economical barriers for concentrating solar power in sub-Saharan Africa. Energy Policy 102, 52–72 (2017).

    Article  Google Scholar 

  50. About the Data Tool (African Energy, accessed 21 December 2019);

  51. Peters, J., Sievert, M. & Toman, M. A. Rural electrification through mini-grids: challenges ahead. Energy Policy 132, 27–31 (2019).

    Article  Google Scholar 

  52. Kruger, W., Stritzke, S. & Trotter, P. A. De-risking solar auctions in sub-Saharan Africa – a comparison of site selection strategies in South Africa and Zambia. Renew. Sustain. Energy Rev. 104, 429–438 (2019).

    Article  Google Scholar 

  53. Gotzens, F., Heinrichs, H., Hörsch, J. & Hofmann, F. Performing energy modelling exercises in a transparent way - the issue of data quality in power plant databases. Energy Strategy Rev. 23, 1–12 (2019).

    Article  Google Scholar 

  54. World Governance Indicators (World Bank, accessed 1 October 2019);

  55. Polity IV Project (Center for Systemic Peace, accessed 1 October 2019);

  56. Marshall, M. G., Gurr, T. R. & Jaggers, K. Polity IV Project: Political Regime Characteristics and Transitions, 18002017. Dataset Users’ Manual (Center for Systemic Peace, 2018).

  57. Hastie, T., Tibshirani, R. & Friedman, J. H. The Elements of Statistical Learning: Data Mining, Inference, and Prediction (Springer, 2009).

  58. Ke, G. et al. LightGBM: a highly efficient gradient boosting decision tree. In Proc. Advances in Neural Information Processing Systems (Eds. Guyon, I. et al.) 3147–3155 (NIPS, 2017).

  59. Welcome to LightGBM’s Documentation! (Microsoft, accessed 2 January 2020);

  60. LightGBM: Light Gradient Boosting Machine (Microsoft, accessed 6 January 2020);

  61. Fawcett, T. An introduction to ROC analysis. Pattern Recognit. Lett. 27, 861–874 (2006).

    Article  Google Scholar 

  62. Varian, H. R. Big data: new tricks for econometrics. J. Econ. Perspect. 28, 3–28 (2014).

    Article  Google Scholar 

  63. King, D. A Global Optimization Algorithm Worth Using. dlib C++ Library (2017, accessed 19 December 2019).

  64. Malherbe, C. & Vayatis, N. Global optimization of Lipschitz functions. In Proceedings of the 34th International Conference on Machine Learning (Eds. Precup, D., Teh, Y.W.) 3592–3601 (PMLR, 2017).

  65. Powell, M. J. D. On the global convergence of trust region algorithms for unconstrained mimimization. Math. Program. 29, 297–303 (1984).

    MATH  Article  Google Scholar 

  66. Unler, A. & Murat, A. A discrete particle swarm optimization method for feature selection in binary classification problems. Eur. J. Oper. Res. 206, 528–539 (2010).

    MATH  Article  Google Scholar 

  67. Niculescu-Mizil, A. & Caruana, R. Obtaining calibrated probabilities from boosting. In Proceedings of the 21st Conference on Uncertainty in Artificial Intelligence (Eds. Bacchus, F. & Jaakkola, T.) 413–420 (AUAI Press, 2005).

  68. Niculescu-Mizil, A. & Caruana, R. Predicting good probabilities with supervised learning. In Proceedings of the 22nd International Conference on Machine Learning (Eds. Dzeroski, S. et al.) 625–632 (ACM, 2005)

  69. sklearn.calibration.CalibratedClassifierCV (Scikit-learn, accessed 1 November 2019);

  70. Probability calibration (Scikit-learn, accessed 20 December 2019);

  71. Lundberg, S. M. & Lee, S. I. A unified approach to interpreting model predictions. In Proc. Advances in Neural Information Processing Systems (Eds. Guyon, I. et al.) 4766–4775 (NIPS, 2017).

  72. Lundberg, S. M., Erion, G. G. & Lee, S.-I. Consistent individualized feature attribution for tree ensembles. Preprint at (2018).

  73. Scholvin, S. A New Scramble for Africa? The Rush for Energy Resources in Sub-Saharan Africa (Routledge, 2016).

  74. Freeman, E. A. & Moisen, G. G. A comparison of the performance of threshold criteria for binary classification in terms of predicted prevalence and kappa. Ecol. Modell. 217, 48–58 (2008).

    Article  Google Scholar 

Download references


We thank B. Caldecott, A. Haney, C. Hepburn, W. Kruger and D. Tulloch for comments on the manuscript. G.A. is grateful for the financial support of her doctoral research offered by the ESRC Grand Union Doctoral Training Partnership, the Scatcherd European Scholarship from the University of Oxford and the 73 Scholarship Fund for Geography from Hertford College, Oxford, established through the generosity of the college’s alumni, P. Newman and M. Teversham. A.M. acknowledges the support received from the British Academy’s Sustainable Development Programme, specifically, award GF160016 - Making Light Work, which was key to conceiving the research idea.

Author information

Authors and Affiliations



A.M. conceived the original research idea and sourced the asset-level data. G.A. and P.A.T. designed the research approach and merged asset- and country-level data. G.A. built, validated and interpreted the machine-learning-based model and produced the visuals of its results. P.A.T. developed the map. A.M. provided an early draft. G.A. and P.A.T. wrote the manuscript.

Corresponding author

Correspondence to Galina Alova.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Peer review information Nature Energy thanks Dan Marks and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Supplementary Information

Supplementary Tables 1–8, Figs. 1–9, Notes 1–4 and references.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Alova, G., Trotter, P.A. & Money, A. A machine-learning approach to predicting Africa’s electricity mix based on planned power plants and their chances of success. Nat Energy 6, 158–166 (2021).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:

Further reading


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing