Research Article

LSTM, XGBOOST AND RANDOM FOREST MODELS IN FORECASTING CURRENT AND FUTURE ELECTRICITY CONSUMPTION IN TÜRKİYE

Volume: 28 Number: 4 December 3, 2025
TR EN

LSTM, XGBOOST AND RANDOM FOREST MODELS IN FORECASTING CURRENT AND FUTURE ELECTRICITY CONSUMPTION IN TÜRKİYE

Abstract

In this study, a comparative analysis was employed to predict electricity consumption of Türkiye using a dataset consisting of 3,287 daily records from January 1, 2016, to December 31, 2024, with each record representing the total electricity consumption (in MWh) for a specific day. Three different models, such as XGBoost, random forest (RF), and long-short term memory (LSTM) neural networks, were generated and compared with each other. Data from 2016 to 2022 (7 years) were used as the training set, while data from 2023 to the end of 2024 (2 years) were reserved as the test set. Subsequently, predictions of electricity consumption in Türkiye have been made for the years 2025–2030. The correctness of the generated models was assessed using three commonly used error metrics: root mean squared error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE). Results demonstrated that XGBoost yielded the most accurate outcomes, including an RMSE of 26,070.90 MWh, an MAE of 16,071.54 MWh, and a remarkably low MAPE of 1.84%. On the other hand, RF and LSTM techniques provided similar and less accurate results. For example, the RF approach yielded an RMSE of 94297.89 MWh, an MAE of 72301.67 MWh, and a MAPE of 7.90%, while LSTM model yielded an RMSE of 95115.75 MWh, an MAE of 73335.54 MWh, and a MAPE of 8.15%. The outcomes of this investigation reveal the strong performance of the XGBoost techniques in modeling Türkiye’s electricity consumption.

Keywords

Ethical Statement

The authors declare that they have no competing interests.

References

  1. Arora, N. K. (2019a). Impact of climate change on agriculture production and its Sustainable Solutions. Environmental Sustainability, 2(2), 95–96. https://doi.org/10.1007/s42398-019-00078-w
  2. Bilgili, M. (2010). Present status and future projections of electrical energy in Turkey. Gazi University Journal of Science, 23(2), 237-248.
  3. Bilgili, M., & Pinar, E. (2023). Gross Electricity Consumption Forecasting Using LSTM and Sarima approaches: A case study of türkiye. Energy, 284, 128575. https://doi.org/10.1016/j.energy.2023.128575
  4. Biskin, O. T., & Ciftci, A. (2021). Forecasting of Turkey’s electrical energy consumption using LSTM and GRU Networks. Bilecik Şeyh Edebali Üniversitesi Fen Bilimleri Dergisi, 8(2), 656–667. https://doi.org/10.35193/bseufbd.935824
  5. Butler, K. T., Davies, D. W., Cartwright, H., Isayev, O., & Walsh, A. (2018). Machine learning for molecular and materials science. Nature, 559(7715), 547–555. https://doi.org/10.1038/s41586-018-0337-2
  6. Chen, T., & Guestrin, C. (2016). XGBoost: a scalable tree boosting system. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 785–794. https://doi.org/10.1145/2939672.2939785
  7. Demir, E., & Gunal, S. (2025). Short-term electricity consumption forecasting with deep learning. The Journal of Supercomputing, 81(10). https://doi.org/10.1007/s11227-025-07564-5
  8. Erbay, C. (2025). District-level solar forecasting and green hydrogen cost mapping in Türkiye using XGBoost machine learning method. International Journal of Hydrogen Energy, 166, 150993. https://doi.org/10.1016/j.ijhydene.2025.150993

Details

Primary Language

English

Subjects

Numerical Methods in Mechanical Engineering

Journal Section

Research Article

Publication Date

December 3, 2025

Submission Date

September 17, 2025

Acceptance Date

November 1, 2025

Published in Issue

Year 2025 Volume: 28 Number: 4

APA
Tümse, S. (2025). LSTM, XGBOOST AND RANDOM FOREST MODELS IN FORECASTING CURRENT AND FUTURE ELECTRICITY CONSUMPTION IN TÜRKİYE. Kahramanmaraş Sütçü İmam Üniversitesi Mühendislik Bilimleri Dergisi, 28(4), 2139-2148. https://doi.org/10.17780/ksujes.1785928