JOURNAL ARTICLE

Precision Agriculture Crop Recommendation System Using IoT and Machine Learning

Abstract

To define the term "smart farming," this work has used real-time applications over sensors to capture changes in the soil's and the atmosphere's climate. The type of crop being grown is predicted based on weather patterns, soil moisture, nitrogen, phosphorus, potassium, and ph levels, as well as making sure that the farmers are growing the right crops to ensure optimal yield and profits. In this paper, An hardware system using Nodemcu is developed to measure the vitals and is monitored on Thinkspeak and as a result of combining Random Forest, K-Nearest Neighbor, and Logistic Regression, we developed a model that uses many variables to forecast the sort of crop being grown like element levels (Nitrogen, Phosphorus, and Potassium), PH levels, temperature, humidity, and land type, and deployed the best model to a web app using streamlit for real-time usage, the measured vitals from the thinkspeak are manually inputted on the web app and the suitable crop is predicted thus ensuring that the farmer is cultivating the correct crops for maximum profits and the best yield possible. With a validation accuracy of 99.5%, an F1 score of 1.00, and the ability to forecast values that are closer to the real values than other models based on the findings, after comparing the three models the Random Forest ensemble reached the best level.

Keywords:
Random forest Computer science Agricultural engineering Agriculture sort Yield (engineering) Work (physics) Machine learning Crop Crop yield Environmental science Database Artificial intelligence Agronomy Engineering Ecology

Metrics

8
Cited By
2.11
FWCI (Field Weighted Citation Impact)
17
Refs
0.92
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Smart Agriculture and AI
Life Sciences →  Agricultural and Biological Sciences →  Plant Science
Food Supply Chain Traceability
Life Sciences →  Agricultural and Biological Sciences →  Food Science
Water Quality Monitoring Technologies
Physical Sciences →  Environmental Science →  Water Science and Technology
© 2026 ScienceGate Book Chapters — All rights reserved.