光谱学与光谱分析, 2020, 40 (6): 1869, 网络出版: 2020-12-08  

改进和声搜索算法的近红外光谱特征变量选择

Research on Near Infrared Spectral Feature Variable Selection Method Based on Improved Harmonic Search Algorithm
作者单位
1 中国海洋大学信息科学与工程学院, 山东 青岛 266100
2 云南中烟工业有限责任公司技术中心, 云南 昆明 650024
摘要
近红外光谱分析以其简便、 快速、 高效、 低成本、 绿色环保等优点, 已广泛应用于诸多领域。 然而, 近红外光谱同时存在变量维度高、 多重共线性、 包含冗余信息和高频噪声等问题, 直接构建预测模型不但增加建模复杂度, 同时也会影响模型的预测性能和泛化能力, 因此提出一种基于改进和声搜索算法(HS)的光谱特征变量选择方法。 HS常用于解决特征变量优化选择问题。 在应用和声搜索算法进行最优光谱变量选择时, 首先通过偏最小二乘(PLS)载荷系数计算各光谱点的特征贡献度, 作为和声搜索算法改进的扰动权重。 算法优选光谱特征变量过程中, 引入变量特征贡献度作为激励因子, 采用随机遍历和激励因子共同作用的方式生成初始解向量。 产生新和声向量时, 应用变量特征贡献度作为惩罚项, 通过加入平衡因子使选择参数随迭代次数而动态调整, 从而适应光谱变量的搜索, 增强搜索过程的遍历性和种群的多样性。 为验证本算法的有效性, 以烟叶样品烟碱、 总糖、 总氮三个指标的近红外光谱PLS建模应用为例, 对采集的原始光谱进行预处理后, 应用该方法对光谱变量进行优选, 根据变量被选择的累积频次分别计算不同变量个数的模型预测性能, 通过校正均方根误差(RMSEC)随变量增加的变化趋势确定最终选择的光谱特征变量。 在训练集上分别建立各指标的PLS模型, 应用测试集测试模型性能, 并与全光谱、 无信息变量消除法(UVE)和粒子群算法(PSO)进行比较。 实验结果显示, 应用该算法所选变量建立的烟碱、 总糖和总氮三个模型的决定系数(R2)分别为0.921 1, 0.925 7和0.941 2, 预测均方根误差(RMSEP)分别为0.102 3, 1.034 6和0.053 1, 与其他方法相比, 光谱特征变量更少, 同时R2和RMSEP值更优。 由此表明, 改进的和声搜索算法能有效筛选特征光谱, 降低建模复杂度, 提升模型预测性能和泛化能力。
Abstract
Near-infrared spectroscopy has been widely used in many fields for detection and analysis because of its advantages of simplicity, speed, efficiency, low cost, and environment protection. However, the NIR spectra also contain interferences such as high variable dimension, multiple collinearities, redundant information, and high frequency noise. The direct construction of the prediction model not only increases the modeling complexity but also affects the prediction performance and generalization. For this purpose, a spectral feature variable selection method based on the improved Harmony Search algorithm (HS) is proposed. HS is often used to solve feature variable optimization problem. When the spectral variable selection is applied by the HS algorithm, the feature contribution of spectra is firstly calculated by the PLS loading coefficient as the disturbance weight of the improved HS. In the process of optimizing the spectral feature variables, the variable feature contribution is introduced as the excitation factor, and the initial solution vectors are generated by the combination of random traversal and excitation factor. When generating the new harmony vector, the feature contribution is applied as a penalty factor, and the parameters of HS are dynamically adjusted with the number of iterations by adding the balance factor, so as to adapt to the search of spectral variables. It enhances the ergodicity of the search process and the diversity of the population. In order to verify the effectiveness of the algorithm, the NIR PLS models of nicotine, total sugar and total nitrogen using tobacco samples are constructed. After pre-processing the original spectra, this method is used to optimize spectral variables. The prediction performance of each model corresponding to the number of different variables is calculated according to the cumulative frequency at which the variables are selected, and the final selected spectral variables are determined by the increasing trend of the Root Mean Square Error of Calibration (RMSEC) with the variables. The three PLS models are established on the training set and the test set respectively, and they are compared with the full spectrum, Uninformative Variables Elimination (UVE) and Particle Swarm Optimization (PSO). The experimental results show that the coefficient of determination (R2) of nicotine, total sugar and total nitrogen models using the selected variables is 0.921 1, 0.925 7 and 0.941 2, respectively; and the Root Mean Square Error of Prediction (RMSEP) is 0.102 3, 1.034 6 and 0.053 1. Compared with other methods, the RMSEP of this study is low, the R2 of these models is more than 0.92, and the spectral characteristic variables are small. It is shown that the improved HS algorithm can effectively filter the feature spectrum, reduce the modeling complexity, improve the model prediction performance and generalization ability.

张磊, 丁香乾, 宫会丽, 吴丽君, 白晓莉, 罗林. 改进和声搜索算法的近红外光谱特征变量选择[J]. 光谱学与光谱分析, 2020, 40(6): 1869. ZHANG Lei, DING Xiang-qian, GONG Hui-li, WU Li-jun, BAI Xiao-li, LUO Lin. Research on Near Infrared Spectral Feature Variable Selection Method Based on Improved Harmonic Search Algorithm[J]. Spectroscopy and Spectral Analysis, 2020, 40(6): 1869.

关于本站 Cookie 的使用提示

中国光学期刊网使用基于 cookie 的技术来更好地为您提供各项服务,点击此处了解我们的隐私策略。 如您需继续使用本网站,请您授权我们使用本地 cookie 来保存部分信息。
全站搜索
您最值得信赖的光电行业旗舰网络服务平台!