Research Article Open Access

Crop Yield Prediction in Niger Using Machine Learning Techniques

Mahaman Lawali Inoussa Garba1, Naroua Harouna2, Chaibou Kadri2, Maman Aminou Ali3 and Hannatou Moussa4
  • 1 Department of Mathematics and Computer Science, Faculty of Science and Technology, Abdou Moumouni University (UAM), Niamey, Niger
  • 2 Department of Mathematics and Computer Science, Faculty of Science and Technology, Abdou Moumouni University (UAM), Niamey, Niger
  • 3 FUMA Gaskiya, Maradi, Niger
  • 4 National Agricultural Research Institute of Niger (INRAN), Maradi, Niger

Abstract

Agriculture is the most impactful sector on Niger's economic growth. Stresses related to climate change and the environment are leading to a continuous decline in crop yield. Accurate crop yield forecasting is of paramount importance for farmers, government, policy makers, and other stakeholders to make most appropriate decisions regarding resource allocation and food security. This study examines the power of Machine Learning (ML) algorithms for crop yield prediction in Niger by introducing a combined machine learning and multi-level stacking ensemble (CML MSE) model as a solution to improving the accuracy of crop forecasts using real farming data. Parameters such as agricultural, environmental and soil conditions are used to develop the CML- MSE approach to help farmers in making appropriate decisions for crop selection. The CML-MSE model consists of nine ML algorithms and three layers. The first layer uses K Nearest Neighbor (KNN), Decision Tree (DT), Random Forest (RF), XGBoost (XGboost), Lightgbm and Catboost algorithms as base learners; the second layer acts as a meta-learner and use Support Vector Machine (SVM), Neural Network (NN) and Linear Regression (LR); and the third layer which uses LR algorithm. The prediction performance is assessed by using the Mean Absolute Error (MAE), the Root Mean Square Error (RMSE) and the coefficient of determination (R2), allowing comparisons to be made with the prediction of its individual models. The results obtained show that the proposed CML-MSE model offers the best performance compared with other models, with an MAE of 177.14 kg/ha, an RMSE of 243.71 kg/ha and an R2of 65%. This work aims to provide Niger farmers with means to make appropriate decisions for improved food security.

Journal of Computer Science
Volume 21 No. 8, 2025, 1811-1818

DOI: https://doi.org/10.3844/jcssp.2025.1811.1818

Submitted On: 11 July 2024 Published On: 16 September 2025

How to Cite: Garba, M. L. I., Harouna, N., Kadri, C., Ali, M. A. & Moussa, H. (2025). Crop Yield Prediction in Niger Using Machine Learning Techniques. Journal of Computer Science, 21(8), 1811-1818. https://doi.org/10.3844/jcssp.2025.1811.1818

  • 357 Views
  • 37 Downloads
  • 0 Citations

Download

Keywords

  • Artificial Intelligence
  • Machine Learning
  • Stacking Ensemble
  • Prediction
  • Agriculture