Model Comparison and Feature Selection for Crop Recommendation
Main Article Content
Abstract
Selecting crops appropriate to soil and environmental conditions is a crucial component of decision-making in smart agriculture. This study aims to evaluate the effect of feature selection on the predictive performance, stability, and computational efficiency of several machine learning models in crop recommendation tasks. The dataset employed in this study is a publicly available crop recommendation dataset, encompassing attributes such as nitrogen, phosphorus, potassium, temperature, humidity, pH, and rainfall. Six distinct models were evaluated: Logistic Regression, K-Nearest Neighbors, Support Vector Machine, Random Forest, XGBoost, and LightGBM, under two distinct conditions: utilizing all available features and employing a selection of features. The models' performance was assessed through various metrics, including accuracy, precision, recall, F1-score, the mean and standard deviation of cross-validation accuracy, as well as the inference time per sample. Random Forest outperformed other models, achieving high accuracies (0.993–0.995) across both full and selected feature scenarios. The model input was simplified with minimal performance impact by the feature selection, which left the temperature and pH unselected. These results indicate that environmental factors, in addition to soil nutrients, substantially affect crop recommendations. Consequently, this research underscores that the evaluation of models for crop recommendation should prioritize not only accuracy but also stability, inference efficiency, and feature relevance to facilitate practical application within smart agricultural systems.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
References
J. Botero-Valencia, V. Garcia-Pineda, A. Valencia-Arias, J. Valencia, E. Reyes-Vera, M. Mejia-Herrera, and R. Hernandez-Garcia, “Machine Learning in Sustainable Agriculture: Systematic Review and Research Perspectives,” Feb. 01, 2025, Multidisciplinary Digital Publishing Institute (MDPI). doi: 10.3390/agriculture15040377.
Food and Agriculture Organization of the United Nations, “The challenge,” Rome, 2009. Accessed: Mar. 28, 2026. [Online]. Available: https://www.fao.org/fileadmin/templates/wsfs/docs/Issues_papers/HLEF2050_Global_Agriculture.pdf
S. O. Araújo, R. S. Peres, J. C. Ramalho, F. Lidon, and J. Barata, “Machine Learning Applications in Agriculture: Current Trends, Challenges, and Future Perspectives,” Dec. 01, 2023, Multidisciplinary Digital Publishing Institute (MDPI). doi: 10.3390/agronomy13122976.
S. A. Frimpong, M. Han, W. Zheng, X. Li, E. Akpaku, and A. P. Obeng, “Machine and Deep Learning in Agricultural Engineering: A Comprehensive Survey and Meta-Analysis of Techniques, Applications, and Challenges,” Oct. 01, 2025, Multidisciplinary Digital Publishing Institute (MDPI). doi: 10.3390/computers14100438.
P. Velusamy, S. Rajendran, R. K. Mahendran, S. Naseer, M. Shafiq, and J. G. Choi, “Unmanned aerial vehicles (Uav) in precision agriculture: Applications and challenges,” Jan. 01, 2022, MDPI. doi: 10.3390/en15010217.
A. Indryani, U. Khaira, and M. F. Putri, “Rainfall Prediction Using Long Short-Term Memory Method (Case Study: Jambi City),” Jurnal Pepadun, vol. 6, no. 1, pp. 57–70, Apr. 2025, doi: 10.23960/pepadun.v6i1.256.
L. Benos, A. C. Tagarakis, G. Dolias, R. Berruto, D. Kateris, and D. Bochtis, “Machine learning in agriculture: A comprehensive updated review,” Jun. 01, 2021, MDPI AG. doi: 10.3390/s21113758.
T. Ayoub Shaikh, T. Rasool, and F. Rasheed Lone, “Towards leveraging the role of machine learning and artificial intelligence in precision agriculture and smart farming,” Comput. Electron. Agric., vol. 198, p. 107119, 2022, doi: https://doi.org/10.1016/j.compag.2022.107119.
I. Attri, L. K. Awasthi, and T. P. Sharma, “Machine learning in agriculture: a review of crop management applications,” Multimed. Tools Appl., vol. 83, no. 5, pp. 12875–12915, 2024, doi: 10.1007/s11042-023-16105-2.
H. M. Abdullah, J. E. Istiyanto, A. Z. K. Frisky, and E. A. Suyono, “Feature enhanced multistream RNN for growth phase prediction of Euglena sp. microalgae in an IoT-based outdoor cultivation environment,” Smart Agricultural Technology, vol. 11, Aug. 2025, doi: 10.1016/j.atech.2025.100939.
B. Dey, J. Ferdous, and R. Ahmed, “Machine learning based recommendation of agricultural and horticultural crop farming in India under the regime of NPK, soil pH and three climatic variables,” Heliyon, vol. 10, no. 3, Feb. 2024, doi: 10.1016/j.heliyon.2024.e25112.
M. K. Senapaty, A. Ray, and N. Padhy, “A Decision Support System for Crop Recommendation Using Machine Learning Classification Algorithms,” Agriculture (Switzerland), vol. 14, no. 8, Aug. 2024, doi: 10.3390/agriculture14081256.
F. S. Prity, MD. M. Hasan, S. H. Saif, Md. M. Hossain, S. H. Bhuiyan, Md. A. Islam, and Md. T. H. Lavlu, “Enhancing Agricultural Productivity: A Machine Learning Approach to Crop Recommendations,” Human-Centric Intelligent Systems, vol. 4, no. 4, pp. 497–510, Dec. 2024, doi: 10.1007/s44230-024-00081-3.
M. Y. Shams, S. A. Gamel, and F. M. Talaat, “Enhancing crop recommendation systems with explainable artificial intelligence: a study on agricultural decision-making,” Neural Comput. Appl., vol. 36, no. 11, pp. 5695–5714, Apr. 2024, doi: 10.1007/s00521-023-09391-2.
M. A. Bakr, A. J. Khan, S. D. Khan, M. H. Zafar, M. Ullah, and H. Ullah, “Evaluation of Learning-Based Models for Crop Recommendation in Smart Agriculture,” Information (Switzerland), vol. 16, no. 8, Aug. 2025, doi: 10.3390/info16080632.
M. R. Islam, K. Oliullah, M. M. Kabir, M. Alom, and M. F. Mridha, “Machine learning enabled IoT system for soil nutrients monitoring and crop recommendation,” J. Agric. Food Res., vol. 14, Dec. 2023, doi: 10.1016/j.jafr.2023.100880.
M. Bouni, B. Hssina, K. Douzi, and S. Douzi, “Interpretable Machine Learning Techniques for an Advanced Crop Recommendation Model,” Journal of Electrical and Computer Engineering, vol. 2024, 2024, doi: 10.1155/2024/7405217.
A. Aryanti and N. Iryani, “A Smart Recommendation System for Crop Seed Selection Using Gradient Boosting Based on Environmental and Geospatial Data,” 2025. [Online]. Available: http://jurnal.polibatam.ac.id/index.php/JAIC
H. Gunasekaran, K. Ramalakshmi, S. Debnath, and D. K. Swaminathan, “Physics-Aware Ensemble Learning for Superior Crop Recommendation in Smart Agriculture,” Sensors, vol. 25, no. 19, Oct. 2025, doi: 10.3390/s25196243.
A. Ingle, “Crop Recommendation Dataset,” Kaggle. Accessed: Mar. 28, 2026. [Online]. Available: https://www.kaggle.com/datasets/atharvaingle/crop-recommendation-dataset
T. B. Shahi, C. Y. Xu, A. Neupane, and W. Guo, “Recent Advances in Crop Disease Detection Using UAV and Deep Learning Techniques,” May 01, 2023, MDPI. doi: 10.3390/rs15092450.
R. P. Sishodia, R. L. Ray, and S. K. Singh, “Applications of remote sensing in precision agriculture: A review,” Remote Sens. (Basel)., vol. 12, no. 19, pp. 1–31, Oct. 2020, doi: 10.3390/rs12193136.
A. Triantafyllou, P. Sarigiannidis, and S. Bibi, “Precision agriculture: A remote sensing monitoring system architecture,” Information (Switzerland), vol. 10, no. 11, Nov. 2019, doi: 10.3390/info10110348.
I. Anam, N. Arafat, M. S. Hafiz, J. R. Jim, M. M. Kabir, and M. F. Mridha, “A systematic review of UAV and AI integration for targeted disease detection, weed management, and pest control in precision agriculture,” Dec. 01, 2024, Elsevier B.V. doi: 10.1016/j.atech.2024.100647.
D. G. Pai, R. Kamath, and M. Balachandra, “Deep Learning Techniques for Weed Detection in Agricultural Environments: A Comprehensive Review,” 2024, Institute of Electrical and Electronics Engineers Inc. doi: 10.1109/ACCESS.2024.3418454.
M. Baishya and L. Dutta, “Tiny ML based crop recommendation system for precision agriculture 5.0,” Smart Agricultural Technology, vol. 12, Dec. 2025, doi: 10.1016/j.atech.2025.101247.
M. K. Senapaty, A. Ray, and N. Padhy, “A Decision Support System for Crop Recommendation Using Machine Learning Classification Algorithms,” Agriculture (Switzerland), vol. 14, no. 8, Aug. 2024, doi: 10.3390/agriculture14081256.
R. Guebsi, S. Mami, and K. Chokmani, “Drones in Precision Agriculture: A Comprehensive Review of Applications, Technologies, and Challenges,” Nov. 01, 2024, Multidisciplinary Digital Publishing Institute (MDPI). doi: 10.3390/drones8110686.
S. Abdumalikov, J. Kim, and Y. Yoon, “Performance Analysis and Improvement of Machine Learning with Various Feature Selection Methods for EEG-Based Emotion Classification,” Applied Sciences (Switzerland), vol. 14, no. 22, Nov. 2024, doi: 10.3390/app142210511.
C. S. K. Dash, A. K. Behera, S. Dehuri, and A. Ghosh, “An outliers detection and elimination framework in classification task of data mining,” Decision Analytics Journal, vol. 6, Mar. 2023, doi: 10.1016/j.dajour.2023.100164.
I. Izonin, R. Tkachenko, N. Shakhovska, B. Ilchyshyn, and K. K. Singh, “A Two-Step Data Normalization Approach for Improving Classification Accuracy in the Medical Diagnosis Domain,” Mathematics, vol. 10, no. 11, Jun. 2022, doi: 10.3390/math10111942.
A. Rejeb, K. Rejeb, and A. Hassoun, “The impact of machine learning applications in agricultural supply chain: a topic modeling-based review,” Dec. 01, 2025, Springer Nature. doi: 10.1007/s44187-025-00419-1.
G. Gupta and S. Kumar Pal, “Applications of AI in precision agriculture,” Discover Agriculture, vol. 3, no. 1, Apr. 2025, doi: 10.1007/s44279-025-00220-9.
M. Padhiary, D. Saha, R. Kumar, L. N. Sethi, and A. Kumar, “Enhancing precision agriculture: A comprehensive review of machine learning and AI vision applications in all-terrain vehicle for farm automation,” Aug. 01, 2024, Elsevier B.V. doi: 10.1016/j.atech.2024.100483.