Application of Machine Learning for Crop Prediction Using Soil and Weather Data
摘要
The agriculture industry has been the foundation of most economies for many years. However, the quality of crops grown, harvested, and sold on the market is greatly influenced by several variables, including the weather (precipitation, temperature, humidity), the composition of the soil nutrients (N, P, K), and other environmental factors (pH, site location). Therefore, creating a system that can offer precise suggestions on the best crops to grow is crucial. Joint plots have been plotted to understand the relationship of different crops with respect to two variables. Also in this paper, it has been made to create a crop prediction/recommendation system that uses machine learning (ML) algorithms to analyse the weather and soil content data to select the appropriate crops based on site conditions and assess crop quality for different plant species. In this study, weather data alongside the environmental data has also been used for ML. The dataset has been collected from the Indian Chamber of Food and Agriculture (ICFA). Data has been cleansed and pre-processed to eliminate the inconsistencies. Four ML algorithms, namely KNN classifier, Random Forest classification, Decision tree and Extreme gradient boosting have been trained and tested for the data in different ratios like 70:30 or 80:20. The results were validated with local site crop data. It was established that the extreme gradient boosting gave the highest accuracy of 99% followed by the decision tree at 98.7% accuracy. The suggested system enables the farmers to precisely identify the crops without concern about the upcoming weather and compatible soils.