Research Article
BibTex RIS Cite

TÜRKİYE’DE GÜNCEL VE GELECEK ELEKTRİK TÜKETİMİNİN TAHMİNİNDE LSTM, XGBOOST VE RASTGELE ORMAN MODELLERİ

Year 2025, Volume: 28 Issue: 4, 2139 - 2148, 03.12.2025

Abstract

Bu çalışmada, 1 Ocak 2016'dan 31 Aralık 2024'e kadar toplam 3.287 günlük kayıttan oluşan veri setini kullanarak Türkiye'nin elektrik tüketimini tahmin etmek için karşılaştırmalı bir analiz uygulanmıştır ve her kayıt belirli bir ay için toplam elektrik tüketimini (MWh cinsinden) temsil etmektedir. XGBoost, rastgele orman (RF), uzun-kısa süreli bellek (LSTM) sinir ağları gibi üç farklı model oluşturulmuş ve birbirleriyle karşılaştırılmıştır. 2016-2022 yıllarına ait veriler (7 yıl) eğitim seti olarak kullanılırken, 2023-2024 yıl sonu (2 yıl) verileri ise test seti olarak ayrılmıştır. Daha sonra, 2025-2030 yılları arasındaki yıllar için Türkiye'deki elektrik tüketiminin geleceğe yönelik tahminleri gerçekleştirilmiştir. Oluşturulan modellerin doğruluğu, yaygın olarak kullanılan üç hata metriği ile değerlendirilmiştir: kök ortalama karekök hatası (RMSE), ortalama mutlak hata (MAE) ve ortalama mutlak yüzde hatası (MAPE). Sonuçlar, XGBoost'un 26.070,90 MWh RMSE, 16.071,54 MWh MAE ve %1,84 gibi oldukça düşük bir MAPE değeri ile en iyi sonuçları sağladığını ortaya koymuştur. Buna karşılık, RF ve LSTM yaklaşımları benzer performans göstermiş ve daha az doğru sonuçlar vermiştir. Örneğin, RF modeli 94297,89 MWh RMSE, 72301,67 MWh MAE ve %7,90 MAPE değeri elde ederken, LSTM tekniği 95115,75 MWh RMSE, 73335,54 MWh MAE ve %8,15 MAPE değeri elde etmiştir. Bu çalışmanın sonuçları, XGBoost yaklaşımının Türkiye'nin elektrik tüketimini modellemede güçlü bir performans gösterdiğini ortaya koymaktadır.

Ethical Statement

Yazarlar herhangi bir çıkar çatışması olmadığını beyan etmektedirler.

References

  • 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
  • Bilgili, M. (2010). Present status and future projections of electrical energy in Turkey. Gazi University Journal of Science, 23(2), 237-248.
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • Fackrell, B. (2013). Turkey and regional energy Security on the road to 2023. Turkish Policy Quarterly, 12(2), 83-89.
  • Fauset, L. (1994). Fundamentals of Neural Network. Prentice Hall International, London.
  • Kavas, G. H. (2022). Forecasting Turkey Electricity Consumption With Deep Learning BI-LSTM Model. Journal of Science and Technology, 1(1), 24-33.
  • Klyuev, R. V., Morgoev, I. D., Morgoeva, A. D., Gavrina, O. A., Martyushev, N. V., Efremenkov, E. A., & Mengxu, Q. (2022). Methods of forecasting electric energy consumption: A literature review. Energies, 15(23), 8919. https://doi.org/10.3390/en15238919
  • Koç, E., & Şenel, M. C. (2013). Dünyada ve Türkiye’de enerji durumu–genel değerlendirme. Mühendis ve Makina Dergisi, 54(639), 32-44.
  • Markovic, T., Leon, M., Buffoni, D., & Punnekkat, S. (2024). Random Forest with differential privacy in Federated Learning Framework for Network Attack Detection and classification. Applied Intelligence, 54(17–18), 8132–8153. https://doi.org/10.1007/s10489-024-05589-6
  • Mateus, B. C., Mendes, M., Farinha, J. T., Assis, R., & Cardoso, A. M. (2021). Comparing LSTM and GRU models to predict the condition of a pulp paper press. Energies, 14(21), 6958. https://doi.org/10.3390/en14216958
  • Resende, P. A., & Drummond, A. C. (2018). A survey of random forest based methods for intrusion detection systems. ACM Computing Surveys, 51(3), 1–36. https://doi.org/10.1145/3178582
  • Saglam, M., Spataru, C., & Karaman, O. A. (2023). Forecasting electricity demand in Turkey using optimization and machine learning algorithms. Energies, 16(11), 4499. https://doi.org/10.3390/en16114499
  • Sozen, A., & Arcaklioğlu, E. (2007). Prospects for future projections of the basic energy sources in Turkey. Energy Sources, Part B: Economics, Planning, and Policy, 2(2), 183–201. https://doi.org/10.1080/15567240600813930
  • Uluocak, I., Pinar, E., & Bilgili, M. (2025). Atmospheric NO2 concentration prediction with statistical and hybrid deep learning methods. Environmental and Ecological Statistics, 32(1), 89–118. https://doi.org/10.1007/s10651-024-00637-3
  • Wang, B., & Liu, J. (2024a). Impact of climate change on Green Technology Innovation—an examination based on microfirm data. Sustainability, 16(24), 11206. https://doi.org/10.3390/su162411206
  • World Data (2021). Turkey Energy Consumption. https://www.worlddata.info/asia/turkey/energy consumption.php, (23.01.2021).
  • Yılmaz, A. O., & Uslu, T. (2007). The role of coal in energy production—consumption and sustainable development of Turkey. Energy Policy, 35(2), 1117–1128. https://doi.org/10.1016/j.enpol.2006.02.008
  • Zou, M., Jiang, W.-G., Qin, Q.-H., Liu, Y.-C., & Li, M.-L. (2022). Optimized XGBoost model with small dataset for predicting relative density of ti-6al-4v parts manufactured by selective laser melting. Materials, 15(15), 5298. https://doi.org/10.3390/ma15155298

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

Year 2025, Volume: 28 Issue: 4, 2139 - 2148, 03.12.2025

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.

Ethical Statement

The authors declare that they have no competing interests.

References

  • 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
  • Bilgili, M. (2010). Present status and future projections of electrical energy in Turkey. Gazi University Journal of Science, 23(2), 237-248.
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • Fackrell, B. (2013). Turkey and regional energy Security on the road to 2023. Turkish Policy Quarterly, 12(2), 83-89.
  • Fauset, L. (1994). Fundamentals of Neural Network. Prentice Hall International, London.
  • Kavas, G. H. (2022). Forecasting Turkey Electricity Consumption With Deep Learning BI-LSTM Model. Journal of Science and Technology, 1(1), 24-33.
  • Klyuev, R. V., Morgoev, I. D., Morgoeva, A. D., Gavrina, O. A., Martyushev, N. V., Efremenkov, E. A., & Mengxu, Q. (2022). Methods of forecasting electric energy consumption: A literature review. Energies, 15(23), 8919. https://doi.org/10.3390/en15238919
  • Koç, E., & Şenel, M. C. (2013). Dünyada ve Türkiye’de enerji durumu–genel değerlendirme. Mühendis ve Makina Dergisi, 54(639), 32-44.
  • Markovic, T., Leon, M., Buffoni, D., & Punnekkat, S. (2024). Random Forest with differential privacy in Federated Learning Framework for Network Attack Detection and classification. Applied Intelligence, 54(17–18), 8132–8153. https://doi.org/10.1007/s10489-024-05589-6
  • Mateus, B. C., Mendes, M., Farinha, J. T., Assis, R., & Cardoso, A. M. (2021). Comparing LSTM and GRU models to predict the condition of a pulp paper press. Energies, 14(21), 6958. https://doi.org/10.3390/en14216958
  • Resende, P. A., & Drummond, A. C. (2018). A survey of random forest based methods for intrusion detection systems. ACM Computing Surveys, 51(3), 1–36. https://doi.org/10.1145/3178582
  • Saglam, M., Spataru, C., & Karaman, O. A. (2023). Forecasting electricity demand in Turkey using optimization and machine learning algorithms. Energies, 16(11), 4499. https://doi.org/10.3390/en16114499
  • Sozen, A., & Arcaklioğlu, E. (2007). Prospects for future projections of the basic energy sources in Turkey. Energy Sources, Part B: Economics, Planning, and Policy, 2(2), 183–201. https://doi.org/10.1080/15567240600813930
  • Uluocak, I., Pinar, E., & Bilgili, M. (2025). Atmospheric NO2 concentration prediction with statistical and hybrid deep learning methods. Environmental and Ecological Statistics, 32(1), 89–118. https://doi.org/10.1007/s10651-024-00637-3
  • Wang, B., & Liu, J. (2024a). Impact of climate change on Green Technology Innovation—an examination based on microfirm data. Sustainability, 16(24), 11206. https://doi.org/10.3390/su162411206
  • World Data (2021). Turkey Energy Consumption. https://www.worlddata.info/asia/turkey/energy consumption.php, (23.01.2021).
  • Yılmaz, A. O., & Uslu, T. (2007). The role of coal in energy production—consumption and sustainable development of Turkey. Energy Policy, 35(2), 1117–1128. https://doi.org/10.1016/j.enpol.2006.02.008
  • Zou, M., Jiang, W.-G., Qin, Q.-H., Liu, Y.-C., & Li, M.-L. (2022). Optimized XGBoost model with small dataset for predicting relative density of ti-6al-4v parts manufactured by selective laser melting. Materials, 15(15), 5298. https://doi.org/10.3390/ma15155298
There are 23 citations in total.

Details

Primary Language English
Subjects Numerical Methods in Mechanical Engineering
Journal Section Research Article
Authors

Sergen Tümse 0000-0003-4764-747X

Publication Date December 3, 2025
Submission Date September 17, 2025
Acceptance Date November 1, 2025
Published in Issue Year 2025 Volume: 28 Issue: 4

Cite

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.