- Article
Accurate classification of pest abundance can contribute to the monitoring and interpretation of pest population dynamics. This study developed an explainable Particle Swarm Optimization (PSO)-optimized XGBoost model to classify male Kermania pistaciella Amsel trap abundance as low (L), medium (M), high (H), or very high (VH). The dataset comprised 404 observations and nine temporal, meteorological, and biological predictors, including temperature, relative humidity, sampling time, sex ratio, and parasitoid counts. Model hyperparameters were optimized using PSO, and classification performance was initially assessed using stratified five-fold cross-validation. The model achieved a mean Accuracy of 69.06% and a mean Weighted F1-Score of 65.89%. Class-specific performance was higher for the L and VH classes, with F1-Scores of 0.7662 and 0.7595, respectively, whereas the less-represented M and H classes were more difficult to distinguish, with F1-Scores of 0.2712 and 0.1304. To obtain a more conservative estimate of internal predictive performance, nested stratified five-fold cross-validation was additionally performed, yielding a mean Accuracy of 65.84% ± 2.56%, a mean Weighted F1-Score of 62.74% ± 2.67%, a mean Macro F1-Score of 44.55% ± 3.14%, and a mean Balanced Accuracy of 44.84% ± 2.75%. Explainable artificial intelligence was used to derive interpretable IF–THEN rules from the optimized model. Representative rules showed local accuracy values ranging from 0.583 to 1.000, with substantial variation in support and coverage across abundance classes. The extracted rules described combinations of seasonal timing, temperature, humidity, sex ratio, and parasitoid abundance associated with the four abundance classes. These model-derived patterns provide an interpretable representation of classification behavior within the present dataset but should not be interpreted as validated biological thresholds, causal triggers, or direct pest-management intervention criteria. The abundance classes represent relative male moth trap-abundance levels, and independent external and prospective field validation is required before the framework can be considered for operational pest-management applications.
10 November 2026









![Timeline of Varroa destructor invasions and market authorization for acaricides to treat V. destructor in honey bee colonies. Sources: U.S. Environmental Protection Agency/European Medicines Agency regulatory records [3,15,16,18].](https://mdpi-res.com/insects/insects-17-00517/article_deploy/html/images/insects-17-00517-g001-550.jpg)
