Multi-Crop Recommendation Using XGBoost: A Machine Learning Approach for Sustainable Agriculture

Read full text
Authors: Guruprasath Sankaran
Cited by: 1

Abstract

The choice of crops depending upon soil and environmental conditions can help in improving agricultural production. The traditional method of crop selection is largely based on experience and does not adequately account for intricate relationships between soil nutrients, climate, and season. This study proposes a machine learning multi-crop recommendation system that provides the farmer with multiple choices of suitable crops instead of just one recommended crop. The framework utilizes the publicly available Crop Recommendation Dataset, which comprises 2,200 samples. Furthermore, it includes input samples with seven input features, which comprise nitrogen, phosphorus, potassium, temperature, humidity, soil pH, and rainfall. The evaluation and comparison are done using four classification algorithms, namely Logistic Regression, Random Forest, CATBoost, and XGBoost. Experimental results show that XGBoost is able to achieve the highest predictive performance with a test-set AUC of 1.00 and a 5-fold cross-validation mean AUC of 0.99. Along with predicting the best crop, the model provides confidence scores for other crops, giving farmers flexibility in decision-making. A web application was developed using Django for online recommendations based on user-supplied environmental input. The suggested approach shows the efficacy of gradient boosting in precision agriculture, which can be a practical decision-support system for crop selection and resource utilization while promoting sustainability in agriculture.

Fields of Study & Subjects

Smart Agriculture and AI Soil and Land Suitability Analysis Soil Geostatistics and Mapping

Publication details

Journal / source
International Journal of Intelligent Systems and Data Science
Publisher
Femington
Volume
1
Issue
3
Publication date
29 June 2026