CN113418892A - 一种快速无损鉴别黄骅冬枣的方法 - Google Patents
一种快速无损鉴别黄骅冬枣的方法 Download PDFInfo
- Publication number
- CN113418892A CN113418892A CN202110700221.XA CN202110700221A CN113418892A CN 113418892 A CN113418892 A CN 113418892A CN 202110700221 A CN202110700221 A CN 202110700221A CN 113418892 A CN113418892 A CN 113418892A
- Authority
- CN
- China
- Prior art keywords
- yellow
- winter jujube
- sample
- near infrared
- winter
- 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.)
- Pending
Links
- 241001247821 Ziziphus Species 0.000 title claims abstract description 67
- 238000000034 method Methods 0.000 title claims abstract description 25
- 238000001228 spectrum Methods 0.000 claims abstract description 28
- 238000002329 infrared spectrum Methods 0.000 claims abstract description 25
- 238000009499 grossing Methods 0.000 claims abstract description 14
- 238000007781 pre-processing Methods 0.000 claims abstract description 13
- 238000002790 cross-validation Methods 0.000 claims abstract description 11
- 230000003595 spectral effect Effects 0.000 claims abstract description 7
- 230000008030 elimination Effects 0.000 claims abstract description 5
- 238000003379 elimination reaction Methods 0.000 claims abstract description 5
- 239000007787 solid Substances 0.000 claims description 4
- 238000004422 calculation algorithm Methods 0.000 claims description 3
- 238000009795 derivation Methods 0.000 claims description 3
- 238000005457 optimization Methods 0.000 claims description 3
- 238000012795 verification Methods 0.000 claims 3
- 238000012706 support-vector machine Methods 0.000 abstract description 15
- 238000012360 testing method Methods 0.000 description 14
- 238000004519 manufacturing process Methods 0.000 description 6
- 238000000862 absorption spectrum Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000010187 selection method Methods 0.000 description 2
- 239000002253 acid Substances 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000007635 classification algorithm Methods 0.000 description 1
- 238000013145 classification model Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/31—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
- G01N21/35—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
- G01N21/359—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/15—Correlation function computation including computation of convolution operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Pure & Applied Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Optimization (AREA)
- Mathematical Analysis (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Computational Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Algebra (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- Software Systems (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- Investigating Or Analysing Materials By Optical Means (AREA)
- Spectrometry And Color Measurement (AREA)
Abstract
本发明提供了一种快速无损鉴别黄骅冬枣的方法,包括:a、采集包括黄骅冬枣在内的不同产地冬枣样本的近红外光谱;b、对不同产地样本的近红外光谱进行SG平滑+一阶导数预处理;c、应用支持向量机‑递归特征消除交叉验证提取特征波长,建立特征光谱数据集;d、利用特征光谱数据集训练支持向量机(SVM),建立SVM黄骅冬枣鉴别模型;e、未知产地样本的近红外光谱经过SG平滑+一阶导数预处理后,提取特征波长下的光谱数据,代入SVM黄骅冬枣鉴别模型,依据预测结果判断是否为黄骅冬枣。本发明提出的光谱预处理、特征波长选择、建立模型相组合的方法,操作简单,可以有效地鉴别黄骅冬枣。
Description
技术领域
本发明涉及冬枣地理标志保护技术领域,具体涉及一种快速无损鉴别黄骅冬枣的方法。
背景技术
河北省黄骅市种植冬枣已有3000年的历史,被誉为“中国冬枣之乡”,黄骅冬枣果皮薄、果肉厚、果核小、糖酸比高、固体渣少,历史上曾作为皇家贡品,被誉为“全国260余个鲜食枣品之冠”。黄骅冬枣在2002年06月12日被原国家质检总局批准为冬枣原产地保护品种(国家质量监督检验检疫总局公告2002年第50号)实施原产地保护,以确保黄骅冬枣的可追溯性,是中国第一个获得“原产地保护”的果品,是国家地理标志保护产品。据黄骅市林业局数据,黄骅冬枣年产量已达1亿公斤,但市场上假冒现象损害了消费者和生产者的利益,扰乱了市场秩序,需要建立一种快速无损的鉴别方法。
近红外光谱是物质在波长780-2500nm(4000~12800cm-1)的电磁波,是一种分子吸收光谱。近红外光谱技术分析具有方便、快速、成本低、无损、无污染等优点,为此我们设计出了一种应用近红外光谱技术来实现快速无损地鉴别黄骅冬枣的方法。
发明内容
本发明的目的在于提供一种快速无损鉴别黄骅冬枣的方法,以解决现有技术中无法快速鉴别黄骅冬枣的问题。
本发明的目的是通过以下技术方案实现的:一种快速无损鉴别黄骅冬枣的方法,包括以下步骤:
a、采集包括黄骅冬枣在内的不同产地冬枣样本,利用近红外光谱仪采集样本的近红外光谱,建立冬枣样本近红外光谱数据集;
b、对近红外光谱进行SG平滑和一阶导数预处理;
c、应用支持向量机-递归特征消除交叉验证(SVM-RFECV)对预处理光谱进行特征选择,确定黄骅冬枣特征波长,建立特征光谱数据集;
d、应用特征光谱数据集训练SVM算法,建立SVM黄骅冬枣鉴别模型;
e、未知产地样本的近红外光谱经过SG平滑+一阶导数预处理后,提取特征波长下的光谱数据,代入SVM黄骅冬枣鉴别模型,依据预测结果判断是否为黄骅冬枣。
步骤a中,黄骅冬枣样本数量不少于30个,其他产地冬枣样品数量不少于70个。
步骤a中,扫描温度保持在25℃,空气湿度保持在50%的条件下扫描冬枣样本的近红外光谱,扫描波数范围为4000-9000cm-1,分辨率8cm-1,采用聚焦不旋转固体漫反射模式,将每颗冬枣样本沿着径向划分5个区域,进行5次光谱采集,取平均值作为该样品的光谱,进行光谱数据记录及导出。
步骤b中,应用The Unscrambler 10.4软件,对近红外光谱进行SG平滑+一阶导数预处理(使用2阶多项式和17点平滑)。
步骤c中,应用Python平台sklearn库下,preprocessing模块的StandardScaler类对数据进行标准化处理,应用feature_selection模块的RFECV类,estimator估计函数使用sklearn库SVM模块中的SVC类,其中SVC使用线性核函数linear;应用sklearn库model_selection模块下的LeaveOneOut类交叉验证进行参数寻优,获得特征光谱数据集。
步骤c中,黄骅冬枣特征的特征波长为:
8841cm-1、8501cm-1、8386cm-1、8378cm-1、8370cm-1、8139cm-1、8131cm-1、8123cm-1、7984cm-1、7236cm-1、7221cm-1、6858cm-1、6850cm-1、6843cm-1、6835cm-1、6580cm-1、6573cm-1、6565cm-1、6550cm-1、6349cm-1、6341cm-1、6326cm-1、6318cm-1、6310cm-1、5902cm-1、5701cm-1、5693cm-1、5423cm-1、5416cm-1、5277cm-1、4945cm-1、4937cm-1、4930cm-1、4675cm-1、4444cm-1、4436cm-1、4428cm-1。
步骤e中,按照步骤a的方法获得未知样品特征光谱数据,进行标准化处理后进行测试。
对未知样本,作为测试集数据输入到模型中,使用Python平台sklearn库下predict函数得到预测结果,即确定其是否为黄骅冬枣。
SVM-RFECV特征选择后建立的SVM模型,对于黄骅冬枣的鉴别正确率达到了97.7%,是一种有效的近红外光谱特征波长选择方法和产地鉴别方法。
附图说明
图1为近红外光谱仪测得145个冬枣样本的4000~9000cm-1范围的原始光谱图。
图2为SG+一阶导数预处理光谱图。
具体实施方式
下面通过具体实施例对本发明进行详细说明,实施例中未提及的技术特征均为本领域惯用技术手段。
采用基于SG平滑法+一阶导数光谱预处理、支持向量机-递归特征消除交叉验证SVM-RFECV特征选择算法,建立支持向量机SVM分类识别模型进行定性鉴别,具体步骤包括如下:
S1:采集各产地的冬枣样本,利用布鲁克傅立叶变换MPA型近红外光谱分析仪采集其近红外光谱,建立一个包括黄骅冬枣和其他产地冬枣的近红外光谱数据库(黄骅冬枣样本数量不少于30个,其他产地冬枣样品数量不少于70个);在室温~25℃,空气湿度~50%的条件下扫描冬枣样本的近红外吸收光谱,扫描波数范围为4000-9000cm-1,分辨率8cm-1,采用聚焦不旋转固体漫反射模式,将每颗冬枣样本沿着径向划分5个区域,进行5次光谱采集,OPUS软件取平均值作为该样品的光谱,进行光谱数据记录及导出,冬枣样品的原始光谱图见图1所示。
S2:建立一个基于SG平滑+一阶导数光谱预处理、SVM-RFECV特征选择和SVM分类算法的冬枣产地分类模型。在本发明实施例中,S2包括以下步骤:
S21:应用Python平台sklearn库model_selection模块的train_test_split类,随机对数据集进行拆分,分为训练集和测试集(比例7:3),分别包含101个样本和44个样本,其中训练集样本中包含30个黄骅冬枣样本和71个非黄骅冬枣样本,测试集样本中包含15个黄骅样本和29个非黄骅样本,如表1所示。
表1:
S22:应用The Unscrambler 10.4软件,对训练集和测试集近红外光谱分别进行SG+一阶导数预处理(使用2阶多项式和17点平滑),得到训练集和测试集的预处理光谱,处理后的训练集光谱图见图2。
S23:支持向量机-递归特征消除交叉验证(SVM-RFECV)特征选择
对训练集数据,应用Python平台sklearn库下,preprocessing模块的StandardScaler类对数据进行标准化;feature_selection模块的RFECV类,estimator估计函数使用sklearn库SVM模块中的SVC类,其中SVC使用线性核函数linear;应用sklearn库model_selection模块下的LeaveOneOut类交叉验证进行参数寻优,得到冬枣近红外光谱特征波长(cm-1)为:
8841cm-1、8501cm-1、8386cm-1、8378cm-1、8370cm-1、8139cm-1、8131cm-1、8123cm-1、7984cm-1、7236cm-1、7221cm-1、6858cm-1、6850cm-1、6843cm-1、6835cm-1、6580cm-1、6573cm-1、6565cm-1、6550cm-1、6349cm-1、6341cm-1、6326cm-1、6318cm-1、6310cm-1、5902cm-1、5701cm-1、5693cm-1、5423cm-1、5416cm-1、5277cm-1、4945cm-1、4937cm-1、4930cm-1、4675cm-1、4444cm-1、4436cm-1、4428cm-1。
S24:在Python平台sklearn库下,preprocessing模块的StandardScaler类对训练集数据进行标准化处理,model_selection模块下的LeaveOneOut类交叉验证进行参数寻优,对训练集的特征光谱数据集,建立黄骅冬枣特征光谱的SVM鉴别模型;
S3:应用sklearn库model_selection模块下的cross_val_score类得到模型的交叉验证分类正确率。
S4:应用测试集数据来检验模型对未知数据的预测能力。对测试集数据,应用Python平台sklearn库下,preprocessing模块的StandardScaler类进行标准化处理后,使用测试集的特征光谱数据集测试模型的性能,得到测试集的分类正确率。通过训练集交叉验证分类正确率和测试集的分类正确率来评价模型的效果。
下表2为使用特征波长的模型效果。
表2:
SVM-RFECV特征选择后建立的SVM黄骅冬枣鉴别模型,在测试集上的分类正确率为97.7%,是一种有效的特征波长选择方法和产地鉴别方法。
Claims (8)
1.一种快速无损鉴别黄骅冬枣的方法,其特征在于,包括以下步骤:
a、采集包括黄骅冬枣在内的不同产地冬枣样本,利用近红外光谱仪采集样本的近红外光谱,建立冬枣样本近红外光谱数据集;
b、对近红外光谱进行SG平滑和一阶导数预处理;
c、应用支持向量机-递归特征消除交叉验证对预处理光谱进行特征选择,确定黄骅冬枣特征波长,建立特征光谱数据集;
d、应用特征光谱数据集训练SVM 算法,建立SVM黄骅冬枣鉴别模型;
e、未知产地样本的近红外光谱经过SG平滑+一阶导数预处理后,提取特征波长下的光谱数据,代入SVM黄骅冬枣鉴别模型,依据预测结果判断是否为黄骅冬枣。
2.根据权利要求1所述的方法,其特征在于,步骤a中,黄骅冬枣样本数量不少于30个,其他产地冬枣样品数量不少于70个。
3.根据权利要求1所述的方法,其特征在于,步骤a中,扫描温度保持在25℃,空气湿度保持在50%的条件下扫描冬枣样本的近红外光谱,扫描波数范围为4000-9000cm-1,分辨率8cm-1,采用聚焦不旋转固体漫反射模式,将每颗冬枣样本沿着径向划分5个区域,进行5次光谱采集,取平均值作为该样品的光谱,进行光谱数据记录及导出。
4.根据权利要求1所述的方法,其特征在于,步骤b中,对近红外光谱进行SG平滑+一阶导数预处理,使用2阶多项式和17点平滑。
5.根据权利要求1所述的方法,其特征在于,步骤c中,对每个特征波长下的数据进行标准化处理,使每个特征中数据的均值为0,标准差为1;应用Python平台feature_selection模块的 RFECV类,estimator估计函数使用sklearn库SVM 模块中的SVC类,其中SVC使用线性核函数linear;应用Python平台sklearn库model_selection模块下的 LeaveOneOut类留一法交叉验证进行参数寻优,确定黄骅冬枣的特征波长,建立特征光谱数据集;留一法交叉验证的过程为:将样本数量为N的数据集,每个样本作为验证集,其余的N-1个样本子集作为训练集;将每个样本轮流作为验证集,交叉重复N次,用N次结果的平均值作为分类器或模型的性能指标。
6.根据权利要求1所述的方法,其特征在于,步骤c中,确定的黄骅冬枣特征波长为:
8841cm-1、8501cm-1、8386cm-1、8378cm-1、8370cm-1、8139cm-1、8131cm-1、8123cm-1、7984cm-1、7236cm-1、7221cm-1、6858cm-1、6850cm-1、6843cm-1、6835cm-1、6580cm-1、6573 cm-1、6565cm-1、6550cm-1、6349cm-1、6341cm-1、6326cm-1、6318cm-1、6310cm-1、5902cm-1、5701cm-1、5693cm-1、5423cm-1、5416cm-1、5277cm-1、4945cm-1、4937cm-1、4930cm-1、4675cm-1、4444cm-1、4436cm-1、4428cm-1。
7.根据权利要求1所述的方法,其特征在于,步骤e中,未知样本的近红外光谱数据,经SG平滑+一阶导数预处理后,提取黄骅冬枣特征波长下的光谱数据,进行标准化处理,建立未知样本的特征波长数据集。
8.根据权利要求1所述的方法,其特征在于,步骤e中,将未知样本的特征波长数据集代入到SVM模型中,得到其产地预测结果,即确定其是否为黄骅冬枣。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110700221.XA CN113418892A (zh) | 2021-06-23 | 2021-06-23 | 一种快速无损鉴别黄骅冬枣的方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110700221.XA CN113418892A (zh) | 2021-06-23 | 2021-06-23 | 一种快速无损鉴别黄骅冬枣的方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113418892A true CN113418892A (zh) | 2021-09-21 |
Family
ID=77717539
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110700221.XA Pending CN113418892A (zh) | 2021-06-23 | 2021-06-23 | 一种快速无损鉴别黄骅冬枣的方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113418892A (zh) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007016814A1 (en) * | 2005-08-11 | 2007-02-15 | Intel Corporation | A recursive feature eliminating method based on a support vector machine |
WO2013148656A1 (en) * | 2012-03-27 | 2013-10-03 | Innovative Science Tools, Inc. | Optical analyzer for identification of materials using transmission spectroscopy |
CN106560697A (zh) * | 2016-10-20 | 2017-04-12 | 中国计量大学 | 联合近红外光谱和微量元素的武夷岩茶产地鉴别方法 |
-
2021
- 2021-06-23 CN CN202110700221.XA patent/CN113418892A/zh active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007016814A1 (en) * | 2005-08-11 | 2007-02-15 | Intel Corporation | A recursive feature eliminating method based on a support vector machine |
WO2013148656A1 (en) * | 2012-03-27 | 2013-10-03 | Innovative Science Tools, Inc. | Optical analyzer for identification of materials using transmission spectroscopy |
CN106560697A (zh) * | 2016-10-20 | 2017-04-12 | 中国计量大学 | 联合近红外光谱和微量元素的武夷岩茶产地鉴别方法 |
Non-Patent Citations (7)
Title |
---|
M.戈帕尔(M.GOPAL): "《机器学习及其应用》", 30 April 2020 * |
但松健: ""基于机器学习的 NIR 光谱柑橘产地鉴别框架"", 《重庆第二师范学院学报》 * |
孙 聪: "面向数字货币特征的细粒度代码注入攻击检测"", 《计算机研究与发展》 * |
张晓瑜等: "近红外光谱技术鉴别地理标志产品黄骅冬枣", 《食品工业科技》 * |
梁龙: ""基于支持向量机的近红外特征变量选择算法用于树种快速识别"", 《分析测试学报》 * |
王彬蓉: ""基于EMD自适应重构的心音信号特征筛选及分类"", 《航天医学与医学工程》 * |
聂鹏: ""刀具磨损监测技术研究现状与进展"", 《工具技术》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Martelo‐Vidal et al. | Ultraviolet/visible/near‐infrared spectral analysis and chemometric tools for the discrimination of wines between subzones inside a controlled designation of origin: a case study of R ías B aixas | |
CN108844917A (zh) | 一种基于显著性假设检验和偏最小二乘法的近红外光谱数据分析方法 | |
CN101738373A (zh) | 一种鉴别作物种子品种的方法 | |
CN107478599B (zh) | 一种饲料原料中非法添加物三聚氰胺甲醛树脂的检测方法 | |
CN106596513A (zh) | 一种基于激光诱导击穿光谱茶叶品种识别方法 | |
CN104020128A (zh) | 一种快速鉴别蜂胶胶源的方法 | |
Porep et al. | Implementation of an on‐line near infrared/visible (NIR/VIS) spectrometer for rapid quality assessment of grapes upon receival at wineries | |
CN112098361A (zh) | 一种基于近红外光谱的玉米种子鉴别方法 | |
CN113310930A (zh) | 高温灭菌奶、巴氏杀菌奶和掺加高温灭菌奶的巴氏杀菌奶的光谱鉴定方法 | |
CN112485238B (zh) | 一种基于拉曼光谱技术鉴别姜黄精油产地的方法 | |
Pereira et al. | Modelling the ageing process: A novel strategy to analyze the wine evolution towards the expected features | |
Cavaglia et al. | Early detection of undesirable deviations in must fermentation using a portable FTIR‐ATR instrument and multivariate analysis | |
Wu et al. | Discrimination of Chinese rice wines of different geographical origins by UV–vis spectroscopy and chemometrics | |
CN111398208B (zh) | 一种利用近红外技术对传统工艺翡翠进行快速鉴定的方法 | |
Shen et al. | Discrimination of blended Chinese rice wine ages based on near-infrared spectroscopy | |
CN113418892A (zh) | 一种快速无损鉴别黄骅冬枣的方法 | |
CN106940292A (zh) | 基于多光谱成像技术的虫蛀巴旦木原料快速无损鉴别方法 | |
CN113406037B (zh) | 一种基于序列前向选择的红外光谱在线快速识别分析方法 | |
CN114062305B (zh) | 基于近红外光谱和1D-In-Resnet网络的单籽粒品种鉴定方法及系统 | |
CN105606563A (zh) | 一种基于高斯过程的近红外光谱煤挥发分快速检测方法 | |
CN113310933A (zh) | 原料水牛奶保存天数的光谱鉴定方法 | |
CN111595802A (zh) | 一种基于nir光谱的忧遁草种源地分类模型的构建方法及应用 | |
CN117629970A (zh) | 一种基于激光诱导击穿光谱的茶叶与茶水数据融合分类鉴别方法 | |
JPH11258161A (ja) | 樹木の成分等の定量方法、装置及び定量方法のプログラム記録媒体 | |
CN109272030A (zh) | 基于光纤光谱技术的苹果表面早期损伤快速无损识别方法 |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210921 |
|
RJ01 | Rejection of invention patent application after publication |