Heliyon (Feb 2024)
Machine learning based recommendation of agricultural and horticultural crop farming in India under the regime of NPK, soil pH and three climatic variables
Abstract
Machine learning (ML) can make use of agricultural data related to crop yield under varying soil nutrient levels, and climatic fluctuations to suggest appropriate crops or supplementary nutrients to achieve the highest possible production. The aim of this study was to evaluate the efficacy of five distinct ML models for a dataset sourced from the Kaggle repository to generate practical recommendations for crop selection or determination of required nutrient(s) in a given site. The datasets contain information on NPK, soil pH, and three climatic variables: temperature, rainfall, and humidity. The models namely Support vector machine, XGBoost, Random forest, KNN, and Decision Tree were trained using yields of individual data sets of 11 agricultural and 10 horticultural crops, as well as combined yield of both agri-horticultural crops. The results strongly suggest to evaluate individual data sets separately for each crop category rather than using combined the data sets of both categories for better predictions. Comparing the five ML models, the XGBoost demonstrated the highest level of accuracy. The precision rates of XGBoost for recommending agricultural crops, horticultural crops, and a combination of both were 99.09 % (AUC 1.0), 99.3 % (AUC 1.0), and 98.51 % (AUC 0.99), respectively. This non-intrusive method for generating crop recommendations in diverse environmental conditions holds the potential to provide valuable insights for the development of a user-friendly AI cloud-based interface. Such an interface would enable rapid decision-making for optimal fertilizer applications and the selection of suitable crops for cultivation at specific sites.