Machine learning ensemble models for hourly temperature prediction in arid urban environments: A comparative study with applications to climate-responsive planning

Accurate hourly temperature prediction is essential for energy demand planning, public health management, and climate adaptation strategies in rapidly urbanizing arid regions. This study develops and evaluates a comprehensive framework for predicting hourly air temperature in Riyadh, Saudi Arabia, using 23 years of meteorological data (2001–2023). Six machine learning and deep learning models, namely Long Short-Term Memory (LSTM), Convolutional Neural Networks (CNN), Artificial Neural Networks (ANN), Recurrent Neural Networks (RNN), Support Vector Machines (SVM), and Random Forest (RF) were applied for hourly temperature prediction. We compared their performance using a temporary independent framework. The dataset was partitioned chronologically into training, validation, and independent testing periods, and preprocessing parameters were estimated exclusively from the training data to prevent information leakage. Lagged-correlation and multivariate analyses were also conducted to examine the strength and temporal structure of associations between meteorological variables and hourly air temperature. Among the evaluated models, LSTM exhibited the best independent-test performance (R 2 = 0.99981, RMSE = 0.1371°C, MAE = 0.1092°C), followed by RNN (R 2 = 0.99944, RMSE = 0.2320°C) and RF (R 2 = 0.9992, RMSE = 0.2739°C). ANN also showed strong predictive ability, whereas CNN and SVM yielded comparatively larger errors. The lagged-correlation analysis further revealed that the strength and timing of meteorological associations with air temperature varied across predictors, indicating a clear temporal structure in hourly temperature dynamics. The framework provides highly accurate hourly temperature estimates and demonstrates the value of combining temporal climate analysis with machine-learning and deep-learning methods for cooling-demand assessment, building-energy applications, and climate-responsive urban planning in arid cities.

Authors

Institutions

Publication Details

Journal
PLoS ONE
Published
2026-11-30
DOI
https://doi.org/10.1371/journal.pone.0363669
Primary Topic
Urban Heat Island Mitigation
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Machine learning ensemble models for hourly temperature prediction in arid urban environments: A comparative study with applications to climate-responsive planning

Mohammed J. Alshayeb, Saleh Hamed Alsulamy, Abdulla ‐ Al Kafy, Ahmed Ali A. Shohan
2 links
PLoS ONE
Urban Heat Island Mitigation
article

Machine learning ensemble models for hourly temperature prediction in arid urban environments: A comparative study with applications to climate-responsive planning

Mohammed J. Alshayeb, Saleh Hamed Alsulamy, Abdulla ‐ Al Kafy, Ahmed Ali A. Shohan
article en

Abstract

Accurate hourly temperature prediction is essential for energy demand planning, public health management, and climate adaptation strategies in rapidly urbanizing arid regions. This study develops and evaluates a comprehensive framework for predicting hourly air temperature in Riyadh, Saudi Arabia, using 23 years of meteorological data (2001–2023). Six machine learning and deep learning models, namely Long Short-Term Memory (LSTM), Convolutional Neural Networks (CNN), Artificial Neural Networks (ANN), Recurrent Neural Networks (RNN), Support Vector Machines (SVM), and Random Forest (RF) were applied for hourly temperature prediction. We compared their performance using a temporary independent framework. The dataset was partitioned chronologically into training, validation, and independent testing periods, and preprocessing parameters were estimated exclusively from the training data to prevent information leakage. Lagged-correlation and multivariate analyses were also conducted to examine the strength and temporal structure of associations between meteorological variables and hourly air temperature. Among the evaluated models, LSTM exhibited the best independent-test performance (R 2 = 0.99981, RMSE = 0.1371°C, MAE = 0.1092°C), followed by RNN (R 2 = 0.99944, RMSE = 0.2320°C) and RF (R 2 = 0.9992, RMSE = 0.2739°C). ANN also showed strong predictive ability, whereas CNN and SVM yielded comparatively larger errors. The lagged-correlation analysis further revealed that the strength and timing of meteorological associations with air temperature varied across predictors, indicating a clear temporal structure in hourly temperature dynamics. The framework provides highly accurate hourly temperature estimates and demonstrates the value of combining temporal climate analysis with machine-learning and deep-learning methods for cooling-demand assessment, building-energy applications, and climate-responsive urban planning in arid cities.

PLoS ONEVol. 21(11)
King Khalid University (SA), The University of Texas at Austin (US)
Climate action
Urban Heat Island Mitigation
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon