Xai-enhanced xgboost for crop recommendation using filter-wrapper based hybrid RF-PSOfeature selection for precision agriculture in Mizoram
173
Keywords:
machine learning, feature extraction, RF-PSO, XAI, precision farming, jhum cultivationAbstract
The study presents an XGBoost based machine learning (ML) model enhanced with explainable artificial intelligence (XAI) for crop recommendation system to assist the Mizo’s farmers
for selecting a suitable crop to grow on their farming land. A combine random forest (RF) and particle swarm optimization (PSO) feature extraction techniques (i.e., Hybrid RF + PSO) was proposed.
Synthetic minority over-sampling technique (SMOTE) was utilized to tackle the class imbalance issues in the dataset. SMOTE is employed to tackle class imbalances in the dataset. Moreover, the K-
fold cross validation (K = 5) was used during the training process to evaluate the model’s performance and ensure a comprehensive assessment of the training data. The XGBoost classifier trained on both
the RF top 8 features and Hybrid RF + PSO features selected, revealed that the proposed combine approach achieved a better outcome across the metrics considered although the cross validation standard deviation is slightly higher than RF top 8 features alone. Further, the precision recall (PR) curve analysis has shown that the proposed approach achieved a higher micro-average score than the RF tops 8 feature a lone. The analysis the confusion matrix revealed that, the proposed approach minimized an overall classification error than the RF top 8 features alone. Eventually, the model decision was interpreted using the SHAP (SHapley Additive exPlanations) to analyze the contribution of an individual feature towards the model decision. The SHAP analysis has revealed that, higher pH levels have a significant impact for rapeseed crop though it has a marginal contribution for other crop types. The features like nitrogen (N), and potassium (K) have an overall highest contribution across
the crops.
Downloads
References
Ajayi, O. G., Ashi, J., & Guda, B. (2023). Performance evaluation of YOLO v5 model for automatic crop and weed classification on UAV images. Smart Agricultural Technology, 5, 100231.
Amjad, M., Ahmad, I., Ahmad, M., Wróblewski, P., Kamiński, P., & Amjad, U. (2022). Prediction of pile bearing capacity using XGBoost algorithm: modeling and performance evaluation. Applied Sciences, 12(4), 2126.
Arunachalam, A. (2002). Dynamics of soil nutrients and microbial biomass during first year cropping in an 8-year jhum cycle. Nutrient Cycling in Agroecosystems, 64, 283-291.
Asselman, A., Khaldi, M., & Aammou, S. (2023). Enhancing the prediction of student performance based on the machine learning XGBoost algorithm. Interactive Learning Environments, 31(6), 3360-3379.
Bansode, S. P. (2023). A study of Indian agriculture and sustainable development. DR. EKNATH MUNDHE Professor, Rayat Shikshan Sanstha’s, SM Joshi College Hadapsar, Pune-411028, 72.
Chabalala, Y., Adam, E., & Ali, K. A. (2023). Exploring the effect of balanced and imbalanced multi-class distribution data and sampling techniques on fruit-tree crop classification using different machine learning classifiers. Geomatics, 3(1), 70-92.
Chen, T., & Guestrin, C. (2016, August). Xgboost: A scalable tree boosting system. In Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining (pp. 785-794).
Clarke, A., Yates, D., Blanchard, C., Islam, M. Z., Ford, R., Rehman, S., & Walsh, R. (2024). The effect of dataset construction and data pre-processing on the eXtreme Gradient Boosting algorithm applied to head rice yield prediction in Australia. Computers and Electronics in Agriculture, 219, 108716.
Darjee, D. K. (2023). A Comparative Review and Analysis of Organic Farming Policies Adopted by the North-east States of India: An Exploratory Study. Journal of Emerging Technologies and Innovative Research, h555-h570.
de Amorim, L. B., Cavalcanti, G. D., & Cruz, R. M. (2023). The choice of scaling technique matters for classification performance. Applied Soft Computing, 133, 109924.
Ekanayake, I. U., Meddage, D. P. P., & Rathnayake, U. (2022). A novel approach to explain the black-box nature of machine learning in compressive strength predictions of concrete using Shapley additive explanations (SHAP). Case Studies in Construction Materials, 16, e01059.
Elavarasan, D., Vincent PM, D. R., Srinivasan, K., & Chang, C. Y. (2020). A hybrid CFS filter and RF-RFE wrapper-based feature extraction for enhanced agricultural crop yield prediction modeling. Agriculture, 10(9), 400.
Elsheikh, A. H., & Abd Elaziz, M. (2019). Review on applications of particle swarm optimization in solar energy systems. International Journal of Environmental Science and Technology, 16, 1159-1170.
Garg, D., & Alam, M. (2023). An effective crop recommendation method using machine learning techniques. International Journal of Advanced Technology and Engineering Exploration, 10(102), 498.
Geng, X., Wu, S., Zhang, Y., Sun, J., Cheng, H., Zhang, Z., & Pu, S. (2023). Developing hybrid XGBoost model integrated with entropy weight and Bayesian optimization for predicting tunnel squeezing intensity. Natural Hazards, 119(1), 751-771.
Gopi, P. S. S., & Karthikeyan, M. (2023). Multimodal machine learning based crop recommendation and yield prediction model. Intell Autom Soft Comput, 36(1), 313-326.
Gopi, P. S. S., & Karthikeyan, M. (2024). Red fox optimization with ensemble recurrent neural network for crop recommendation and yield prediction model. Multimedia Tools and Applications, 83(5), 13159-13179.
Grogan, P., Lalnunmawia, F., & Tripathi, S. K. (2012). Shifting cultivation in steeply sloped regions: a review of management options and research priorities for Mizoram state, Northeast India. Agroforestry Systems, 84, 163-177.
Gulati, A., & Juneja, R. (2022). Transforming Indian Agriculture. Indian Agriculture Towards 2030 (pp. 9-37).
Hajihassani, M., Jahed Armaghani, D., & Kalatehjari, R. (2018). Applications of particle swarm optimization in geotechnical engineering: a comprehensive review. Geotechnical and Geological Engineering, 36, 705-722.
Ileberi, E., & Sun, Y. (2024). Machine Learning-Assisted Cervical Cancer Prediction Using Particle Swarm Optimization for Improved Feature Selection and Prediction. IEEE Access.
Jahandideh-Tehrani, M., Bozorg-Haddad, O., & Loáiciga, H. A. (2020). Application of particle swarm optimization to water management: an introduction and overview. Environmental Monitoring and Assessment, 192(5), 281.
Jain, M., Saihjpal, V., Singh, N., & Singh, S. B. (2022). An overview of variants and advancements of PSO algorithm. Applied Sciences, 12(17), 8392.
Kaur, A., Kataria, P., & Priscilla, L. (2023). Assessment of crop production dynamics in Mizoram. Agricultural Reviews, 44(4), 573-576.
Kennedy, J., & Eberhart, R. (1995, November). Particle swarm optimization. In Proceedings of ICNN'95-international conference on neural networks (Vol. 4, pp. 1942-1948). ieee.
Kumar, M., Maurya, P., & Verma, R. (2022). Future of Indian Agriculture Using AI and Machine Learning Tools and Techniques. The New Advanced Society: Artificial Intelligence and Industrial Internet of Things Paradigm, 447-472.
Kumar, Y. B., Lalramhlimi, B., Lalrinsanga, P. L., Soni, J. K., & Doley, S. (2023). Success of integrated farming system for enhancing farmer’s income in Mizoram. Indian Farming, 73(8), 39-43.
Lalengzama, C. (2019). Agrarian structure and transformation in Mizoram, north East India. J. Hum. Soc. Sci, 24, 6-23.
Li, J., Zhu, Q., Wu, Q., & Fan, Z. (2021). A novel oversampling technique for class-imbalanced learning based on SMOTE and natural neighbors. Information Sciences, 565, 438-455.
Li, Y., Zeng, H., Zhang, M., Wu, B., Zhao, Y., Yao, X., ... & Wu, F. (2023). A county-level soybean yield prediction framework coupled with XGBoost and multidimensional feature engineering. International Journal of Applied Earth Observation and Geoinformation, 118, 103269.
Liu, H., Zhang, X., Shen, X., & Sun, H. (2022). A fair and efficient hybrid federated learning framework based on xgboost for distributed power prediction. arXiv preprint arXiv:2201.02783.
Lv, C. X., An, S. Y., Qiao, B. J., & Wu, W. (2021). Time series analysis of hemorrhagic fever with renal syndrome in mainland China by using an XGBoost forecasting model. BMC infectious diseases, 21, 1-13.
Manokaran, J., & Vairavel, G. (2023). GIWRF-SMOTE: Gini impurity-based weighted random forest with SMOTE for effective malware attack and anomaly detection in IoT-Edge. Smart Science, 11(2), 276-292.
Miao, J., & Zhu, W. (2022). Precision–recall curve (PRC) classification trees. Evolutionary intelligence, 15(3), 1545-1569.
Mor, S., Madan, S., & Prasad, K. D. (2021). Artificial intelligence and carbon footprints: Roadmap for Indian agriculture. Strategic Change, 30(3), 269-280.
Mythili, K., & Rangaraj, R. (2021). Deep learning with particle swarm based hyper parameter tuning based crop recommendation for better crop yield for precision agriculture. Indian Journal of Science and Technology, 14(17), 1325-1337.
Naga Srinivasu, P., Ijaz, M. F., & Woźniak, M. (2024). XAI‐driven model for crop recommender system for use in precision agriculture. Computational Intelligence, 40(1), e12629.
Nembrini, S., König, I. R., & Wright, M. N. (2018). The revival of the Gini importance?. Bioinformatics, 34(21), 3711-3718.
Pandey, A. (2021). Crop production in India. Kaggle Dataset. Available at: https://www.kaggle.com/datasets/asishpandey/crop-production-in-india. Accessed on August 27, 2024.
Pandey, V., Pandey, P. K., Chakma, B., & Ranjan, P. (2024). Influence of short-and long-term persistence on identification of rainfall temporal trends using different versions of the Mann-Kendall test in Mizoram, Northeast India. Environmental Science and Pollution Research, 31(7), 10359-10378.
Ralte, L. (2015). Sustainable Agriculture Development in Mizoram. International Journal in Management & Social Science, 3(8), 10-27.
Ringland, J., Bohm, M., & Baek, S. R. (2019). Characterization of food cultivation along roadside transects with Google Street View imagery and deep learning. Computers and electronics in agriculture, 158, 36-50.
Sati, V. P. (2019). Shifting cultivation in Mizoram, India: An empirical study of its economic implications. Journal of Mountain Science, 16(9), 2136-2149.
Saxena, A., Suna, T., & Saha, D. (2020, May). Application of artificial intelligence in Indian agriculture. In Souvenir: 19 national convention–artificial intelligence in agriculture: Indian perspective. RCA Alumni Association, Udaipur. xvi.
Senapaty, M. K., Ray, A., & Padhy, N. (2024). A decision support system for crop recommendation using machine learning classification algorithms. Agriculture, 14(8), 1256.
Sharma, L. S. (2015). Horticulture for Improving the Economic Condition of Mizo Farmers: Problems and Prospects. Horticulture, 6(2), 13.
Singh, A. P. (2019). Sustainable alternatives to shifting cultivation in North east India. International Journal of Advance Science and Research Management, 4.
Singh, B., Rajesh, R., Golait, R., & K. Samuel L. (2023). Determinants of Financial Literacy and Financial Inclusion in North-eastern Region of India: A Case Study of Mizoram. Department Economic and Policy Research, Reserve Bank of India.
Singh, R., Babu, S., Avasthe, R. K., Das, A., Praharaj, C. S., Layek, J. A. Y. A. N. T. A., ... & Pashte, V. (2021). Organic farming in North–East India: Status and strategies. Indian Journal of Agronomy, 66(5), 163-179.
Thanga, J. L. LAND USE POLICIES IN THE STATE OF MIZORAM. Forest, 1259(3224), 4483.
Vijay, R., Manoj, S., Ravikanth, V., Vikas, Y., & Priyadarshini, P. I. (2021). Augmenting network intrusion detection system using extreme gradient boosting (XGBoost). Int. J. Creative Res. Thoughts, 9.
Wang, S., Dai, Y., Shen, J., & Xuan, J. (2021). Research on expansion and classification of imbalanced data based on SMOTE algorithm. Scientific reports, 11(1), 24039.
Xiong, Q., Zhang, X., Xu, X., & He, S. (2021). A modified chaotic binary particle swarm optimization scheme and its application in face-iris multimodal biometric identification. Electronics, 10(2), 217.
Yang, J. (2021). Fast treeshap: Accelerating shap value computation for trees. arXiv preprint arXiv:2109.09847.
ZHANG, K. F., SU, H. Y., & DOU, Y. (2021). A new multi-classification task accuracy evaluation method based on confusion matrix. Computer Engineering & Science, 43(11), 1910.
Zhang, X., & Liu, C. A. (2023). Model averaging prediction by K-fold cross-validation. Journal of Econometrics, 235(1), 280-301.
Submitted
Published
Issue
Section
License
Copyright (c) 2025 The Indian Journal of Agricultural Sciences

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
The copyright of the articles published in The Indian Journal of Agricultural Sciences is vested with the Indian Council of Agricultural Research, which reserves the right to enter into any agreement with any organization in India or abroad, for reprography, photocopying, storage and dissemination of information. The Council has no objection to using the material, provided the information is not being utilized for commercial purposes and wherever the information is being used, proper credit is given to ICAR.