Bio-Inspired Swarm Optimization for Interpretable Classification of Tropinota hirta Abundance Using Partial SMOTE and XGBoost
Classifying blue basin trap captures of Tropinota hirta according to environmental conditions can support timely and data-driven management of this flower-feeding pest in almond orchards; however, imbalanced class distributions pose important challenges for machine-learning models. This study proposes an interpretable PSO-XGBoost with Partial SMOTE framework for classifying T. hirta abundance levels derived from blue basin trap captures using temporal and meteorological variables. From a biomimetic perspective, Particle Swarm Optimization (PSO) is a bio-inspired optimization algorithm that emulates the collective search and information-sharing behavior observed in natural swarms, translating principles of biological collective intelligence into a computational optimization process. The dataset consisted of 256 trap observations categorized into High (H), Low (L), and Medium (M) abundance classes, with 180, 55, and 21 observations, respectively, indicating substantial class imbalance. Eleven temporal and meteorological variables were used as predictors, while PestCount, representing the observed number of T. hirta adults captured in the blue traps and used to derive the target classes, was excluded from the predictor set to prevent target leakage. The proposed framework combines controlled minority-class oversampling using Partial SMOTE, bio-inspired PSO for XGBoost hyperparameter optimization, and rule extraction for model interpretability. A Partial-SMOTE ratio ablation analysis identified L = 0.80 and M = 0.40 as the most favorable class-specific oversampling configuration, avoiding complete class balancing while improving overall and class-sensitive predictive performance. Performance was evaluated using stratified five-fold cross-validation, with oversampling applied exclusively to the training folds to prevent information leakage. The proposed method achieved a mean Accuracy of 89.45% and a mean Weighted F1-score of 88.79%, representing the best overall performance among the evaluated methods. The ablation analysis showed that PSO-based optimization improved conventional XGBoost, while the proposed Partial-SMOTE configuration outperformed both class-weighted XGBoost and PSO-XGBoost without oversampling. Robustness was further assessed using 10-times repeated stratified five-fold cross-validation, where the proposed method achieved 87.51 ± 3.75% Accuracy, 86.94 ± 3.71% Weighted F1-score, and 71.60 ± 7.40% Macro F1-score. Friedman and post-hoc Wilcoxon signed-rank tests with Holm correction confirmed statistically significant performance differences in favor of the proposed method. In addition, human-readable IF–THEN rules with bounded temporal and meteorological conditions were extracted from the optimized model to improve interpretability. The results indicate that integrating a biomimetic swarm-intelligence optimization strategy with controlled oversampling, blue-trap monitoring, and interpretable machine learning provides a promising framework for predicting T. hirta abundance levels and supporting environmentally compatible monitoring and pest-management decision-making in almond orchards.
Authors
- İnanç Özgen (ORCID: https://orcid.org/0000-0003-1742-9324)
- Cebrail Barut (ORCID: https://orcid.org/0000-0003-2756-5434)
Institutions
- Fırat University (TR)
Publication Details
- Journal
- Biomimetics
- Published
- 2026-10-14
- DOI
- https://doi.org/10.3390/biomimetics11100738
- Primary Topic
- Imbalanced Data Classification Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Firat Üniversitesi