نوع مقاله : مقاله پژوهشی
عنوان مقاله English
نویسندگان English
Extended Abstract
Introduction
Heat waves are among the most severe climatic hazards affecting mountainous and semi-arid regions, with escalating frequency and intensity under global warming (IPCC, 2021). Lorestan Province, on the western flank of the Zagros Mountains (Iran), is particularly vulnerable owing to its complex topography and semi-Mediterranean mountain climate. Khorramabad, the provincial capital, has recorded maximum temperatures reaching 47°C, with heat-wave days (Tmax ≥ 35°C) occurring on average more than 100 days per year in recent decades, threatening agriculture, water resources, and public health. Classical statistical approaches such as multiple linear regression and ARIMA models have limited capacity to capture the nonlinear relationships governing near-surface air temperature. Machine learning algorithms, particularly ensemble tree-based methods, offer greater flexibility for modeling such complex, nonlinear relationships. This study aims to predict daily maximum temperature at Khorramabad synoptic station using Random Forest (RF) and eXtreme Gradient Boosting (XGBoost) algorithms trained on a 74-year observational record (1951–2025), and to evaluate their applicability for operational heat-wave early-warning purposes.
Materials and methods
Daily meteorological data (1951–2025; 27,234 records) were obtained from the Khorramabad synoptic station (ID 40782; 33.43°N, 48.35°E; 1,147 m a.s.l.) of the Islamic Republic of Iran Meteorological Organization. After removing records with missing values, 25,086 daily observations remained. Ten predictor features were engineered: current-day minimum temperature (Tmin), mean wind speed (ffm), relative humidity (um), station pressure (pm), calendar month, day-of-year, and lagged maximum-temperature values (Tmax at lags 1–3) together with lagged minimum temperature (Tmin at lag 1). The dataset was chronologically partitioned, without random shuffling, into training (1954–2011; 20,068 days) and testing (2012–2025; 5,018 days) subsets to prevent information leakage from future to past. Two ensemble algorithms were implemented: RF (Breiman, 2001), an aggregation of 300 bootstrap-trained decision trees (max depth = 15, max_features = √p), and XGBoost (Chen & Guestrin, 2016), a sequential gradient-boosting algorithm with 500 estimators (max depth = 6, learning rate = 0.05, subsample = 0.8, colsample_bytree = 0.8). Model performance was assessed using seven statistical criteria — coefficient of determination (R²), root-mean-square error (RMSE), mean absolute error (MAE), Nash–Sutcliffe efficiency (NSE), Kling–Gupta efficiency (KGE), percent bias (PBIAS), and mean bias error (MBE) — together with five-fold cross-validation on the training set to evaluate model stability and generalization capacity.
Results and discussion
Both algorithms achieved high predictive accuracy on the independent test set. XGBoost slightly outperformed RF across all metrics (R² = 0.9753 vs. 0.9740; RMSE = 1.727 vs. 1.769°C; MAE = 1.307 vs. 1.334°C; NSE = 0.9753 vs. 0.9740; KGE = 0.9811 vs. 0.9760), while both models exhibited a small underestimation bias (PBIAS = 1.16% and 1.03%, respectively; MBE ≈ −0.3°C). Five-fold cross-validation confirmed model stability, with mean R² of 0.9705 (XGBoost) and 0.9688 (RF) and low inter-fold standard deviation, indicating no evidence of overfitting. Feature-importance analysis showed that the previous day's maximum temperature (Tmax t-1) was by far the dominant predictor in both models (importance = 0.608 for RF and 0.519 for XGBoost), followed by Tmax(t-2) and current-day Tmin, reflecting strong thermal persistence in the regional climate system. Meteorological variables such as relative humidity, pressure, and wind speed contributed comparatively little, likely because much of their information is already embedded in the lagged temperature variables. Time-series and scatter-plot comparisons showed that both models closely tracked the seasonal cycle and short-term fluctuations, though with a tendency toward underestimation during extreme heat events exceeding 45°C — a known limitation of tree-based ensembles trained on imbalanced extreme-value distributions. Monthly analysis identified June, July, and August as the months with the highest predictive error, coincident with the peak occurrence of heat-wave days. The long-term linear trend in annual mean Tmax (1955–2025) was slightly positive (0.0041°C/year) but not statistically significant (p = 0.538), with interannual variability dominating the long-term signal. For heat-wave detection (Tmax ≥ 35°C), XGBoost identified 1,535 of 1,574 observed heat-wave days and RF identified 1,543 days, both models correctly flagging extreme years such as 2019.
Conclusion
Both RF and XGBoost provide highly accurate and stable predictions of daily maximum temperature at Khorramabad, with XGBoost showing a consistent, though modest, advantage across all evaluation criteria owing to its sequential error-correction mechanism. The dominance of lagged temperature variables underscores the role of thermal persistence in the regional climate system and supports the inclusion of autoregressive features in operational forecasting models. Given their high accuracy, computational efficiency, interpretability, and lower hyperparameter-tuning requirements relative to deep-learning architectures such as LSTM, these ensemble algorithms are well suited for operational heat-wave early-warning systems in Lorestan Province and other climatically similar regions of the Central Zagros. Future work should incorporate atmospheric reanalysis data, teleconnection indices, remote-sensing products, and hybrid machine learning–deep learning architectures to extend forecast horizons beyond a single day and improve the representation of extreme events.
Keywords: Machine learning; Random Forest; XGBoost; Maximum temperature; Heat wave; Khorramabad
کلیدواژهها English