Machine Learning Algorithm for Optimal Yield Prediction of Cowpea (An IoT Smart Farming Approach)
Keywords:
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.
Published
How to Cite
Issue
Section
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.