Volume 9 • Issue 2 • PP: 24–30 • 2025
Interpretable Rainfall Forecasting Using SHAP-Enhanced Machine Learning: A Case Study on U.S. Urban Climate Data (2024–2025)
Open Access & Copyright
© 2025 The Author(s). Published by ASPG. This article is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
Editorial responsibility:
This article was handled by an independent editor. The author serving on the Editorial Board had no involvement in the peer-review process or the final editorial decision.
Abstract
Accurate rainfall prediction supports resilient communities, sustainable agriculture, water distribution, and disaster preparedness. Because rainfall depends nonlinearly on interacting meteorological conditions, conventional forecast-ing methods can be inadequate for short-term, localized events. This study develops a machine-learning framework for next-day rainfall classification using daily weather observations from 20 major U.S. cities during 2024–2025. The dataset includes temperature, relative humidity, wind speed, precipitation, cloud cover, and pressure, together with a binary Rain Tomorrow label. Six classifiers are evaluated: Random Forest, Support Vector Machine (RBF kernel), k-Nearest Neighbors, Logistic Regression, Naive Bayes, and Linear SVM. SHapley Additive exPlanations (SHAP) are used to interpret model predictions and feature contributions. Random Forest reports the strongest results, with precision, recall, and F1-score of 1.00; RBF SVM and KNN achieve F1-scores of 0.97 and 0.94, respectively. Logistic Regression, Linear SVM, and Naive Bayes achieve F1-scores between 0.76 and 0.77. SHAP analysis identifies precipitation and humidity as the most influential variables, consistent with meteorological expectations. These results suggest that combining an ensemble classifier with interpretable explanations can support transparent rainfall forecasting for agriculture, urban planning, and emergency response.
Keywords
References
[1] K. Wudu, A. Abegaz, L. Ayele, and M. Ybabe, “The impacts of climate change on biodiversity loss and its remedial measures using nature based conservation ap-proach: A global perspective,” Biodiversity and Conser-vation, vol. 32, no. 12, pp. 3681–3701, 2023.
[2] L. Hirons, C. M. Wainwright, P. Nying’uro, D. Quaye,
J. Ashong, C. Kiptum, N. K. Opoku, E. M. Thompson, and B. Lamptey, “Experiences of co-producing sub-seasonal forecast products for agricultural application in Kenya and Ghana,” Weather, vol. 78, no. 5, pp. 148–153, 2023.
[3] F. Piadeh, K. Behzadian, and A. M. Alani, “A critical review of real-time modelling of flood forecasting in urban drainage systems,” Journal of Hydrology, vol. 607, p. 127476, 2022.
[4] M. Kotz, A. Levermann, and L. Wenz, “The effect of rainfall changes on economic production,” Nature, vol. 601, no. 7892, pp. 223–227, 2022.
[5] M. A. Mohamed, G. S. El Afandi, and M. El-Mahdy, “Impact of climate change on rainfall variability in the blue nile basin,” Alexandria Engineering Journal, vol. 61, no. 4, pp. 3265–3275, 2022.
[6] D. Bari, T. Bergot, and R. Tardif, “Fog decision support systems: A review of the current perspectives,” Atmo-sphere, vol. 14, no. 8, p. 1314, 2023.
[7] P. H. Hrudya, H. Varikoden, and R. Vishnu, “A review on the indian summer monsoon rainfall, variability and its association with enso and iod,” Meteorology and Atmospheric Physics, vol. 133, pp. 1–14, 2021.
[8] A. Perez Bello, A. Mailhot, D. Paquin, and D. Paquin-Ricard, “Temperature-precipitation scaling rates: A rainfall event-based perspective,” Journal of Geophys-ical Research: Atmospheres, vol. 127, no. 22, p. e2022JD037873, 2022.
[9] C. O. de Burgh-Day and T. Leeuwenburg, “Machine learning for numerical weather and climate modelling: A review,” Geoscientific Model Development, vol. 16, no. 22, pp. 6433–6477, 2023.
[10] A. Yadav and F. Khan, “Machine learning techniques in rainfall forecasting,” Applied Soft Computing, 2023.
[11] Y. O. Ouma, R. Cheruyot, and A. N. Wachera, “Rainfall and runoff time-series trend analysis using lstm recur-rent neural network and wavelet neural network with satellite-based meteorological data: Case study of nzoia hydrologic basin,” Complex & Intelligent Systems, pp. 1–24, 2021.
[12] E. C. L. de Oliveira, A. V. Nogueira Neto, A. P. Paes dos Santos, C. P. W. da Costa, J. C. G. de Freitas, P. W. M. Souza-Filho, R. de Lima Rocha, R. C. Alves, V. dos Santos Franco, E. C. de Carvalho, and R. G. Tedeschi, “Precipitation forecasting: From geophysical aspects to machine learning applications,” Frontiers in Climate, vol. 5, p. 1250201, 2023.
[13] C. M. Liyew and H. A. Melese, “Machine learning techniques to predict daily rainfall amount,” Journal of Big Data, vol. 8, pp. 1–11, 2021.
[14] A. Y. Barrera-Animas, L. O. Oyedele, M. Bilal, T. D. Akinosho, J. M. Davila Delgado, and L. A. Akanbi, “Rainfall prediction: A comparative analysis of modern machine learning algorithms for time-series forecasting,” Machine Learning with Applications, vol. 7, p. 100204, 2022.
[15] O. S. Ojo and S. T. Ogunjo, “Machine learning models for prediction of rainfall over nigeria,” Scientific African, vol. 16, p. e01246, 2022.
[16] M. Baljon and S. K. Sharma, “Rainfall prediction rate in Saudi Arabia using improved machine learning tech-niques,” Water, vol. 15, no. 4, p. 826, 2023.
[17] M. Akhtar, A. S. A. Shatat, S. A. H. Ahamad, S. Dil-shad, and F. Samdani, “Optimized cascaded cnn for in-telligent rainfall prediction model: A research towards statistic-based machine learning,” Theoretical Issues in Ergonomics Science, vol. 24, no. 5, pp. 564–592, 2023.
[18] M. F. Allawi, U. H. Abdulhameed, A. Adham, K. N. Sayl, S. O. Sulaiman, M. M. Ramal, M. Sherif, and A. El-Shafie, “Monthly rainfall forecasting modelling based on advanced machine learning methods: Tropical region as case study,” Engineering Applications of Com-putational Fluid Mechanics, vol. 17, no. 1, p. 2243090, 2023.
[19] C. Chen, Q. Zhang, M. H. Kashani, C. Jun, S. M. Bateni, S. S. Band, S. S. Dash, and K.-W. Chau, “Forecast of rainfall distribution based on fixed sliding window long short-term memory,” Engineering Applications of Computational Fluid Mechanics, vol. 16, no. 1, pp. 248–261, 2022.
[20] G. Tuysuzoglu, K. U. Birant, and D. Birant, “Rainfall prediction using an ensemble machine learning model based on k-stars,” Sustainability, vol. 15, no. 7, p. 5889, 2023.
[21] H. Ahmadi, B. Aminnejad, and H. Sabatsany, “Applica-tion of machine learning ensemble models for rainfall prediction,” Acta Geophysica, vol. 71, no. 4, pp. 1775–1786, 2023.
[22] A. R. Satheesh, P. Knippertz, A. H. Fink, E.-M. Walz, and T. Gneiting, “Sources of predictability of synoptic-scale rainfall during the West African summer monsoon,” Quarterly Journal of the Royal Meteorological Society, vol. 149, no. 757, pp. 3721–3737, 2023.
[23] J. Gu, S. Liu, Z. Zhou, S. R. Chalov, and Q. Zhuang, “A stacking ensemble learning model for monthly rainfall prediction in the taihu basin, china,” Water, vol. 14, no. 3, p. 492, 2022.
[24] F. Alqahtani, M. Abotaleb, A. A. Subhi, E.-S. M. El-Kenawy, A. A. Abdelhamid, K. Alakkari, A. Badr, H. K. Al-Mahdawi, A. Ibrahim, and A. Kadi, “A hybrid deep learning model for rainfall in the wetlands of southern iraq,” Modeling Earth Systems and Environment, vol. 9, no. 4, pp. 4295–4312, 2023.
[25] S. Mohamadi, Z. Sheikh Khozani, M. Ehteram, A. N. Ahmed, and A. El-Shafie, “Rainfall prediction using multiple inclusive models and large climate indices,” Environmental Science and Pollution Research, vol. 29, no. 56, pp. 85 312–85 349, 2022.
[26] K. Johny, M. L. Pai et al., “A multivariate emd-lstm model aided with time dependent intrinsic cross-correlation for monthly rainfall prediction,” Applied Soft Computing, vol. 123, p. 108941, 2022.
[27] Y. Zhao, X. Meng, T. Qi, Y. Li, G. Chen, D. Yue, and F. Qing, “Ai-based rainfall prediction model for debris flows,” Engineering Geology, vol. 296, p. 106456, 2022.
[28] B. Roy, M. P. Singh, and A. Singh, “A novel approach for rainfall-runoff modelling using a biogeography-based optimization technique,” International Journal of River Basin Management, vol. 19, no. 1, pp. 67–80, 2021.
[29] W. Ali, “USA Rainfall Prediction Dataset (2024–2025),” Kaggle dataset, 2025.
[30] S. Alam and N. Yao, “The impact of preprocessing steps on the accuracy of machine learning algorithms in sentiment analysis,” Computational and Mathematical Organization Theory, vol. 25, no. 3, pp. 319–335, 2019.
Cite This Article
Choose your preferred format
Publisher's Note
The statements, opinions, and data presented in this article are solely those of the author(s) and do not necessarily represent those of ASPG, the journal, or its editors. ASPG and the editors disclaim responsibility for any harm arising from the use of any ideas, methods, instructions, or products described in this article, to the fullest extent permitted by applicable law.