College of Software, Xinjiang University, Urumqi, China.
College of Information Science and Engineering, Xinjiang University, Urumqi, China.
PLoS One. 2022 Jul 14;17(7):e0268979. doi: 10.1371/journal.pone.0268979. eCollection 2022.
Varieties of raisins are diverse, and different varieties have different nutritional properties and commercial value. In this paper, we propose a method to identify different varieties of raisins by combining near-infrared (NIR) spectroscopy and machine learning algorithms. The direct averaging of the spectra taken for each sample may reduce the experimental data and affect the extraction of spectral features, thus limiting the classification results, due to the different substances of grape skins and flesh. Therefore, this experiment proposes a method to fuse the spectral features of pulp and peel. In this experiment, principal component analysis (PCA) was used to extract baseline corrected features, and linear models of k-nearest neighbor (KNN) and linear discriminant analysis (LDA) and nonlinear models of back propagation (BP), support vector machine with genetic algorithm (GA-SVM), grid search-support vector machine (GS-SVM) and particle swarm optimization with support vector machine (PSO- SVM) coupling were used to classify. This paper compared the results of four experiments using only skin spectrum, only flesh spectrum, average spectrum of skin and flesh, and their spectral feature fusion. The experimental results showed that the accuracy and Macro-F1 score after spectral feature fusion were higher than the other three experiments, and GS-SVM had the highest accuracy and Macro-F1 score of 94.44%. The results showed that feature fusion can improve the performance of both linear and nonlinear models. This may provide a new strategy for acquiring spectral data and improving model performance in the future. The code is available at https://github.com/L-ain/Source.
葡萄干品种繁多,不同品种的营养价值和商业价值也不同。在本文中,我们提出了一种结合近红外(NIR)光谱和机器学习算法来识别不同品种葡萄干的方法。由于葡萄皮和肉的不同物质,直接平均每个样品的光谱可能会减少实验数据并影响光谱特征的提取,从而限制分类结果。因此,本实验提出了一种融合果肉和果皮光谱特征的方法。在本实验中,使用主成分分析(PCA)提取基线校正特征,使用 k-最近邻(KNN)和线性判别分析(LDA)的线性模型以及反向传播(BP)、遗传算法支持向量机(GA-SVM)、网格搜索支持向量机(GS-SVM)和支持向量机粒子群优化(PSO-SVM)的非线性模型进行分类。本文比较了仅使用果皮光谱、仅使用果肉光谱、果皮和果肉平均光谱以及它们的光谱特征融合的四个实验的结果。实验结果表明,光谱特征融合后的准确率和宏 F1 得分均高于其他三个实验,GS-SVM 的准确率和宏 F1 得分最高,分别为 94.44%。结果表明,特征融合可以提高线性和非线性模型的性能。这可能为未来获取光谱数据和提高模型性能提供一种新策略。代码可在 https://github.com/L-ain/Source 获得。