پژوهش های اقلیم شناسی

پژوهش های اقلیم شناسی

پیش‌بینی دمای حداکثر با استفاده از الگوریتم‌های Random Forest و XGBoost و کاربرد آن در هشدار موج گرما در استان لرستان

نوع مقاله : مقاله پژوهشی

نویسندگان
1 1- * استادیار پژوهشی، بخش تحقیقات حفاظت خاک و آبخیزداری، مرکز تحقیقات و آموزش کشاورزی و منابع طبیعی استان کرمانشاه، سازمان تحقیقات،
2 دانشیار پژوهشی گروه خشکسالی و تغییر اقلیم، پژوهشکده حفاظت خاک و آبخیزداری، سازمان تحقیقات، آموزش و ترویج کشاورزی، ایران
3 دانشیار پژوهشی بخش تحقیقات حفاظت خاک و آبخیزداری، مرکز تحقیقات و آموزش کشاورزی و منابع طبیعی استان لرستان، ایران
10.22034/jcr.2026.589879.1749
چکیده
موج‌های گرما به‌عنوان یکی از شدیدترین رویدادهای آب‌وهوایی، تهدیدی جدی برای اکوسیستم‌های کوهستانی، کشاورزی و سلامت عمومی در استان لرستان محسوب می‌شوند. این مطالعه با هدف پیش‌بینی دمای حداکثر روزانه ایستگاه سینوپتیک خرم‌آباد در دوره 1951 تا 2025 (27030 روز) با استفاده از دو الگوریتم یادگیری ماشین شامل جنگل تصادفی (Random Forest) و تقویت گرادیانی مبتنی بر درخت (XGBoost) طراحی شده است. متغیرهای ورودی مدل شامل دمای حداقل (Tmin)، سرعت باد (ffm)، رطوبت نسبی (um) و فشار ایستگاه (pm) به همراه متغیرهای تأخیری دمای حداکثر لگ 1 تا 3 و ویژگی‏های زمانی (ماه و روز سال) بود. مجموعه داده با نسبت 80 به 20 برای آموزش (2011-1954) و آزمون (2025-2012) تقسیم شد. نتایج ارزیابی عملکرد نشان داد که هر دو مدل دقت بسیار بالایی دارند؛ به‌طوری‌که XGBoost با R² برابر با 9753/0، EMSE برابر با 727/1 درجه سانتی‏گراد و NSE برابر 9753/0 عملکرد اندکی بهتر از Random Forest با R² برابر با 9740/0، RMSE برابر 769/1 درجه سانتی‏گراد و NSE برابر 9740/0 داشت.

در اعتبارسنجی متقاطع 5 تایی، میانگین R² برای Random Forest برابر 9688/0 و برای XGBoost برابر 9705/0 بود. تحلیل اهمیت ویژگی‌ها نشان داد که دمای حداکثر روز قبل (Tmax t-1) با اهمیت بیش از 60/0 در Random Forest و 52/0 در XGBoost، مهم‌ترین پیش‌بینی‌کننده است. از منظر هشدار موج گرما (آستانه 35 درجه سانتیگراد) مدل XGBoost با 1535 روز در مقابل 1574 روز مشاهده شده، دقت قابل قبولی در شناسایی رویدادهای گرمایی نشان داد.
کلیدواژه‌ها

عنوان مقاله English

Prediction of Maximum Temperature Using Random Forest and XGBoost Algorithms and Its Application in Heat Wave Warning in Lorestan Province

نویسندگان English

Golale Ghafari 1
Mehran Zand 2
Reza Chamanpira 3
1 ¹* Assistant Professor, Soil Conservation and Watershed Management Research Department, Kermanshah Agricultural and Natural Resources Research and Education Center, AREEO, Kermanshah, Iran. g.ghaffari@areeo.ac.ir
2 Associate Professor, Drought and Climate Change Research Group, Soil Conservation and Watershed Management Research Institute, Agricultural Research, Education and Extension Organization (AREEO)
3 Associate Professor, Soil Conservation and Watershed Management Research Department, Lorestan Agricultural and Natural Resources Research and Education Center, Iran
چکیده 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

Machine learning
Random Forest
XGBoost
Maximum temperature

مقالات آماده انتشار، پذیرفته شده
انتشار آنلاین از 09 آذر 1405