Comparative Machine Learning Framework for Rainfall Forecasting and Agricultural Loss Estimation
Hasan Ahamed Alif, Md. Jisan Mashrafi, Muhammad Jasim Uddin, Javed Ahmed, Fahim Faiyaz, Sebagat Selim
Abstract
Because of the growing unpredictability of the weather, which can affect food security and productivity, the consequences of climate change are no longer speculative; every farmer in South Asia is starting to suffer the ramifications in their fields. In the two most susceptible districts of Bangladesh, Rajshahi and Ishwardi, the comparative machine learning method presented in this study aims to predict rainfall and identify regions at risk of agricultural impacts due to climate change. We examine the performance of four models: the Prophet model, ARIMA, Random Forest, and XGBoost, using 48 years of historical rainfall data (1976–2024). With an R-squared value of 0.89, Random Forest displayed the best accuracy, exceeding both standard time series and boosting-based approaches while efficiently capturing non-seasonal trends. On the other hand, XGBoost performed poorly, possibly due to the difficulty in fitting noisy, small-scale meteorological data. To classify years as droughts or floods, we apply a conventional anomaly detection technique that utilizes z-scores (1.5 standard deviations) in conjunction with predictive modeling. It is feasible to identify problematic years and regions by using these characteristics, which are linked to historical periods of agricultural displacement. The findings are more accessible and helpful when simplified visual maps of climate-induced risk validate the relationship between the projected anomalies and previous crop failures. The suggested method would provide a scientifically informed tool for climate resilience planning, agricultural planning, and early warning systems. The objective of preserving vulnerable livelihoods during a climate transition is achieved by integrating the three aspects of this architecture, namely translating the long-term records of the meteorological system into risk information that agronomists, policymakers, and humanitarian actors can utilize.