Comparative Study of Machine Learning Models for Temperature Prediction: Analyzing Accuracy, Stability, and Generalization
Abstract
Accurate temperature prediction is crucial for climate monitoring, energy management, and disaster preparedness. This study provides a comparative analysis of various machine learning models, including Random Forest, Gradient Boosting, Histogram-Based Gradient Boosting, XGBoost, Support Vector Regression (SVR), Ridge Regression, and Lasso Regression, to evaluate their predictive accuracy, stability, and generalization capability. The models are assessed using five-fold cross-validation, with the R² metric as the primary evaluation criterion. The results indicate that Random Forest achieves the highest accuracy, with an R² mean of 0.999994, demonstrating its strong ability to model temperature variations. Ridge Regression unexpectedly performs at a similar level, suggesting that the dataset contains strong linear dependencies. Gradient Boosting, Histogram-Based Gradient Boosting, and XGBoost also achieve high accuracy, confirming their effectiveness in capturing complex relationships between meteorological parameters. SVR, while effective, exhibits higher variance, indicating that it may require further tuning for improved consistency. Lasso Regression, with an R² mean of 0.9783, shows the lowest accuracy, confirming that linear models are less suitable for complex meteorological predictions. These findings highlight the superiority of ensemble-based methods in temperature forecasting, reinforcing their stability and adaptability. Future research should explore hybrid models that integrate ensemble techniques with feature engineering optimizations to further enhance predictive performance. This study contributes to the ongoing development of machine learning applications in meteorology, offering insights into model selection for climate-related forecasting tasks.
Downloads
References
A.-L. Balogun et al., “Assessing the potentials of digitalization as a tool for climate change adaptation and sustainable development in urban centres,” Sustain. Cities Soc., vol. 53, p. 101888, 2020.
S. M. Khan et al., “A systematic review of disaster management systems: approaches, challenges, and future directions,” Land, vol. 12, no. 8, p. 1514, 2023.
R. Meenal et al., “Weather forecasting for renewable energy system: a review,” Arch. Comput. Methods Eng., vol. 29, no. 5, pp. 2875–2891, 2022.
S. K. Balasundram, R. R. Shamshiri, S. Sridhara, and N. Rizan, “The role of digital agriculture in mitigating climate change and ensuring food security: an overview,” Sustainability, vol. 15, no. 6, p. 5325, 2023.
E. Stakhiv and B. Stewart, “Needs for climate information in support of decision-making in the water sector,” Procedia Environ. Sci., vol. 1, pp. 102–119, 2010.
I. E. Agbehadji, S. Schütte, M. Masinde, J. Botai, and T. Mabhaudhi, “Climate risks resilience development: A bibliometric analysis of climate-related early warning Systems in Southern Africa,” Climate, vol. 12, no. 1, p. 3, 2023.
P. Sinha, M. Modani, S. Islam, M. Khare, and R. K. Srivastava, “Evolution of Weather and Climate Prediction Systems,” in Mitigation and Adaptation Strategies Against Climate Change in Natural Systems, Springer, pp. 243–265, 2025
X. Bai, L. Zhang, Y. Feng, H. Yan, and Q. Mi, “Multivariate temperature prediction model based on CNN-BiLSTM and RandomForest,” J. Supercomput., vol. 81, no. 1, p. 162, 2025.
A. G. Di Stefano, M. Ruta, and G. Masera, “Advanced digital tools for data-informed and performance-driven design: a review of building energy consumption forecasting models based on machine learning,” Appl. Sci., vol. 13, no. 24, p. 12981, 2023.
D. R. Liyanage, K. Hewage, S. A. Hussain, F. Razi, and R. Sadiq, “Climate adaptation of existing buildings: A critical review on planning energy retrofit strategies for future climate,” Renew. Sustain. Energy Rev., vol. 199, p. 114476, 2024.
M. Hosseini, K. Javanroodi, and V. M. Nik, “High-resolution impact assessment of climate change on building energy performance considering extreme weather events and microclimate--Investigating variations in indoor thermal comfort and degree-days,” Sustain. Cities Soc., vol. 78, p. 103634, 2022.
D. Markovics and M. J. Mayer, “Comparison of machine learning methods for photovoltaic power forecasting based on numerical weather prediction,” Renew. Sustain. Energy Rev., vol. 161, p. 112364, 2022.
S. He, X. Li, T. DelSole, P. Ravikumar, and A. Banerjee, “Sub-seasonal climate forecasting via machine learning: Challenges, analysis, and advances,” in Proceedings of the AAAI conference on artificial intelligence, vol. 35, no. 1, pp. 169–177, 2021
H. Shaiba et al., “Weather Forecasting Prediction Using Ensemble Machine Learning for Big Data Applications.,” Comput. Mater. & Contin., vol. 73, no. 2, 2022.
A. Mahabub, A.-Z. S. Bin Habib, M. R. H. Mondal, S. Bharati, and P. Podder, “Effectiveness of ensemble machine learning algorithms in weather forecasting of Bangladesh,” in Innovations in Bio-Inspired Computing and Applications: Proceedings of the 11th International Conference on Innovations in Bio-Inspired Computing and Applications (IBICA 2020) held during December 16-18, 2020 11, pp. 267–277, 2021
A. A. H. Lateko, H.-T. Yang, and C.-M. Huang, “Short-term PV power forecasting using a regression-based ensemble method,” Energies, vol. 15, no. 11, p. 4171, 2022.
A. Sekertekin, M. Bilgili, N. Arslan, A. Yildirim, K. Celebi, and A. Ozbek, “Short-term air temperature prediction by adaptive neuro-fuzzy inference system (ANFIS) and long short-term memory (LSTM) network,” Meteorol. Atmos. Phys., vol. 133, pp. 943–959, 2021.
M. Yu, F. Xu, W. Hu, J. Sun, and G. Cervone, “Using Long Short-Term Memory (LSTM) and Internet of Things (IoT) for localized surface temperature forecasting in an urban environment,” IEEE Access, vol. 9, pp. 137406–137418, 2021.
E. Haque, S. Tabassum, and E. Hossain, “A comparative analysis of deep neural networks for hourly temperature forecasting,” IEEE Access, vol. 9, pp. 160646–160660, 2021.
M. Jansen, “BGC Jena Weather Station Dataset (2017-2024).” Kaggle, 2024.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Comparative Study of Machine Learning Models for Temperature Prediction: Analyzing Accuracy, Stability, and Generalization
Pages: 2672-2680
Copyright (c) 2025 Gregorius Airlangga

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).