CN107144548B - 基于蒙特卡洛变量组合集群的近红外光谱变量选择方法 - Google Patents

基于蒙特卡洛变量组合集群的近红外光谱变量选择方法 Download PDF

Info

Publication number
CN107144548B
CN107144548B CN201710373649.1A CN201710373649A CN107144548B CN 107144548 B CN107144548 B CN 107144548B CN 201710373649 A CN201710373649 A CN 201710373649A CN 107144548 B CN107144548 B CN 107144548B
Authority
CN
China
Prior art keywords
variable
sample
sampling
monte carlo
sample set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710373649.1A
Other languages
English (en)
Other versions
CN107144548A (zh
Inventor
宦克为
韩雪艳
刘小溪
赵环
石晓光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changchun University of Science and Technology
Original Assignee
Changchun University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changchun University of Science and Technology filed Critical Changchun University of Science and Technology
Priority to CN201710373649.1A priority Critical patent/CN107144548B/zh
Publication of CN107144548A publication Critical patent/CN107144548A/zh
Application granted granted Critical
Publication of CN107144548B publication Critical patent/CN107144548B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/359Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light

Landscapes

  • Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

本发明涉及基于蒙特卡洛变量组合集群的近红外光谱变量选择方法,属于分析化学和光谱学领域。具体实施过程如下:首先通过蒙特卡洛采样方法对校正集样本进行随机采样,其次通过变量组合集群分析法对每个样本子集进行特征变量选取,保留所有样本子集的特征变量得到一个新的变量空间,之后运用变量组合集群分析法对这个新的变量空间进行进一步的特征变量选取。本发明方法不仅通过二进制矩阵采样方法实现对变量空间的采样,同时还通过蒙特卡洛采样方法实现了对样本空间的采样,避免了样本集合变化对变量选择的影响。

Description

基于蒙特卡洛变量组合集群的近红外光谱变量选择方法
技术领域
本发明属于分析化学和光谱学领域,具体涉及基于蒙特卡洛变量组合集群的近红外光谱变量选择方法
技术背景
近红外的光谱频段为780nm~2500nm,光谱信息源来源于有机物的含氢基团的倍频和合频吸收,近红外光谱分析技术能够广泛的应用与物质的定性分析和定量分析领域,因此该项技术被誉为“具有提高全球农业分析能力的潜力技术”。由于近红外光谱具有上百个光谱波段,当仪器采集这些波段时除了样品自身的信息以外还包含了大量的外界信息,如噪音、样品背景干扰等。所以在分析研究中,变量选择对数据分析和建模有着及其重要的影响。进行变量选择,实际就是对变量的重要性来进行合理评价。
现在,国内外主要应用的变量选择方法有蒙特卡罗无信息变量删除法(MonteCarlo based UVE,MC-UVE,参见W-S Cai,Y–K Li,X-G Shao,A Variable selectionmethod based on uninformative variable elimination for multivariatecalibration of near-infrared spectra[J],Chemometr,Intell.Lab.Syst.2008,90,188-194)、遗传学算法(genetic algorithm,GA,参见Leardi R,Gonzalez AL,Geneticalgorithms applied to feature selection in PLS regression:how and when to usethem,Chemom Intell Lab Syst,1998,41,195-207)、随机蛙跳算法(Random Frog,RF,参见朱逢乐何勇邵咏妮应用近红外高光谱成像预测三文鱼肉的水分含量光谱学与光谱分析2015-1,113-117)、迭代保留有信息变量法(iteratively retains informativevariables IRIV,参见Yong-Huan Yun,Wei-Ting Wang,Min-Li Tan,Yi- Zeng Liang,Hong-Dong Li,Dong-Sheng Cao,Hong-Mei Lu,Qing-Song Xu,A strategy thatiteratively retains informative variables for selecting optimal variablesubset in multivariate calibration,Anal.Chim.Acta,2014,807,36-45)、竞争自适应重采样方法(CARS,参见H-D Li,Y-Z Liang,Q-S Xu,D-S Cao,Key wavelengths screeningusingcompetitive adaptive reweighted sampling method for multivariatecalibration,Anal.Chim.Acta,2009,648,77-84)、变量组合集群分析法(variablecombination population analysis VCPA,参见Yong-Huan Yun,Wei-Ting Wang,Bai-Chuan Deng,Guang-Bi Lai,Xin-Bo Liu,Da-Bing Ren,Yi-Zeng Liang,Wei Fan,Qing-Song Xu,Using variable combination population analysis for variable selectionin multivariate calibration,Anal.Chim Acta,2015,862,14-23)]等。
虽然以上几种方法在近红外领域被大量的运用,但是在科研实践中,由于所收集的样本数一般不可能太多,会出现样本少变量多的情况,而且会有大量的无信息变量和干扰变量夹入,所以上述几种变量选择方法不仅难以实现所有的变量组合,而且还会受到大量的无信息变量和干扰变量的影响。也是由于任何为建模收集的样本数总不足以完全表达总体信息,所以由上述几种只对变量空间进行采样的变量选择方法所得到的如变量重要性等参数会存在着很大的不确定性因素,样本产生波动势必会对变量的重要性分布产生一定的影响,这会影响模型的预测性能。
发明内容
为了克服现有技术的不足,本发明提出了基于蒙特卡洛变量组合集群的近红外光谱变量选择方法。该方法不仅通过BMS实现对变量空间的采样,同时还通过了MCS实现了对样本空间的采样,避免了样本集合变化对变量选择结果的影响。
具体步骤如下:
A运用蒙特卡洛采样方法对校正集样本进行随机采样,每次采样80%的样本作为样本子集,采样M次得到M组不同的样本子集,M值为50;
B针对每个样本子集首先运用二进制矩阵采样方法对其变量空间进行变量采样,采样K次得到K组不同的变量合集,K值为1000,运用偏最小二乘法建立每个变量合集的模型,得到每个变量合集的交互检验均方根误差;
C针对每个样本合集,选取其均方根误差最小的前θ×K组变量子集作为每个样本子集的变量子集,其中θ为10%,θ×K为100,统计每个变量子集中每个光谱变量出现的频率,运用指数衰减函数删除那些出现频率较小的变量;
D步骤B~步骤C过程迭代N次,N值为50,最后每个样本子集中只剩下L个光谱变量,L的数值为14,计算出每个样本子集中L个变量之间所有变量组合的均方根误差,其值最小的变量组合为每个样本子集的特征变量;
E保留所有样本子集中的特征变量,最后通过对所保留的变量重复二进制矩阵采样法变量采样、变量子集选取和指数衰减函数删除贡献小变量,此过程迭代N1次,N1值为200,最后剩余L个变量,计算出每个样本子集中L个变量之间所有变量组合的均方根误差,其值最小的变量组合为最终蒙特卡洛变量组合集群分析法特征变量选取结果。
步骤D中指数衰减函数变量删除的变量保留率计算公式为:
rN=e-θ×N (1)
rN:指数衰减函数运行N次时变量保留率;θ:曲线控制参数,它与指数衰减函数的执行次数有关,指数衰减函数执行的次数越多,其θ值越小。N
:指数衰减函数的执行次数,曲线控制参数的计算公式为:
公式(2)中P为指数衰减函数执行N-1次后所保留的变量数目,L为指数衰减函数运行结束之后剩余变量数目。
与目前国内外现有的变量选择方法相比,本发明同时实现了对样本空间和 变量空间的采样,极大的降低了模型对于收集样本数量的依赖性,克服了由于样本中的无信息变量和干扰变量加入影响模型预测稳定性的技术缺陷,避免了样本集合变化对变量选择结果的影响,显著提高了预测模型的稳定性和可靠性。
附图说明
下面结合附图及实施方式对本发明作进一步说明:
图1为蒙特卡洛变量组合集群分析法的算法流程图
图2为小麦近红外光谱图
图3为BMS采样次数与预测均方根误差分布图
图4为EDF采样次数与预测均方根误差分布图
图5为WTP-MC-VCPA-PLS模型预测集的预测值与实际值的散点图
具体实施方式
实施方案一:为了证明本发明的适用性,结合实例进行详细的说明。但是本发明也可以应用于本次所采用的实例之外的光谱数据。
图1是本发明提供的基于蒙特卡洛变量组合集群的近红外光谱变量选择方法(MC-VCPA)算法的流程图,可见,本发明具体包括以下步骤:
(1)本次研究所使用的93个小麦本和小麦蛋白化学数据来源于国家粮食局北京方孚德研究中心,运用德国卡尔蔡司的MCS611NIR光纤光谱仪每个小麦样本的近红外光谱,其光谱范围为950~1690nm,每个实验样品采集3条光,取其吸光度平均值。运用小波包(WTP)消除光谱中的噪声信号。本次研究所用的分类方法为Kennard-Stone(K-S)算法,运用K-S将93个小麦本分61个建模集本和32个集本,原始小麦近红外光谱图如图2所示。
(2)运用蒙特卡洛采样方法对校正集样本进行随机采样,每次采样80%的样本作为样本子集,采样50次得到50组不同的样本子集。
(3)针对每个样本子集首先运用二进制矩阵采样方法(BMS)对其变量空间进行变量采样,采样1000次得到1000组不同的变量子集。运用偏最小二乘法(PLS)建立每个变量子集的模型,得到每个变量子集的交互检验均方根误差(RMSECV)。
(4)针对每个样本子集,选取其RMSECV最小的前10%×1000组变量子集作为每个样本子集的优秀变量子集,统计每个优秀变量子集中每个光谱变量出现的频率,运用指数衰减函数(EDF)删除那些出现频率较小的变量保留率计算公式如下所示。
rN=e-θ×N (1)
rN:EDF运行N次时变量保留率;θ:曲线控制参数,它与EDF的执行次数有关,EDF执行的次数越多,其θ值越小。N:EDF的执行次数。曲线控制参数的计算公式为
上述公式中P为EDF执行N-1次后所保留的变量数目,L为EDF运行结束之后剩余变量数目。
(5)在步骤(3)~步骤(4)过程迭代50次,最后每个样本子集中只剩下14个光谱变量,计算出每个样本子集中14个变量之间所有变量组合的RMSECV,其值最小的变量组合为每个样本子集的特征变量。
(6)保留所有样本子集中的特征变量如图3,设置新的BMS采样参数和EDF迭代参数(BMS=200,EDF=200),最后通过对所保留的变量重复BMS变量采样、优秀变量子集选取和EDF删除贡献小变量,此过程迭代200次,最后剩余14个变量,计算出每个样本子集中14个变量之间所有变量组合的RMSECV,其值最小的变量组合为最终MC-VCPA的特征变量选取结果,最终选取的特征变量为954.51nm,1 002.71nm,1013.61nm,1118.38nm,1138.49nm,1148.45nm,1203.74nm,1229.12nm,1405.60nm,1612.50nm,其分布如图4所示。
(7)将MC-VCPA选取的特征变量结合PLS建立小麦蛋白质预测模型,预测集的实际值月真实值之间的散点图分布如图5所示。
为了验证本发明的优越性,将MC-VCPA与GA、RF、IRIV、CARS、MC–UVE、VCPA变量选择结果相对比,运用PLS建立小麦蛋白质含量预测模型,每种建模方法的结果如表1所示,
表1小麦蛋白质含量预测结果比较
本发明实施方式说明到此结束。

Claims (1)

1.基于蒙特卡洛变量组合集群的近红外光谱变量选择方法,其特征在于,包含以下步骤:
A运用蒙特卡洛采样方法对校正集样本进行随机采样,每次采样80%的样本作为样本子集,采样M次得到M组不同的样本子集,M值为50;
B针对每个样本子集首先运用二进制矩阵采样方法对其变量空间进行变量采样,采样K次得到K组不同的变量合集,K值为1000,运用偏最小二乘法建立每个变量合集的模型,得到每个变量合集的交互检验均方根误差;
C针对每个样本合集,选取其均方根误差最小的前θ×K组变量子集作为每个样本子集的变量子集,其中θ为10%,θ×K为100,统计每个变量子集中每个光谱变量出现的频率,运用指数衰减函数删除那些出现频率较小的变量;
D步骤B~步骤C过程迭代N次,N值为50,最后每个样本子集中只剩下L个光谱变量,L的数值为14,计算出每个样本子集中L个变量之间所有变量组合的均方根误差,其值最小的变量组合为每个样本子集的特征变量;
E保留所有样本子集中的特征变量,最后通过对所保留的变量重复二进制矩阵采样法变量采样、变量子集选取和指数衰减函数删除贡献小变量,此过程迭代N1次,N1值为200,最后剩余L个变量,计算出每个样本子集中L个变量之间所有变量组合的均方根误差,其值最小的变量组合为最终蒙特卡洛变量组合集群分析法特征变量选取结果。
CN201710373649.1A 2017-05-24 2017-05-24 基于蒙特卡洛变量组合集群的近红外光谱变量选择方法 Active CN107144548B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710373649.1A CN107144548B (zh) 2017-05-24 2017-05-24 基于蒙特卡洛变量组合集群的近红外光谱变量选择方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710373649.1A CN107144548B (zh) 2017-05-24 2017-05-24 基于蒙特卡洛变量组合集群的近红外光谱变量选择方法

Publications (2)

Publication Number Publication Date
CN107144548A CN107144548A (zh) 2017-09-08
CN107144548B true CN107144548B (zh) 2019-10-29

Family

ID=59780778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710373649.1A Active CN107144548B (zh) 2017-05-24 2017-05-24 基于蒙特卡洛变量组合集群的近红外光谱变量选择方法

Country Status (1)

Country Link
CN (1) CN107144548B (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110264050B (zh) * 2019-06-06 2021-05-25 北京农业质量标准与检测技术研究中心 农产品品质分析方法及分析仪

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9196009B2 (en) * 2009-06-22 2015-11-24 Johnson Controls Technology Company Systems and methods for detecting changes in energy usage in a building
CN103344600B (zh) * 2013-06-28 2015-06-03 中国农业大学 一种蚁群优化算法的近红外光谱特征波长选择方法

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
化学建模与模型集群分析;云永欢等;《分析化学》;20151115;第1640页 *
基于变量组合集群分析法的小麦蛋白质近红外光谱变量选择方法研究;赵环等;《长春理工大学学报(自然科学版)》;20161031;第39卷(第5期);全文 *

Also Published As

Publication number Publication date
CN107144548A (zh) 2017-09-08

Similar Documents

Publication Publication Date Title
Ye et al. Non-destructive prediction of protein content in wheat using NIRS
CN105203498A (zh) 一种基于lasso的近红外光谱变量选择方法
CN104062257A (zh) 一种基于近红外光谱测定溶液中总黄酮含量的方法
CN104089926B (zh) 用于鉴别稻米镉含量超标的nir光谱分析模型及鉴别方法
CN104062258B (zh) 一种采用近红外光谱快速测定复方阿胶浆中可溶性固形物的方法
Zhang et al. A novel variable selection method based on combined moving window and intelligent optimization algorithm for variable selection in chemical modeling
CN110361356A (zh) 一种提高小麦水分预测精度的近红外光谱变量选择方法
Li et al. A simple and nondestructive approach for the analysis of soluble solid content in citrus by using portable visible to near‐infrared spectroscopy
CN111504942A (zh) 一种提高牛奶中蛋白质预测精度的近红外光谱分析方法
CN105158200A (zh) 一种提高近红外光谱定性分析准确度的建模方法
Wang et al. Onsite nutritional diagnosis of tea plants using micro near-infrared spectrometer coupled with chemometrics
CN107144548B (zh) 基于蒙特卡洛变量组合集群的近红外光谱变量选择方法
Jun et al. SSC prediction of cherry tomatoes based on IRIV‐CS‐SVR model and near infrared reflectance spectroscopy
CN103743705A (zh) 一种假高粱及其近似物种的快速检测方法
Sun et al. An efficient variable selection method based on random frog for the multivariate calibration of NIR spectra
Wang et al. Extraction and classification of origin characteristic peaks from rice Raman spectra by principal component analysis
CN106950193B (zh) 基于自加权变量组合集群分析的近红外光谱变量选择方法
CN107036999A (zh) 一种基于近红外光谱及化学计量学的五元调和油定量分析方法
CN104020124B (zh) 基于吸收率择优的分光波长筛选方法
WO2023207453A1 (zh) 一种基于光谱聚类的中药成分分析方法及系统
Liu et al. Research on the online rapid sensing method of moisture content in famous green tea spreading
Wang et al. Monitoring model for predicting maize grain moisture at the filling stage using NIRS and a small sample size
CN112749466B (zh) 智能制造测量控制集成模型及其建立方法应用
Sun et al. A Progressive Combined variable selection method for Near-Infrared spectral analysis based on three-step Hybrid Strategy
Yu et al. A weighted ensemble method based on wavelength selection for near-infrared spectroscopic calibration

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant