食品科学 ›› 2024, Vol. 45 ›› Issue (22): 255-261.doi: 10.7506/spkx1002-6630-20240327-200

• 安全检测 • 上一篇    下一篇

基于线性判别分析和机器学习的可见-近红外光谱苹果损伤分级

张宇, 张重阳, 段鑫鑫, 马少格, 赵甫, 王菊霞   

  1. (1.山西农业大学农业工程学院,山西 太谷 030801;2.旱作农业机械关键技术与装备山西省重点实验室,山西 太谷 030801)
  • 出版日期:2024-11-25 发布日期:2024-11-05
  • 基金资助:
    国家自然科学基金青年科学基金项目(11802167);山西省重点研发计划项目(202102020101012); 山西省应用基础研究项目(201901D211364)

Visual/Near-Infrared Spectroscopy Combined with Linear Discriminant Analysis and Machine Learning for Classification of Apple Damage

ZHANG Yu, ZHANG Chongyang, DUAN Xinxin, MA Shaoge, ZHAO Fu, WANG Juxia   

  1. (1. College of Agricultural Engineering, Shanxi Agricultural University, Taigu 030801, China;2. Key Technology and Equipment of Dry Farming Agricultural Machinery Shanxi Key Laboratory, Taigu 030801, China)
  • Online:2024-11-25 Published:2024-11-05

摘要: 基于线性判别分析与机器学习相结合的方法,采集不同损伤级别苹果的可见-近红外光谱数据,分析不同预处理方法对支持向量机分类模型的影响;通过线性判别分析对预处理后的光谱数据实施降维,构建支持向量机、随机森林、K近邻、决策树和极端梯度提升5 种机器学习模型进行苹果损伤分级对比。研究结果表明,卷积平滑法预处理后模型的分级效果最佳,准确率达到87.3%;使用线性判别分析降维技术后,各模型的分级准确率显著提升,决策树模型准确率提高了16%,提升效果最佳,K近邻模型表现出了最佳的分级性能,准确率和精确率达到了96.0%和96.4%,本研究可为高效和精确评估苹果的机械损伤程度提供依据。

关键词: 苹果;可见-近红外光谱;机器学习;线性判别分析;损伤分级

Abstract: This study investigated the combined application of visible/near-infrared (Vis-NIR) spectroscopy with linear discriminant analysis (LDA) and machine learning (ML) for the classification of apples with different degrees of damage. The Vis-NIR spectral data of apples with different degrees of damage were collected, and the effect of different spectral preprocessing methods on the support vector machine (SVM) classification model was analyzed. LDA was used to reduce the dimensionality of the preprocessed spectral data, and five machine learning models including SVM, random forest (RF), K-nearest neighbor (KNN), decision tree (DT) and extreme gradient boosting (XGBoost) were constructed and compared for the classification of apple damage. The results showed that the SVM model based on preprocessed spectra with Savitzky-Golay (SG) smoothing had the best classification performance, with an accuracy of 87.3%. After dimensionality reduction using LDA, the classification accuracy of all the models was significantly improved, with the highest increase of 16% being observed in the DT model. The KNN model showed the best classification performance, with an accuracy of 96.0% and a precision of 96.4%. This study provides a basis for efficient and accurate assessment of the degree of mechanical damage in apples.

Key words: apple; visible/near-infrared spectroscopy; machine learning; linear discriminant analysis; damage classification

中图分类号: