Predicting Rainfall Variability and Cereal Crop Yields Using Climate Oscillation Indices and Machine Learning in Northwestern Nigeria
Northwestern Nigeria, a semi-arid Sahelian environment, is highly vulnerable to rainfall variability due to its strong dependence on rain-fed agriculture. This study evaluated the predictive capability of Artificial Neural Network (ANN) and Random Forest (RF) machine learning models in forecasting annual rainfall variability and aggregate cereal crop yields using some large-scale climate oscillation indices, specifically the El Niño-Southern Oscillation (ENSO), North Atlantic Oscillation (NAO), and the Atlantic Multi-decadal Oscillation (AMO). Historical data (2000-2024) were sourced from the National Aeronautics and Space Administration (NASA) Prediction of Worldwide Energy Resource (POWER) database for rainfall, the National Agricultural Extension and Research Liaison Services (NAERLS) for crop yields, and the National Oceanic and Atmospheric Administration (NOAA) for climate indices. Data preprocessing included temporal aggregation, normalisation, and quality control procedures before model development. The models were trained and validated using a chronological 80:20 data split, while predictive performance was evaluated using the coefficient of determination (R2), Mean Squared Error (MSE), and Mean Absolute Error (MAE). Results showed that the ANN model achieved slightly superior rainfall prediction performance (R² = 0.811; MAE = 101.82 mm), while the RF model produced higher predictive accuracy for aggregate cereal crop yields (R² = 0.893; MAE = 0.04375 T/Ha). The findings demonstrate the effectiveness of machine learning approaches in modelling complex climate-crop interactions across northwestern Nigeria. However, limitations associated with the relatively short temporal dataset and the exclusion of agronomic variables are acknowledged. The study highlights the potential application of machine learning models in climate-informed agricultural forecasting, early warning systems, and climate adaptation planning within vulnerable semi-arid regions.