An Explainable Hybrid Machine Learning Approach Based on MPSO-XGBoost for Pest Density Prediction in Almond Orchards
Open Access
Abstract
Accurate prediction of pest density and population levels in almond production is of great importance for crop yield, the prevention of quality losses, and the effectiveness of integrated pest management (IPM) strategies. Complex feature interactions in agricultural field data can affect both the predictive performance and interpretability of machine learning models. In this study, an explainable hybrid machine learning framework combining Mutated Particle Swarm Optimization (MPSO), XGBoost classification, and rule extraction was developed to classify pest insect density levels. The proposed approach was evaluated using two complementary validation settings. First, it was compared with 16 classification algorithms, including ensemble, deep learning, and rule-based methods, under stratified 5-fold cross-validation, achieving a mean accuracy of 79.63% and a mean Weighted F1-Score of 79.79%. In addition, nested stratified 5-fold cross-validation was employed to separate MPSO-based hyperparameter optimization from outer-fold performance evaluation. Under this more rigorous evaluation, the proposed approach achieved a mean accuracy of 79.27 ± 1.66% and a mean Weighted F1-Score of 79.29 ± 1.38%. Furthermore, interpretable IF–THEN decision rules were derived from the trained XGBoost decision structures to provide a transparent representation of the feature–threshold combinations associated with the classification decisions.Keywords
Funding Information
- Firat Üniversitesi (MF.26.64)
This publication has 47 references indexed in Scilit:
- Machine learning–based hybrid framework for weather-driven forewarning of major groundnut pestsInternational Journal of Biometeorology, 2026
- Artificial neural network model for predicting population dynamics of Anthonomus grandis grandis (Coleoptera: Curculionidae) in cotton fields, as a function of climatic elementsTheoretical and Applied Climatology, 2026
- Comparing brown mite, Bryobia rubrioculus Scheuten (Acari: Tetranychidae) sampling methods in almond orchards in CaliforniaExperimental and Applied Acarology, 2026
- Leveraging explainable AI for sustainable agriculture: a comprehensive review of recent advancesArtificial Intelligence Review, 2026
- Predicting the Seasonal Dynamics of Fruit Fly Anastrepha fraterculus Populations in Apple Orchards Using Artificial Neural NetworksNeotropical Entomology, 2025
- Bayesian optimization with Optuna for enhanced soil nutrient prediction: a comparative study with genetic algorithm and particle swarm optimizationSmart Agricultural Technology, 2025
- Evaluating the use of in‐season measures of pest abundance to predict end‐of‐season damage: a study in commercial almond (Prunus dulcis)Pest Management Science, 2024
- Predicting occurrence of liquefaction-induced lateral spreading using gradient boosting algorithms integrated with particle swarm optimization: PSO-XGBoost, PSO-LightGBM, and PSO-CatBoostActa Geotechnica, 2023
- Pest incidence forecasting based on Internet of Things and Long Short-Term Memory NetworkApplied Soft Computing, 2022
- Particle Swarm Optimization with Adaptive MutationFrontiers of Electrical and Electronic Engineering in China, 2006