Comparative Evaluation of Machine Learning Models for Predicting Crop Yields Across Sixteen Crops in Nigeria

Authors

  • Terna Ieren Rev. Fr. Moses Orshio Adasu University Makurdi
  • Chima Oleforo

DOI:

https://doi.org/10.33003/fjs-2026-1021-6242

Keywords:

Crop yield prediction, Machine learning, Ensemble learning, Predictive performance, Nigeria

Abstract

Accurate crop yield prediction supports agricultural planning, food security and the scheduling of harvest-related resources. This study compared machine learning models for predicting the yields of sixteen major crops in Nigeria, using secondary agricultural and climatic data for 2015–2019 from the Agricultural Performance Survey of Nigeria (National Agricultural Extension and Research Liaison Services and Federal Department of Agricultural Extension) and the Nigerian Meteorological Agency. After preprocessing and the removal of 25 extreme yield observations, 1,962 crop–state–year records were analysed. Five approaches were evaluated: Random Forest; XGBoost; CatBoost; Ridge Regression; and a stacked ensemble combining the three tree-based models with a Ridge Regression meta-learner. XGBoost and CatBoost were run with their original libraries. Performance was assessed with crop-specific five-fold cross-validation, repeated three times, using R², RMSE, MSE and MAE. Under the random, record-level With-State design, in which state was an input and almost all test states also appeared in the training data, CatBoost achieved the highest mean R² (0.357; RMSE = 1.031 t/ha; MAE = 0.754 t/ha), followed by XGBoost (0.331) and Random Forest (0.315); its advantage over Random Forest (0.042; 95% CI 0.018 to 0.067) and XGBoost (0.026; 95% CI 0.003 to 0.049) was small relative to differences among crops. Crop-level R² was highest for yam (0.720), soybean (0.549), onion (0.542) and tomato (0.524) and low for groundnut, ginger, benniseed and okra. The stacked ensemble (mean R² = 0.281) did not outperform the strongest individual models and was below the best individual model in 14 of 16 crops

References

Agarwal, S., & Tarar, S. (2021). A hybrid approach for crop yield prediction using machine learning and deep learning algorithms. Journal of Physics: Conference Series, 1714, 012012. https://doi.org/10.1088/1742-6596/1714/1/012012.

Ahmed, A., Adewumi, S. E., & Yemi-Peters, V. (2023). Crop yield prediction in Nigeria using machine learning techniques: A case study of southern part of Nigeria. UMYU Scientifica, 2(4), 31–38. https://doi.org/10.56919/usci.2324.004.

Araya, A., et al. (2022). Evaluating crop management options for sorghum, pearl millet and peanut to minimize risk under the projected midcentury climate scenario. Climate Risk Management, 36, 100436. https://doi.org/10.1016/j.crm.2022.100436.

Asamoah, O. Z. (2022). AI-driven crop yield prediction models for smallholder farmers in Sub-Saharan Africa. Iconic Research and Engineering Journals, 5(9).

Benos, L., Tagarakis, A. C., Dolias, G., Berruto, R., Kateris, D., & Bochtis, D. (2021). Machine learning in agriculture: A comprehensive updated review. Sensors, 21, 3758. https://doi.org/10.3390/s21113758.

Breiman, L. (2001). Random forests. Machine Learning, 45(1), 5–32. https://doi.org/10.1023/A:1010933404324.

Cedric, L. S., et al. (2022). Crops yield prediction based on machine learning models: Case of West African countries. Smart Agricultural Technology, 2, 100049.

Doki, N. O., Eya, C. I., Tuughgba, M. F., Akahi, O. G., & Ameh, A. (2019). Determinants of post-harvest losses of orange in selected local government areas of Benue State. International Journal of New Economics and Social Sciences, 2(10), 295–308.

Friedman, J. H. (2001). Greedy function approximation: A gradient boosting machine. Annals of Statistics, 29(5), 1189–1232. https://doi.org/10.1214/aos/1013203451.

Islam, M. M., Alharthi, M., Alkadi, R. S., Islam, R., & Masum, A. K. M. (2024). Crop yield prediction through machine learning: A path towards sustainable agriculture and climate resilience in Saudi Arabia. AIMS Agriculture and Food, 9(4), 980–1003. https://doi.org/10.3934/agrfood.2024053.

Kuradusenge, M., et al. (2023). Crop yield prediction using machine learning models: Case of Irish potato and maize. Agriculture, 13, 225. https://doi.org/10.3390/agriculture13010225.

Morales, A., & Villalobos, F. J. (2023). Using machine learning for crop yield prediction in the past or the future. Frontiers in Plant Science, 14, 1128388. https://doi.org/10.3389/fpls.2023.1128388.

Nagesh, O. S., et al. (2024). Boosting enabled efficient machine learning technique for accurate prediction of crop yield towards precision agriculture. Discover Sustainability, 5, 78. https://doi.org/10.1007/s43621-024-00254-x.

Nandikolla, S., et al. (2025). Survey on crop yield prediction using machine learning algorithm. Advances in Consumer Research, 2(2), 805–812.

Nath, B., Chen, G., O’Sullivan, C. M., & Zare, D. (2024). Research and technologies to reduce grain postharvest losses: A review. Foods, 13, 1875. https://doi.org/10.3390/foods13121875.

Ogundele, F. (2022). Post harvest losses and food security in Nigeria: An empirical review. African Journal of Agriculture and Food Science, 5(3), 77–89.

Patil, P., Athavale, P., Bothara, M., Tambolkar, S., & More, A. (2023). Crop selection and yield prediction using machine learning approach. 11(3).

Ramesh, V., & Kumaresan, P. (2025). Stacked ensemble model for accurate crop yield prediction using machine learning techniques. Environmental Research Communications, 7, 035006.

Sharma, S., et al. (2024). Comparative analysis on crop yield forecasting using machine learning techniques. Rural Sustainability Research, 52(347), 63–77. https://doi.org/10.2478/plua-2024-0015.

Shuaibu, N., Obunadike, G. N., & Jamilu, B. A. (2024). Crop yield prediction using selected machine learning algorithms. FUDMA Journal of Sciences, 8(1), 61–68. https://doi.org/10.33003/fjs-2024-0801-2220.

Vhatkar, K. N., et al. (2025). Enhancing prediction of crop yield and soil health assessment for sustainable agriculture using machine learning approach. MethodsX, 14, 103418.

Wolpert, D. H. (1992). Stacked generalization. Neural Networks, 5(2), 241–259.

Yecho, T. B., Olanrewaju, O. M., & Echobu, F. O. (2025). Machine learning algorithm for optimal yield prediction of cowpea: An IoT smart farming approach. Journal of Science Research and Reviews, 2(2), 131–139. https://doi.org/10.70882/josrar.2025.v2i2.73.

Yagyanath, R., & Sharma, N. (2023). Ensemble machine learning model improves prediction accuracy for academic performance: A comparative study. ICIMMI 2023. https://doi.org/10.1145/3647444.3652473.

Zhou, Z.-H. (2012). Ensemble methods: Foundations and algorithms. CRC Press.

Workflow for Crop-yield Prediction and Model Comparison. RF = Random Forest; XGBoost = extreme Gradient Boosting; CatBoost = Categorical Boosting

Downloads

Published

09-11-2026

How to Cite

Ieren, T., & Oleforo, C. (2026). Comparative Evaluation of Machine Learning Models for Predicting Crop Yields Across Sixteen Crops in Nigeria. FUDMA Journal of Sciences, 10(21), 364-372. https://doi.org/10.33003/fjs-2026-1021-6242