EconPapers    
Economics at your fingertips  
 

Hybrid Forecasting for Energy Consumption in South Africa: LSTM and XGBoost Approach

Thokozile Mazibuko and Kayode Akindeji ()
Additional contact information
Thokozile Mazibuko: Department of Electrical Power Engineering, Durban University of Technology, Durban 4001, South Africa
Kayode Akindeji: Department of Electrical Power Engineering, Durban University of Technology, Durban 4001, South Africa

Energies, 2025, vol. 18, issue 16, 1-25

Abstract: The precise forecasting of renewable energy production and usage is essential for the stability, efficiency, and sustainability of contemporary power systems. This requirement is especially urgent in South Africa, a nation currently grappling with considerable energy issues, such as recurrent load shedding, outdated coal-fired power plants, and an increasing electricity demand. As the country moves towards a more renewable-focused energy portfolio, the capacity to anticipate future energy requirements is crucial for effective planning, operational stability, and grid resilience. This study introduces a hybrid approach that combines deep learning and machine learning techniques, specifically integrating long short-term memory (LSTM) neural networks with extreme gradient boosting (XGBoost) to provide more accurate and detailed forecasts of energy demand. LSTM networks are particularly effective in capturing long-term temporal dependencies in sequential data, such as patterns of energy usage. At the same time, XGBoost delivers high-performance gradient-boosted decision trees that can manage non-linear relationships and noise present in extensive datasets. The proposed hybrid LSTM-XGBoost model was trained and assessed using high-resolution data on energy consumption and weather conditions gathered from a coastal municipality in KwaZulu-Natal, South Africa, a country that exemplifies the convergence of renewable energy potential and challenges related to energy reliability. The preprocessing steps, including normalization, feature selection, and sequence modeling, were implemented to enhance the input data for both models. The performance of the model was thoroughly evaluated using standard statistical metrics, specifically the mean absolute error (MAE), the root mean squared error (RMSE), and the coefficient of determination (R 2 ). The hybrid model achieved an MAE of merely 192.59 kWh and an R 2 of approximately 0.71, significantly surpassing the performance of the individual LSTM and XGBoost models. These findings highlight the enhanced predictive capabilities of the hybrid model in capturing both temporal trends and feature interactions in energy consumption behavior.

Keywords: LSTM; XGBoost; energy forecasting; renewable energy; smart grids; South Africa; hybrid models (search for similar items in EconPapers)
JEL-codes: Q Q0 Q4 Q40 Q41 Q42 Q43 Q47 Q48 Q49 (search for similar items in EconPapers)
Date: 2025
References: Add references at CitEc
Citations:

Downloads: (external link)
https://www.mdpi.com/1996-1073/18/16/4285/pdf (application/pdf)
https://www.mdpi.com/1996-1073/18/16/4285/ (text/html)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:gam:jeners:v:18:y:2025:i:16:p:4285-:d:1722558

Access Statistics for this article

Energies is currently edited by Ms. Agatha Cao

More articles in Energies from MDPI
Bibliographic data for series maintained by MDPI Indexing Manager ().

 
Page updated 2025-08-13
Handle: RePEc:gam:jeners:v:18:y:2025:i:16:p:4285-:d:1722558