Comparative Analysis of Temperature Prediction Models: Simple Models vs. Deep Learning Models †
Abstract
1. Introduction
2. Datasets of Historical Weather
3. Model and Evaluation Method
3.1. Simple Moving Average (SMA)
3.2. Seasonal Average Method with Lookback Years (SAM-Lookback)
3.3. Long Short-Term Memory (LSTM)
3.4. Evaluation Metric: RMSE
3.5. Evaluation Metric: Percentage Error
4. Results
4.1. Simple Moving Average (SMA)
4.1.1. RMSE for SMA
4.1.2. Percentage Error for SMA
4.2. Seasonal Average Method with Lookback Years (SAM-Lookback)
4.2.1. RMSE for SAM-Lookback
4.2.2. Percentage Error for SAM-Lookback
4.3. Long Short-Term Memory (LSTM)
4.3.1. RMSE for LSTM
4.3.2. Percentage Error for LSTM
5. Comparison of the Accuracy of the Three Models
5.1. Comparison of Model Accuracy Using RMSE
5.2. Comparison of Model Accuracy Using Percentage Error
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Al-Yahyai, S.; Charabi, Y.; Gastli, A. Review of the use of numerical weather prediction (NWP) models for wind energy assessment. Renew. Sustain. Energy Rev. 2010, 14, 3192–3198. [Google Scholar] [CrossRef]
- Bi, K.; Xie, L.; Zhang, H.; Chen, X.; Gu, X.; Tian, Q. Accurate medium-range global weather forecasting with 3D neural networks. Nature 2023, 619, 533–538. [Google Scholar] [CrossRef] [PubMed]
- Bochenek, B.; Ustrnul, Z. Machine learning in weather prediction and climate analyses—Applications and perspectives. Atmosphere 2022, 13, 180. [Google Scholar] [CrossRef]
- Abdulla, N.; Demirci, M.; Ozdemir, S. Design and evaluation of adaptive deep learning models for weather forecasting. Eng. Appl. Artif. Intell. 2022, 116, 105440. [Google Scholar] [CrossRef]
- Hasan, M.M.; Hasan, M.J.; Rahman, P.B. Comparison of RNN-LSTM, TFDF and stacking model approach for weather forecasting in Bangladesh using historical data from 1963 to 2022. PLoS ONE 2024, 19, e0310446. [Google Scholar] [CrossRef] [PubMed]
- Poornima, S.; Pushpalatha, M. Prediction of rainfall using intensified LSTM based recurrent neural network with weighted linear units. Atmosphere 2019, 10, 668. [Google Scholar] [CrossRef]
- Suleman, M.A.R.; Shridevi, S. Short-term weather forecasting using spatial feature attention based LSTM model. IEEE Access 2022, 10, 82456–82468. [Google Scholar] [CrossRef]
- Shiri, F.M.; Perumal, T.; Mustapha, N.; Mohamed, R. A comprehensive overview and comparative analysis on deep learning models: CNN, RNN, LSTM, GRU. arXiv 2023, arXiv:2305.17473. [Google Scholar] [CrossRef]
- DiPietro, R.; Hager, G.D. Deep learning: RNNs and LSTM. In Handbook of Medical Image Computing and Computer-Assisted Intervention; Elsevier: Amsterdam, The Netherlands, 2020; pp. 503–519. [Google Scholar]
- Stanulov, A.; Yassine, S. A comparative analysis of machine learning algorithms for the purpose of predicting Norwegian air passenger traffic. Int. J. Math. Stat. Comput. Sci. 2024, 2, 28–43. [Google Scholar]
- Dwivedi, D.N.; Patil, G. Climate change: Prediction of solar radiation using advanced machine learning techniques. In Visualization Techniques for Climate Change with Machine Learning and Artificial Intelligence; Elsevier: Amsterdam, The Netherlands, 2023; pp. 335–358. [Google Scholar]
- Meenal, R.; Michael, P.A.; Pamela, D.; Rajasekaran, E. Weather prediction using random forest machine learning model. Indones. J. Electr. Eng. Comput. Sci. 2021, 22, 1208–1215. [Google Scholar] [CrossRef]
- Asi, I.M. Laboratory comparison study for the use of stone matrix asphalt in hot weather climates. Constr. Build. Mater. 2006, 20, 982–989. [Google Scholar] [CrossRef]
- Rusdiana, S.; Yuni, S.M.; Khairunnisa, D. Comparison of rainfall forecasting in simple moving average (SMA) and weighted moving average (WMA) methods (case study at village of Gampong Blang Bintang, Big Aceh District-Sumatera-Indonesia). J. Res. Math. Trends Technol. 2020, 2, 21–27. [Google Scholar] [CrossRef]
- Hossain, M.S.; Mahmood, H. Short-term photovoltaic power forecasting using an LSTM neural network and synthetic weather forecast. IEEE Access 2020, 8, 172524–172533. [Google Scholar] [CrossRef]
- Wang, Y.; Zhang, N.; Chen, X. A short-term residential load forecasting model based on LSTM recurrent neural network considering weather features. Energies 2021, 14, 2737. [Google Scholar] [CrossRef]
- Kalekar, P.S. Time Series Forecasting Using Holt-Winters Exponential Smoothing; Kanwal Rekhi School of Information Technology: Powai, Mumbai, India, 2004; pp. 1–13. [Google Scholar]
- Nakisa, B.; Rastgoo, M.N.; Rakotonirainy, A.; Maire, F.; Chandran, V. Long short-term memory hyperparameter optimization for a neural network-based emotion recognition framework. IEEE Access 2018, 6, 49325–49338. [Google Scholar] [CrossRef]
- Liao, L.; Li, H.; Shang, W.; Ma, L. An empirical study of the impact of hyperparameter tuning and model optimization on the performance properties of deep neural networks. ACM Trans. Softw. Eng. Methodol. 2022, 31, 53. [Google Scholar] [CrossRef]
- Markovics, D.; Mayer, M.J. Comparison of machine learning methods for photovoltaic power forecasting based on numerical weather prediction. Renew. Sustain. Energy Rev. 2022, 161, 112364. [Google Scholar] [CrossRef]
City | RMSE | Optimal Window Size |
---|---|---|
LA. | 1.4191 | 2 |
SF. | 1.5204 | 2 |
Miami | 1.5585 | 2 |
Phoenix | 1.7225 | 2 |
Portland | 1.9175 | 2 |
New York | 2.7109 | 2 |
Boston | 3.1351 | 2 |
Minneapolis | 3.2248 | 2 |
Dallas | 3.2564 | 2 |
Kansas | 3.3290 | 2 |
City | W = 1 | W = 2 | W = 3 | W = 4 | W = 5 | W* |
---|---|---|---|---|---|---|
Threshold = 5% | ||||||
Boston | 36.92% | 31.52% | 29.79% | 28.73% | 28.83% | 1 |
New York | 43.80% | 39.86% | 38.05% | 37.19% | 36.42% | 1 |
LA. | 78.79% | 74.78% | 72.05% | 70.65% | 69.42% | 1 |
SF. | 71.05% | 67.53% | 65.26% | 64.19% | 63.06% | 1 |
Dallas | 50.82% | 46.50% | 43.43% | 42.08% | 40.96% | 1 |
Kansas | 41.12% | 35.46% | 32.36% | 31.11% | 30.25% | 1 |
Phoenix | 75.06% | 67.93% | 63.03% | 59.99% | 58.02% | 1 |
Minneapolis | 34.02% | 29.97% | 27.46% | 26.50% | 25.58% | 1 |
Portland | 54.00% | 49.02% | 46.25% | 44.56% | 43.44% | 1 |
Miami | 59.45% | 57.27% | 56.04% | 55.20% | 54.47% | 1 |
Threshold = 8% | ||||||
Boston | 52.55% | 47.36% | 45.60% | 44.38% | 43.84% | 1 |
New York | 60.38% | 56.50% | 54.82% | 53.93% | 53.41% | 1 |
LA. | 91.80% | 88.70% | 86.87% | 85.88% | 84.93% | 1 |
SF. | 88.66% | 85.68% | 84.10% | 82.99% | 82.20% | 1 |
Dallas | 65.71% | 60.84% | 58.21% | 56.52% | 55.38% | 1 |
Kansas | 56.31% | 50.75% | 48.04% | 45.74% | 45.38% | 1 |
Phoenix | 89.82% | 84.77% | 81.14% | 78.95% | 77.10% | 1 |
Minneapolis | 48.51% | 44.27% | 41.36% | 39.58% | 38.43% | 1 |
Portland | 75.34% | 70.20% | 66.27% | 64.52% | 63.16% | 1 |
Miami | 65.58% | 63.86% | 62.98% | 62.56% | 62.45% | 1 |
Threshold = 10% | ||||||
Boston | 61.16% | 56.50% | 55.01% | 53.54% | 52.86% | 1 |
New York | 68.60% | 65.09% | 63.45% | 62.95% | 62.35% | 1 |
LA. | 95.65% | 93.69% | 92.10% | 91.34% | 90.71% | 1 |
SF. | 94.28% | 92.49% | 90.98% | 90.16% | 89.52% | 1 |
Dallas | 72.86% | 67.95% | 65.19% | 63.67% | 62.43% | 1 |
Kansas | 64.07% | 58.77% | 56.19% | 54.34% | 53.54% | 1 |
Phoenix | 94.42% | 90.88% | 88.07% | 86.40% | 85.00% | 1 |
Minneapolis | 56.00% | 51.92% | 48.68% | 47.07% | 45.96% | 1 |
Portland | 84.01% | 79.73% | 76.95% | 75.24% | 73.87% | 1 |
Miami | 67.53% | 66.33% | 65.60% | 65.27% | 65.05% | 1 |
City | RMSE | Optimal Lookback Years |
---|---|---|
Miami | 4.2938 | 5 |
LA. | 4.3686 | 5 |
SF. | 4.3956 | 5 |
Portland | 5.7318 | 5 |
Phoenix | 5.9209 | 5 |
New York | 6.7722 | 5 |
Boston | 7.6514 | 5 |
Dallas | 8.1630 | 5 |
Kansas | 9.4926 | 5 |
Minneapolis | 9.7471 | 5 |
City | k = 1 | k = 2 | k = 3 | k = 4 | k = 5 | K* |
---|---|---|---|---|---|---|
Threshold = 5% | ||||||
Boston | 20.39% | 22.54% | 22.98% | 22.45% | 21.86% | 3 |
New York | 25.94% | 28.16% | 28.17% | 28.45% | 27.39% | 4 |
LA. | 46.56% | 50.30% | 50.46% | 50.50% | 49.62% | 4 |
SF. | 43.12% | 45.34% | 45.96% | 45.82% | 45.02% | 3 |
Dallas | 28.17% | 30.58% | 31.16% | 30.92% | 30.03% | 3 |
Kansas | 20.12% | 20.28% | 20.01% | 19.87% | 18.98% | 2 |
Phoenix | 37.43% | 41.09% | 41.93% | 42.24% | 41.29% | 4 |
Minneapolis | 17.58% | 19.28% | 19.29% | 19.31% | 19.19% | 4 |
Portland | 29.28% | 32.10% | 32.57% | 32.36% | 31.76% | 3 |
Miami | 42.12% | 43.14% | 42.33% | 41.38% | 39.97% | 2 |
Threshold = 8% | ||||||
Boston | 31.81% | 34.74% | 34.57% | 34.39% | 33.24% | 2 |
New York | 39.18% | 41.95% | 41.99% | 41.98% | 40.79% | 3 |
LA. | 65.44% | 68.37% | 68.78% | 68.59% | 67.30% | 3 |
SF. | 62.62% | 65.07% | 65.27% | 65.08% | 63.91% | 3 |
Dallas | 41.09% | 44.28% | 44.67% | 43.65% | 42.85% | 3 |
Kansas | 30.73% | 31.29% | 31.43% | 30.60% | 28.71% | 3 |
Phoenix | 55.74% | 59.55% | 60.74% | 60.49% | 59.61% | 3 |
Minneapolis | 27.36% | 29.01% | 29.60% | 29.42% | 29.08% | 3 |
Portland | 44.29% | 48.78% | 48.51% | 48.50% | 48.13% | 2 |
Miami | 52.81% | 53.15% | 52.15% | 50.39% | 48.32% | 2 |
Threshold = 10% | ||||||
Boston | 38.97% | 41.87% | 41.54% | 41.00% | 40.15% | 2 |
New York | 46.89% | 49.24% | 49.65% | 49.11% | 47.50% | 3 |
LA. | 74.32% | 76.60% | 77.00% | 76.10% | 74.19% | 3 |
SF. | 71.54% | 74.66% | 74.45% | 73.41% | 72.12% | 2 |
Dallas | 48.40% | 51.99% | 51.45% | 50.19% | 48.97% | 2 |
Kansas | 37.16% | 38.15% | 37.94% | 36.31% | 34.35% | 2 |
Phoenix | 65.50% | 68.83% | 69.68% | 69.38% | 68.21% | 3 |
Minneapolis | 33.06% | 34.96% | 35.58% | 35.33% | 34.75% | 3 |
Portland | 53.24% | 58.38% | 58.14% | 57.90% | 57.19% | 2 |
Miami | 56.92% | 56.97% | 55.37% | 53.58% | 51.38% | 2 |
City | RMSE |
---|---|
LA. | 2.6113 |
SF. | 2.9035 |
Miami | 2.9975 |
Phoenix | 3.2422 |
Portland | 3.6760 |
New York | 5.1143 |
Boston | 5.7204 |
Minneapolis | 6.0942 |
Kansas | 6.5876 |
Dallas | 8.3308 |
City | Threshold = 5% | Threshold = 8% | Threshold = 10% |
---|---|---|---|
Kansas | 43.82% | 59.54% | 63.92% |
LA. | 80.89% | 93.70% | 97.04% |
Minneapolis | 32.76% | 49.89% | 58.02% |
Phoenix | 77.67% | 90.41% | 95.10% |
Portland | 54.65% | 76.61% | 86.09% |
SF. | 71.82% | 91.65% | 95.72% |
Boston | 39.50% | 56.69% | 65.60% |
New York | 41.96% | 62.56% | 69.88% |
Dallas | 46.55% | 69.94% | 76.24% |
Miami | 86.91% | 94.82% | 97.16% |
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. |
© 2025 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wang, Z.; Zhang, W.; Pinsky, E. Comparative Analysis of Temperature Prediction Models: Simple Models vs. Deep Learning Models. Comput. Sci. Math. Forum 2025, 11, 6. https://doi.org/10.3390/cmsf2025011006
Wang Z, Zhang W, Pinsky E. Comparative Analysis of Temperature Prediction Models: Simple Models vs. Deep Learning Models. Computer Sciences & Mathematics Forum. 2025; 11(1):6. https://doi.org/10.3390/cmsf2025011006
Chicago/Turabian StyleWang, Zibo, Weiqi Zhang, and Eugene Pinsky. 2025. "Comparative Analysis of Temperature Prediction Models: Simple Models vs. Deep Learning Models" Computer Sciences & Mathematics Forum 11, no. 1: 6. https://doi.org/10.3390/cmsf2025011006
APA StyleWang, Z., Zhang, W., & Pinsky, E. (2025). Comparative Analysis of Temperature Prediction Models: Simple Models vs. Deep Learning Models. Computer Sciences & Mathematics Forum, 11(1), 6. https://doi.org/10.3390/cmsf2025011006