Machine Learning Approaches to Rainfall Forecasting in Nigeria: A Comparative Study of RF, SVR, XGBoost, and DNN Models
Main Article Content
Abstract
Rainfall prediction is critical for agricultural planning, water resource management, and disaster preparedness, particularly in regions vulnerable to climate variability. Traditional forecasting techniques often struggle to capture the non‑linear and complex dynamics of meteorological data. This study developed machine learning models to improve rainfall prediction using historical data obtained from the Nigerian Meteorological Agency, which includes climatic variables such as temperature, wind speed, humidity, and prior rainfall. After preprocessing and normalization, the dataset was divided into training (80%) and testing (20%) subsets. Four algorithms, such as Support Vector Regression (SVR), Extreme Gradient Boosting (XGBoost), Random Forest (RF), and Deep Neural Network (DNN), were implemented and evaluated using regression metrics such as R², Mean Squared Error, and Mean Absolute Error. The results show that RF and XGBoost achieved moderate accuracy, with R² values below 0.87. SVR performed better, reducing error significantly (MAE = 0.6839, MSE = 13.8717, R² = 0.893). The DNN model outperformed all others, achieving very low error (MAE = 0.2334, MSE = 0.1956) and near‑perfect accuracy (R² = 0.9985). These findings demonstrate the superior capacity of deep learning approaches to model complex rainfall patterns compared to traditional ensemble and regression methods, while SVR remains a reliable alternative. The study recommends that stakeholders in meteorology and agriculture adopt advanced machine learning models for improved decision‑making. Future research should incorporate high‑resolution satellite data and ground station records for hybrid modeling and employ techniques such as SHAP and LIME.
