食品科学 ›› 2026, Vol. 47 ›› Issue (1): 309-316.doi: 10.7506/spkx1002-6630-20250724-189

• 安全检测 • 上一篇    

基于近红外光谱技术结合机器学习的咖啡粉掺假检测分析

张付杰,曾庆宇,孔丹丹,余小宁,胡伟明,陈申奥,岳啸先,梁嘉雯   

  1. (1.昆明理工大学现代农业工程学院,云南 昆明 650500;2.云南香料烟有限责任公司,云南 保山 678000)
  • 发布日期:2026-02-04
  • 基金资助:
    云南省基础研究专项重点项目(202301AS070030);云南省科技计划项目(202502AS100016)

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

ZHANG Fujie, ZENG Qingyu, KONG Dandan, YU Xiaoning, HU Weiming, CHEN Shen’ao, YUE Xiaoxian, LIANG Jiawen   

  1. (1. Faculty of Modern Agricultural Engineering, Kunming University of Science and Technology, Kunming 650500, China; 2. Yunnan Aromatic Tobacco Co. Ltd., Baoshan 678000, China)
  • Published:2026-02-04

摘要: 开发一种基于近红外光谱结合机器学习建模的快速、无损检测方法,用于对掺杂大豆粉的咖啡进行定量检测,采用分层建模策略以提高预测准确率。支持向量回归结合3 种光谱预处理方法被用于构建预测模型。通过对比竞争性自适应重加权采样和迭代保留信息变量方法,确定30 个特征波长。引入3 种优化算法(蜣螂优化算法、粒子群优化算法、灰狼优化算法),构建的模型校正集和测试集的决定系数(R2)为0.978 4、0.966 9,均方根误差分别为0.015 7和0.022 8,残差预测偏差比分别达到6.809 6、5.499 8。研究表明,近红外光谱技术为识别掺假大豆粉的咖啡检测提供了一种有效的技术手段。

关键词: 近红外光谱技术;咖啡掺假;支持向量回归

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.

Key words: near-infrared spectroscopy; coffee adulteration; support vector regression

中图分类号: