Machine Learning Algorithm for Optimal Yield Prediction of Cowpea (An IoT Smart Farming Approach)
DOI:
https://doi.org/10.70882/josrar.2025.v2i2.73Keywords:
Cowpea yield, Crop yield prediction, Machine LearningAbstract
Cowpea (Vigna unguiculata) is a vital legume crop valued for its nutritional benefits and role in enhancing soil fertility; however, traditional farming practices often result in inconsistent yields due to environmental stresses and inefficiencies. This study explores how integrating Internet of Things (IoT), smart farming, and machine learning (ML) can optimize cowpea yield prediction and promote sustainable agriculture. The research focuses on implementing IoT-enabled smart farming systems with ML algorithms specifically Random Forest and AdaBoost to improve yield forecasting. IoT sensors were deployed to collect real-time data on critical parameters such as soil moisture, temperature, and nutrient levels, which were then used to train the predictive models. Performance evaluation using MAE, MSE, RMSE, and R² metrics revealed that Random Forest achieved perfect predictive accuracy (MAE, MSE, RMSE = 0.00; R² = 1.00), indicating strong generalization capability, while AdaBoost performed slightly less accurately (MAE = 0.05; MSE = 0.01; RMSE = 0.09; R² = 0.75), suggesting high accuracy but potential overfitting. The findings underscore the importance of soil nutrients and environmental variables in yield prediction and demonstrate that integrating IoT, smart farming, and ML particularly Random Forest holds great promise for advancing precision agriculture, increasing productivity, and fostering sustainable farming practices.
References
Cao, Y., Miao, Q., Liu, J., & Gao, L. (2013). Advance and prospects of AdaBoost algorithm. Acta Automatica Sinica, 39, 745-758. https://consensus.app/papers/advance-and-prospects-of-adaboost-algorithm/7a978497301a5d51821174ffb11ffd3c/?utm_source=chatgpt
Charlin, L. (2004). AdaBoost and learning algorithms: An introduction. https://consensus.app/papers/adaboost-and-learning-algorithms-an-introduction-charlin/c895b5e4c8895cbd891176162f1d5ff2/?utm_source=chatgpt
Chandraprabha, & Dhanaraj. (2023). Rice crop yield forecasting using AdaBoost and CNN with Horse Herd Optimization Algorithm. International Journal of Agricultural Data Science.
Iliyasu U., Obunadike G.N., & Jiya E. A. (2023) Rainfall Prediction Models for Katsina State, Nigeria: Machine Learning Approach. International Journal of Science for Global Sustainability, 9 (2), 151 – 157. DOI: https://doi.org/10.57233/ijsgs.v9i2.473
Jiya, E. A., Illiyasu, U., & Akinyemi, M. (2023). Rice Yield Forecasting: A Comparative Analysis of Multiple Machine Learning Algorithms. Journal of Information Systems and Informatics, 5(2), 785-799.
Koduri, et al. (2019). Predictive modeling for crop production using AdaBoost regression. Journal of Agricultural Informatics, 10(2), 45-58.
Mahesh, & Soundrapandiyan. (2024). CatBoost: A high-precision approach for agricultural yield prediction. Machine Learning in Agriculture, 12(1), 89-103.
Olanrewaju, O. M., Jiya, E. A., & Echobu, F. O. (2024). Intelligent Maize Yield Prediction Model Based on Plant Attributes and Machine Learning Algorithms. International Journal of Research and Scientific Innovation, 11(7), 1097-1104.
Pande, R. (2020). Performance evaluation of Random Forest in yield prediction. International Journal of Data Science and Agriculture, 8(3), 120-134.
Renju, & Brunda. (2024). Stacking ensemble learning for crop yield prediction. Journal of AI in Agriculture, 15(1), 50-65.
Shawon, et al. (2023). A comparative study of deep learning models for precision agriculture. Computational Agriculture Journal, 14(2), 98-110.
Shuaibu, et al. (2024). Application of Decision Tree Regressor in Nigerian agriculture. African Journal of Agricultural Analytics, 6(2), 75-89.
Mishra, U., Raj, R., & Shukla, D. (2024). Soil Moisture Measurement Using Sensor Based on Cloud IoT. 2024 International Conference on Computing, Sciences and Communications (ICCSC), 1-5. https://doi.org/10.1109/ICCSC62048.2024.10830358.
Alsayaydeh, J., Yusof, M., Magenthiran, M., Hamzah, R., Mustaffa, I., & Herawan, S. (2024). Empowering crop cultivation: harnessing internet of things for smart agriculture monitoring. International Journal of Electrical and Computer Engineering (IJECE). https://doi.org/10.11591/ijece.v14i5.pp6023-6035.
Reshma, R., Sathiyavathi, V., Sindhu, T., Selvakumar, K., & Sairamesh, L. (2020). IoT based Classification Techniques for Soil Content Analysis and Crop Yield Prediction. 2020 Fourth International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), 156-160. https://doi.org/10.1109/I-SMAC49090.2020.9243600.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Terfa Benjamin Yecho, Oyenike M. Olanrewaju, Faith O. Echobu (Author)

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- NonCommercial — You may not use the material for commercial purposes.
- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.