logo

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

Authors
  • Guruprasath Sankaran

    Author

Keywords:
Crop Recommendation, Precision Agriculture, XGBoost, Classification Algorithms, Decision Support Systems, Sustainable Agriculture, Smart Farming
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.

References
Cover Image
cover image
Downloads
Published
2026-06-29
Section
Articles
License

Copyright (c) 2026 International Journal of Intelligent Systems and Data Science

Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 International License.