Leveraging Machine Learning for Predicting Climate Change Impacts on Agricultural Productivity in Bayelsa State, Nigeria: A Pathway to Sustainable Solutions
Keywords:
Machine learning, XGBoost, Climate change, Random Forest, Agricultural productivityAbstract
insecurity. Limited access to localized climate data further complicates agricultural decision-making. This study applies machine learning to predict climate change effects on agricultural productivity, offering strategies for resilience and sustainable farming. Historical climate and agricultural data from sources like the Nigerian Meteorological Agency (NiMET) were analyzed. A stacking ensemble machine learning model was developed to predict crop yields, using a Random Forest Regressor and XGBoost Regressor as base models, with a Linear Regressor as the meta-learner. The model was optimized using 5-fold cross-validation to enhance predictive accuracy. Model validation using Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE) demonstrated high accuracy, with an RMSE of 9,861.6786, an R² of 0.9866, and an MAE of 3,716.7995 hg/ha. These results indicate minimal deviation from actual crop yields, demonstrating a significant improvement over earlier models and confirming its reliability in predicting agricultural productivity. Findings highlight the potential of machine learning for informed decision-making among policymakers, farmers, and stakeholders. By leveraging AI-driven solutions, this study promotes agricultural resilience, sustainable development, and long term food security in Bayelsa State.