Safety Detection

Coffee Powder Adulteration Detection Based on Near-Infrared Spectroscopy Combined with Machine Learning

  • 张付杰,曾庆宇,孔丹丹,余小宁,胡伟明,陈申奥,岳啸先,梁嘉雯
Expand
  • (1. Faculty of Modern Agricultural Engineering, Kunming University of Science and Technology, Kunming 650500, China; 2. Yunnan Aromatic Tobacco Co. Ltd., Baoshan 678000, China)

Online published: 2026-02-04

Abstract

This study aims to develop a rapid and non-destructive method based on near-infrared (NIR) spectroscopy combined with machine learning modeling for the quantitative detection of soybean-adulterated coffee powder. A hierarchical modeling strategy was adopted to improve prediction accuracy. Support vector regression (SVR) combined with three spectral preprocessing methods was used to construct prediction models. A total of 30 characteristic wavelengths were selected by comparing competitive adaptive reweighted sampling (CARS) and iteratively retains informative variables (IRIV). Furthermore, three optimization algorithms: dung beetle optimization (DBO), particle swarm optimization (PSO), and grey wolf optimizer (GWO) were tested to find the most effective algorithm. The CARS-DBO-SVR model exhibited coefficients of determination (R2) of 0.978 4 and 0.966 9, root mean square error (RMSE) of 0.015 7 and 0.022 8, and residual prediction deviation (RPD) of 6.809 6 and 5.499 8 for the calibration and test sets, respectively. This study demonstrates that NIR spectroscopy provides an effective technical means for detecting soybean powder adulteration in coffee.

Cite this article

张付杰,曾庆宇,孔丹丹,余小宁,胡伟明,陈申奥,岳啸先,梁嘉雯 . Coffee Powder Adulteration Detection Based on Near-Infrared Spectroscopy Combined with Machine Learning[J]. FOOD SCIENCE, 2026 , 47(1) : 309 -316 . DOI: 10.7506/spkx1002-6630-20250724-189

Outlines

/

〈 〉