收藏切换
Stacked generalization model prediction of fenthion spot-check results in vegetables based on particle swarm optimization ensemble learning algorithm
收藏切换
PDF
Zi-Wen ZHOU, Zhi-Yi FAN, Shao-Jie PENG*
Journal of Food Safety & Quality | 2025, 16(5) : 187 - 196
Less
收藏切换
Journal of Food Safety & Quality | 2025, 16(5): 187-196
Special Topic: Research and Detection of Pesticide and Veterinary Drug Residue
Stacked generalization model prediction of fenthion spot-check results in vegetables based on particle swarm optimization ensemble learning algorithm
Full
Zi-Wen ZHOU, Zhi-Yi FAN, Shao-Jie PENG*
Affiliations
  • Information Application Research Center of Shanghai Municipal Administration for Market Regulation, Shanghai 200030, China
Published: 2025-03-15 doi: 10.19812/j.cnki.jfsq11-5956/ts.20241008004
Outline
收藏切换

Objective To establish a vegetable safety risk prediction model based on the particle swarm optimization (PSO) algorithm and the stacked generalization (Stacking) model, and to predict the sampling results of fenthion in vegetables sold in Shanghai. Methods Based on the sampling data of fenthion in vegetables sold in Shanghai from 2021 to 2023, task type, sampling area, sampling link, sampling place, sampling month, testing institution, and vegetable variety were selected as feature variables. The target variable was whether the sampling results for fenthion in vegetables were qualified. The PSO-Stacking prediction model was constructed using ten-fold cross-validation to select effective machine learning models and resampling methods and optimized the model parameters using the PSO algorithm. Results Fenthion-positive samples were found in 55 out of 3889 vegetable samples, with an overall failure rate of 1.4%. Bean vegetables had the highest rate at 2.3%, followed by eggplant and fruiting vegetables at 0.2%. The base models were obtained through screening, including Random Forest (RF), categorical boosting (CatBoost), gradient boosting (GB), extreme gradient Boosting (XGBoost), and light gradient boosting machine (LGBM). The best resampling technique was adaptive synthetic sampling (ADASYN). The PSO-Stacking model achieved the highest precision (0.91), recall (0.83), F1 score (0.87), and area under the curve (AUC) value (0.91) on the test set. Conclusion The PSO-Stacking model effectively addresses imbalanced food safety sampling data, accurately predicts the unqualified fenthion samples in vegetables, and provides technical support for vegetable supervision, sampling and risk warning.

vegetables  /  fenthion  /  particle swarm algorithm  /  stacked generalization model  /  machine learning  /  food safety
Zi-Wen ZHOU, Zhi-Yi FAN, Shao-Jie PENG. Stacked generalization model prediction of fenthion spot-check results in vegetables based on particle swarm optimization ensemble learning algorithm[J]. Journal of Food Safety & Quality, 2025 , 16 (5) : 187 -196 . DOI: 10.19812/j.cnki.jfsq11-5956/ts.20241008004
Year 2025 volume 16 Issue 5
PDF
277
100
Cite this Article
BibTeX
Article Info
doi: 10.19812/j.cnki.jfsq11-5956/ts.20241008004
  • Receive Date:2024-10-08
  • Online Date:2025-07-19
  • Published:2025-03-15
Article Data
Affiliations
History
  • Received:2024-10-08
Funding
Affiliations
    Information Application Research Center of Shanghai Municipal Administration for Market Regulation, Shanghai 200030, China
References
Share
https://castjournals.cast.org.cn/joweb/spaq/EN/10.19812/j.cnki.jfsq11-5956/ts.20241008004
Share to
QR

Scan QR to access full text

Cite this article
BibTeX
Citations
表12种不同金属材料的力学参数

Family
属数
Number of
genus
种数
Number of
species
占总种数比例
Percentage of
total species (%)

Genus
种数
Number of
species
占总种数比例
Percentage of total
species (%)
鹅膏菌科Amanitaceae 2 11 5.26 鹅膏菌属 Amanita 10 4.78
小菇科 Mycenaceae 2 12 5.74 丝盖伞属 Inocybe 5 2.39
多孔菌科 Polyporaceae 8 14 6.70 蜡蘑属 Laccaria 5 2.39
红菇科 Russulaceae 3 23 11.00 小皮伞属 Marasmius 6 2.87
小菇属 Mycena 11 5.26
光柄菇属 Pluteus 5 2.39
红菇属 Russula 17 8.13
栓菌属 Trametes 5 2.39
关闭全屏
  • BibTeX
  • EndNote
  • RefWorks
  • TxT