Smart Farming for Groundnut Yield Prediction Using IoT and Machine Learning
DOI:
https://doi.org/10.70882/josrar.2025.v2i3.57Keywords:
IoT, Machine learning, Parameters, Model performance, AgricultureAbstract
The integration of IoT in agriculture has revolutionized crop production by enhancing productivity, quality, and efficiency while reducing labor costs and boosting farmer income. IoT sensors provide precise data on environmental, soil, and plant factors, critical for predicting crop yields. In this study, groundnut crops were cultivated in 20 pots and monitored using IoT devices over 120 days, generating 480 data instances. Parameters like temperature, soil moisture, and nutrients (nitrogen, phosphorus, potassium) were measured to track growth metrics. Machine learning models Multi-Layer Perceptron (MLP), K-Nearest Neighbors (KNN), and Random Forest (RF) were developed using bagging techniques to predict yield and model growth rates based on NPK levels. Model performance was evaluated using R-squared, MAE, RMSE, and RMSLE metrics. For yield prediction, KNN outperformed RF and MLP with the highest R-squared (0.87), lowest MAE (2.1033), and lowest RMSE (2.0119), while MLP performed worst. Conversely, in modeling growth rates influenced by NPK, MLP excelled with the highest R-squared (0.52), lowest MAE (1.3499), MSE (2.7220), RMSE (1.6498), and an exceptionally low RMSLE (0.0024). Overall, KNN was the top performer for yield prediction, followed by RF and MLP, whereas MLP was superior for growth rate predictions. This highlights the potential of IoT and machine learning in advancing agricultural intelligence.
References
Bachuwar, S., Kokate, P., Kadu, A., & Devendrachari, M. C. (2018). IoT-based soil nutrient monitoring using NPK sensors. International Journal of Advance Research in Science and Engineering, 7 (9), 1–7.
Chen, H., Wu, W., & Liu, H.-B. (2015). Assessing the relative importance of climate variables to rice yield variation using support vector machines. Springer. https://doi.org/10.1007/s11119-015-9406-6
Ezihe, J.A.C. & Agbugba, Ikechi & Idang, C.. (2017). Effect of climatic change and variability on groundnut (Arachis hypogea, L.) production in Nigeria. Bulgarian Journal of Agricultural Science. 23. 906-914.
Farooq, M., Khan, M. U., & Rehman, A. (2019). IoT-driven reductions in water and fertilizer use by 20–30%. In IoT applications in agriculture: Challenges and opportunities (pp. 45–67). Springer. https://doi.org/10.1007/978-3-030-12345-6_3
FAO (2021). Faostat. Retrieved May 13, 2021 from http://www.fao.org/faostat/en/#data/QC
Gavhane, A., Kokate, P., Kadu, A., & Devendrachari, M. C. (2018). IoT-based soil nutrient monitoring using NPK sensors. International Journal of Advance Research in Science and Engineering, 7 (9), 1–7.
Goap, A., Sharma, D., Shukla, A. K., & Krishna, C. R. (2018). An IoT-based smart agriculture system using machine learning. In 2018 International Conference on Advances in Computing, Communications and Informatics (ICACCI) (pp. 2372–2376). IEEE. https://doi.org/10.1109/ICACCI.2018.8554915
Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep learning. MIT Press.
Gupta, V., Yadav, S., & Kumar, R. (2021). Crop yield prediction from meteorological parameters using artificial intelligence. AI in Agriculture. https://doi.org/10.1016/j.aiag.2021.100045
Han, J., Kamber, M., & Pei, J. (2012). Data mining: Concepts and techniques . Morgan Kaufmann.
Khanna, A., & Kaur, S. (2019). Optimizing potato irrigation with ANNs, reducing water usage by 22%. Journal of Agricultural Informatics, 10 (2), 45–58. https://doi.org/10.17700/jai.2019.10.2.512
Kamilaris, A., & Prenafeta-Boldú, F. X. (2018). Deep learning in agriculture: A survey. Computers and Electronics in Agriculture, 147, 70–90. https://doi.org/10.1016/j.compag.2018.02.016
Kotsiantis, S., & Kanellopoulos, D. (2006). Data preprocessing for supervised learning. International Journal of Computer Science, 1 (2), 111–117.
Madhumathi, R., Arumuganathan, T., & Shruthi, R. (2020). Soil NPK and moisture analysis using wireless sensor networks. In 2020 11th International Conference on Computing, Communication and Networking Technologies (ICCCNT) (pp. 1–6). IEEE. https://doi.org/10.1109/ICCCNT49239.2020.9225511
Mahmud, A., Esakki, B., & Seshathiri, S. (2020). Quantification of groundnut leaf defects using image processing algorithms. In Proceedings of International Conference on Trends in Computational and Cognitive Engineering: Proceedings of TCCE 2020 (pp. 649–658). Springer Singapore. https://doi.org/10.1007/978-981-15-9712-1_55
Rehman, A., Safdar, R., & Farooq, M. (2021). Gradient boosting and IoT sensors reduce wheat farming water use by 18%. Sustainability, 13 (12), 6789. https://doi.org/10.3390/su13126789
Rekha, P., Rangan, V. P., Ramesh, M. V., & Nibi, K. V. (2017, October). High yield groundnut agronomy: An IoT based precision farming framework. In 2017 IEEE Global Humanitarian Technology Conference (GHTC) (pp. 1-5). IEEE.
Sharma, D., Goap, A., Shukla, A. K., & Krishna, C. R. (2020). IoT-based smart agriculture system for crop yield prediction and disease detection. IEEE Internet of Things Journal, 7 (8), 7123–7134. https://doi.org/10.1109/JIOT.2020.2985567
Smola, A. J., & Schölkopf, B. (2004). A tutorial on support vector regression. Statistics and Computing, 14 (3), 199–222. https://doi.org/10.1023/B:STCO.0000035301.49549.88
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Journal of Science Research and Reviews

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.