Forecasting Energy Consumption Using a Hybrid LSTM-XGBoost Model †
Abstract
1. Introduction
2. Related Work
3. Methodology
3.1. Dataset Description and Preprocessing
3.2. LSTM Network Architecture
3.3. Hybrid LSTM-XGBoost Framework
3.4. Evaluation Metrics
- Root Mean Squared Error: measures the average magnitude of the errors.
- Mean Absolute Percentage Error: provides a measure of prediction accuracy in percentage terms.
- Coefficient of Determination (): indicates the proportion of the variance in the dependent variable that is predictable from the independent variables.
4. Results and Discussion
4.1. Quantitative Performance
4.2. Visual Analysis
4.3. Discussion and Comparative Analysis
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Dakheel, F.; Çevik, M. Optimizing Smart Grid Load Forecasting via a Hybrid Long Short-Term Memory-XGBoost Framework: Enhancing Accuracy, Robustness, and Energy Management. Energies 2025, 18, 2842. [Google Scholar] [CrossRef] [Scilit]
- Salam, A.; El Hibaoui, A. Comparison of Machine Learning Algorithms for the Power Consumption Prediction: Case Study of Tetouan City. In Proceedings of the 2018 6th International Renewable and Sustainable Energy Conference (IRSEC), Rabat, Morocco, 5–8 December 2018; pp. 1–5. [Google Scholar] [CrossRef] [Scilit]
- Ajder, A.; Hamza, H.A.A.; Ayaz, R. Wavelet-Enhanced Hybrid LSTM-XGBoost Model for Predicting Time Series Containing Unpredictable Events. IEEE Access 2025, 13, 58671–58679. [Google Scholar] [CrossRef] [Scilit]
- Oumiguil, L.; Nejmi, A. Forecasting Energy Consumption on a Microgrid using ARIMA-GRU Model. Sol. Energy Sustain. Dev. J. 2025, 14, 15–26. [Google Scholar] [CrossRef] [Scilit]
- Mazibuko, T.; Akindeji, K. Hybrid Forecasting for Energy Consumption in South Africa: LSTM and XGBoost Approach. Energies 2025, 18, 4285. [Google Scholar] [CrossRef] [Scilit]
- Rondón-Cordero, V.H.; Montuori, L.; Alcázar-Ortega, M.; Siano, P. Advancements in hybrid and ensemble ML models for energy consumption forecasting: Results and challenges of their applications. Renew. Sustain. Energy Rev. 2025, 224, 116095. [Google Scholar] [CrossRef] [Scilit]
- Al Mamun, A.; Sohel; Mohammad, N.; Sunny, S.H.; Dipta, D.R.; Hossain, E. A Comprehensive Review of the Load Forecasting Techniques Using Single and Hybrid Predictive Models. IEEE Access 2020, 8, 134911–134939. [Google Scholar] [CrossRef] [Scilit]
- Nandigam, S.H.; Nageswararao, K.; Sharma, P.K. Hybrid Deep Learning Models for Energy Consumption Forecasting: A CNN-LSTM Approach for Large-Scale Datasets. J. Renew. Energy Smart Grid Technol. 2025, 20, 82–91. [Google Scholar] [CrossRef] [Scilit]
- Moon, Y.; Lee, Y.; Hwang, Y.; Jeong, J. Long Short-Term Memory Autoencoder and Extreme Gradient Boosting-Based Factory Energy Management Framework for Power Consumption Forecasting. Energies 2024, 17, 3666. [Google Scholar] [CrossRef] [Scilit]
- Alizadegan, H.; Malki, B.R.; Radmehr, A.; Karimi, H.; Ilani, M.A. Comparative study of long short-term memory (LSTM), bidirectional LSTM, and traditional machine learning approaches for energy consumption prediction. Energy Explor. Exploit. 2024, 43, 281–301. [Google Scholar] [CrossRef] [Scilit]
- Islam, M.T.; Turja, S.A.; Islam, T.; Rahman, M.; Habib, A. Forecasting Tetouan energy demand employing shift approach in machine-learning: Complementing econometric insights. Qual. Quant. 2024, 59, 1833–1860. [Google Scholar] [CrossRef] [Scilit]
- Al-Jamimi, H.A.; BinMakhashen, G.M.; Worku, M.Y.; Hassan, M.A. Advancements in Household Load Forecasting: Deep Learning Model with Hyperparameter Optimization. Electronics 2023, 12, 4909. [Google Scholar] [CrossRef] [Scilit]
- Satan, A.; Zhakiyev, N.; Nugumanova, A.; Friedrich, D. Hybrid feature-based neural network regression method for load profiles forecasting. Energy Inform. 2025, 8, 19. [Google Scholar] [CrossRef] [Scilit]





| Component | Hyperparameter | Value |
|---|---|---|
| LSTM Layer 1 | Units | 64 |
| Return sequences | True | |
| Dropout | 0.2 | |
| LSTM Layer 2 | Units | 32 |
| Dropout | 0.2 | |
| Dense Layer | Units | 1 |
| Input Shape | Window × Features | window × n_features |
| XGBoost | n_estimators | 400 |
| learning_rate | 0.05 | |
| max_depth | 4 | |
| subsample | 0.8 | |
| colsample_bytree | 0.8 | |
| objective | reg:squarederror | |
| random_state | 42 | |
| n_jobs | −1 |
| Model | RMSE (kWh) | MAPE (%) | R2 |
|---|---|---|---|
| ARIMA | 5999.3440 | 20.1901 | −0.1965 |
| SVR | 1209.8550 | 3.4681 | 0.9447 |
| Random Forest | 1105.3000 | 4.8715 | 0.9512 |
| LSTM | 808.51 | 2.94 | 0.978 |
| Hybrid CNN-LSTM | 1025.67 | 3.65 | 0.9618 |
| Hybrid LSTM-XGBoost | 687.21 | 2.41 | 0.984 |
| Zone | Model | RMSE (kWh) | MAPE (%) | R2 |
|---|---|---|---|---|
| Zone 1 | LSTM | 921.2895 | 2.4782 | 0.9777 |
| Hybrid LSTM-XGBoost | 651.5100 | 1.6780 | 0.9889 | |
| Zone 2 | LSTM | 808.51 | 2.94 | 0.978 |
| Hybrid LSTM-XGBoost | 687.21 | 2.41 | 0.984 | |
| Zone 3 | LSTM | 1153.5117 | 9.3104 | 0.8817 |
| Hybrid LSTM-XGBoost | 852.3203 | 6.6527 | 0.9340 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Sadik, Y.; Nejmi, A.; Oumiguil, L.; Baite, M. Forecasting Energy Consumption Using a Hybrid LSTM-XGBoost Model. Eng. Proc. 2026, 144, 4. https://doi.org/10.3390/engproc2026144004
Sadik Y, Nejmi A, Oumiguil L, Baite M. Forecasting Energy Consumption Using a Hybrid LSTM-XGBoost Model. Engineering Proceedings. 2026; 144(1):4. https://doi.org/10.3390/engproc2026144004
Chicago/Turabian StyleSadik, Youssef, Ali Nejmi, Lahoucine Oumiguil, and Mohamed Baite. 2026. "Forecasting Energy Consumption Using a Hybrid LSTM-XGBoost Model" Engineering Proceedings 144, no. 1: 4. https://doi.org/10.3390/engproc2026144004
APA StyleSadik, Y., Nejmi, A., Oumiguil, L., & Baite, M. (2026). Forecasting Energy Consumption Using a Hybrid LSTM-XGBoost Model. Engineering Proceedings, 144(1), 4. https://doi.org/10.3390/engproc2026144004

