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

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 (R2). The hybrid model achieved an MAE of merely 192.59 kWh and an R2 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.

Authors

Institutions

Publication Details

Journal
Energies
Published
2025-08-12
DOI
https://doi.org/10.3390/en18164285
Citations
5
Primary Topic
Energy Load and Power Forecasting
Type
article
Field-Weighted Citation Impact
3.65
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Kayode Timothy Akindeji, Thokozile Mazibuko
5 citations
Energies
Energy Load and Power Forecasting
3.65
article

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

Kayode Timothy Akindeji, Thokozile Mazibuko
article en
5 citations

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 (R2). The hybrid model achieved an MAE of merely 192.59 kWh and an R2 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.

EnergiesVol. 18(16)
Durban University of Technology (ZA)
Openalex Percentile: Top 7%
Energy Load and Power Forecasting
3.65
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.