CN107121407A - The method that near-infrared spectrum analysis based on PSO RICAELM differentiates Cuiguan pear maturity - Google Patents
The method that near-infrared spectrum analysis based on PSO RICAELM differentiates Cuiguan pear maturity Download PDFInfo
- Publication number
- CN107121407A CN107121407A CN201710408868.9A CN201710408868A CN107121407A CN 107121407 A CN107121407 A CN 107121407A CN 201710408868 A CN201710408868 A CN 201710408868A CN 107121407 A CN107121407 A CN 107121407A
- Authority
- CN
- China
- Prior art keywords
- maturity
- samples
- ricaelm
- model
- particle
- 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.)
- Granted
Links
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
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
- G06F18/2134—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on separation criteria, e.g. independent component analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/086—Learning methods using evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N2201/00—Features of devices classified in G01N21/00
- G01N2201/12—Circuits of general importance; Signal processing
- G01N2201/129—Using chemometrical methods
- G01N2201/1296—Using chemometrical methods using neural networks
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Biology (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Spectroscopy & Molecular Physics (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Computing Systems (AREA)
- Physiology (AREA)
- Computational Linguistics (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Molecular Biology (AREA)
- Biomedical Technology (AREA)
- Biochemistry (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Pathology (AREA)
- Immunology (AREA)
- Investigating Or Analysing Materials By Optical Means (AREA)
Abstract
本发明公开了一种基于PSO‑RICAELM的近红外光谱分析鉴别翠冠梨成熟度的方法,包括以下步骤:(1)收集样品,采集样品光谱,得到样品近红外漫反射光谱数据,对光谱数据进行二阶导数处理,并使用离散小波变换压缩原始近红外光谱数据;(2)将压缩后的光谱数据用稳健性独立分量分析对其进行分解,提取基本成分光谱矩阵和相应的近似浓度矩阵;(3)将近似浓度矩阵作为模型输入,对应的成熟度作为输出,用粒子群算法寻优,建立PSO‑RICAELM模型;(4)模型的质量评价,鉴别样品的成熟度。本发明能够快速鉴别翠冠梨成熟度,丰富了化学计量学方法,具有良好的应用前景。The invention discloses a method for identifying the maturity of Cuiguan pear based on PSO-RICAELM near-infrared spectrum analysis, comprising the following steps: (1) collecting samples, collecting sample spectra, obtaining sample near-infrared diffuse reflection spectrum data, and analyzing the spectral data Perform second-order derivative processing, and use discrete wavelet transform to compress the original near-infrared spectral data; (2) decompose the compressed spectral data with robust independent component analysis, and extract the basic component spectral matrix and the corresponding approximate concentration matrix; (3) The approximate concentration matrix is used as the model input, and the corresponding maturity is used as the output, and the PSO-RICAELM model is established by using the particle swarm optimization algorithm; (4) The quality evaluation of the model identifies the maturity of the sample. The invention can quickly identify the maturity of the Cuiguan pear, enriches the chemometric method, and has good application prospects.
Description
技术领域technical field
本发明涉及红外无损检测技术领域,尤其涉及一种PSO-RICAELM的近红外光谱分析鉴别翠冠梨成熟度的方法。The invention relates to the technical field of infrared non-destructive testing, in particular to a method for identifying the maturity of Cuiguan pears through PSO-RICAELM near-infrared spectrum analysis.
背景技术Background technique
现代近红外光谱分析法是一种快速无损的检测方法,其原理为对有机物中的含氢基团X-H的倍频合频产生吸收,通过化学计量方法测得有机物的理化指标,用有效的数学算法将理化指标与光谱建立函数关系,与传统的方法相比更加快速方便,节约时间,已经被广泛应用于多个方面的分析中。但是目前存在的基于近红外光谱分析的水果成熟度鉴别方法中,例如BP神经网络,在训练过程中会出现收敛速度慢,进入局部最小值而训练失败等情况;由于支持向量机(SVM)对大规模训练难以实施,所以,解决多分类有很大的困难,具有鲁棒性小等缺点。因此为解决建模所需样品基数大、训练时间久,不稳定等问题,急需一种普适性较强的模型,能有效的鉴别翠冠梨的成熟度。Modern near-infrared spectroscopy is a fast and non-destructive detection method. Its principle is to absorb the double frequency combination of hydrogen-containing groups X-H in organic matter. The physical and chemical indicators of organic matter are measured by stoichiometric methods. Effective mathematics The algorithm establishes a functional relationship between physical and chemical indicators and spectra, which is faster and more convenient than traditional methods, and saves time, and has been widely used in many aspects of analysis. However, in the currently existing fruit ripeness identification method based on near-infrared spectrum analysis, such as BP neural network, the convergence speed will be slow during the training process, and the training will fail when entering the local minimum; due to the support vector machine (SVM) Large-scale training is difficult to implement, so it is very difficult to solve multi-classification, and has disadvantages such as low robustness. Therefore, in order to solve the problems of large sample base required for modeling, long training time, instability, etc., a universal and strong model is urgently needed, which can effectively identify the maturity of Cuiguan pear.
传统的分解降维方法如PCA、SVD等,只能分解出不相关的各分量,并不能保证这些分量互相独立,这就缺少实际意义,降低了所提取特征的典型性。Traditional decomposition and dimensionality reduction methods such as PCA and SVD can only decompose irrelevant components, but cannot guarantee that these components are independent of each other, which lacks practical significance and reduces the typicality of the extracted features.
极限学习机(ELM)是一种新型的神经网络,随机给予输入层权值和隐含层偏差,但是这样容易造成模型泛化能力差,精度不够高。Extreme learning machine (ELM) is a new type of neural network, which randomly gives weights to the input layer and biases to the hidden layer, but this will easily lead to poor generalization ability and insufficient precision of the model.
发明内容Contents of the invention
本发明的目的在于针对现有技术的不足,提供一种基于PSO-RICAELM的近红外光谱分析鉴别翠冠梨成熟度的方法。ICA输出的是非高斯信号,提高了模型的准确率,本文所提出的稳健性独立分量分析算法是ICA的一种,减少了迭代次数并且有更快的收敛速度,可以提取出所有不为0的基本成分光谱矩阵。将经过稳健性独立分量分析算法处理的光谱作为输入到极限学习机网络中,得到RICAELM模型。本发明提出了粒子群算法优化RICAELM网络的输入层权值和隐含层偏差来提高模型的精度。The object of the present invention is to provide a method for identifying the maturity of Cuiguan pear based on PSO-RICAELM near-infrared spectrum analysis for the deficiencies in the prior art. The output of ICA is a non-Gaussian signal, which improves the accuracy of the model. The robust independent component analysis algorithm proposed in this paper is a kind of ICA, which reduces the number of iterations and has a faster convergence speed, and can extract all non-zero Basic composition spectral matrix. The spectrum processed by the robust independent component analysis algorithm is used as input to the extreme learning machine network to obtain the RICAELM model. The invention proposes a particle swarm algorithm to optimize the input layer weight and the hidden layer deviation of the RICAELM network to improve the accuracy of the model.
本发明是通过以下技术方案实现的:一种基于PSO-RICAELM的近红外光谱分析鉴别翠冠梨成熟度的方法,包括以下步骤:The present invention is achieved through the following technical solutions: a method for identifying the maturity of Cuiguan pear based on PSO-RICAELM near-infrared spectrum analysis, comprising the following steps:
(1)收集样品;在样品成熟期前一周开始采摘样品,每隔n(4<n<10)天采摘一次样品,至少采摘三次;用近红外光谱仪对样品进行多次扫描,多次扫描后取平均值,得到不同成熟度的样品近红外光谱;并对近红外光谱进行二阶导数和离散小波变换处理,得到压缩后的近红外光谱数据矩阵;(1) Collect samples; start picking samples one week before the sample maturity period, and pick samples every n (4<n<10) days, at least three times; scan the samples multiple times with a near-infrared spectrometer, and after multiple scans Taking the average value to obtain the near-infrared spectrum of samples with different maturity; and performing second derivative and discrete wavelet transform processing on the near-infrared spectrum to obtain the compressed near-infrared spectrum data matrix;
(2)将步骤(1)得到的压缩后的近红外光谱数据矩阵运用稳健性独立分量分析分解,得到近似浓度矩阵;建立校正集模型,将实际已知成熟度及近似浓度矩阵作为初始模型输入,得到RICAELM模型;用粒子群算法寻优RICAELM模型,得到最佳翠冠梨成熟度鉴别模型;(2) Decompose the compressed near-infrared spectrum data matrix obtained in step (1) using robust independent component analysis to obtain an approximate concentration matrix; establish a calibration set model, and use the actual known maturity and approximate concentration matrix as the initial model input , get the RICAELM model; optimize the RICAELM model with the particle swarm optimization algorithm, and get the best Cuiguan pear maturity identification model;
(3)将预测集样品的近似浓度矩阵输入最佳翠冠梨成熟度鉴别模型,得到预测集样品的成熟度。(3) Input the approximate concentration matrix of the prediction set samples into the best Cuiguan pear maturity identification model to obtain the maturity of the prediction set samples.
进一步的,所述步骤(1)具体实现如下:Further, the specific implementation of the step (1) is as follows:
在样品成熟期前一周开始采摘样品,每隔n(4<n<10)天采摘一次样品,至少采摘三次;使用近红外光谱仪对不同成熟度的样品进行扫描,得到样品的近红外光谱,将不同成熟度的样品随机分为校正集样品和预测集样品,其中,校正集样品用于模型训练,预测集样品用于模型的质量评价;将样品的近红外光谱进行二阶导数和离散小波变换处理,离散小波变换选择小波母函数为dbn,n为消失矩,得到压缩后的近红外光谱数据矩阵。Samples were picked one week before the sample maturity period, and samples were picked every n (4<n<10) days, at least three times; samples of different maturity were scanned with a near-infrared spectrometer, and the near-infrared spectra of the samples were obtained. Samples of different maturity are randomly divided into calibration set samples and prediction set samples, among which, the calibration set samples are used for model training, and the prediction set samples are used for model quality evaluation; the near-infrared spectra of samples are subjected to second derivative and discrete wavelet transform Processing, the discrete wavelet transform selects the wavelet mother function as dbn, n as the vanishing moment, and obtains the compressed near-infrared spectrum data matrix.
进一步的,所述步骤(2)具体实现如下:将处理后的数据作为输入进行稳健性独立分量分析运算,在光谱成分独立性的前提下,将光谱分解成不同的成分,输出是近似浓度矩阵。稳健性独立分量分析算法以峭度为对照函数,通过最优步长的寻找方法对峭度进行优化,得到所有峭度不为0的基本成分光谱矩阵和对应的近似浓度矩阵。将输出的非高斯型、包含绝大部分光谱特征的近似浓度矩阵输入到极限学习机网络中,得到RICAELM模型。Further, the specific implementation of the step (2) is as follows: the processed data is used as an input to perform a robust independent component analysis operation, and under the premise of independence of the spectral components, the spectrum is decomposed into different components, and the output is an approximate concentration matrix . The robust independent component analysis algorithm takes the kurtosis as the control function, and optimizes the kurtosis through the search method of the optimal step size, and obtains all basic component spectral matrices and corresponding approximate concentration matrices with kurtosis not equal to 0. Input the output non-Gaussian approximate concentration matrix containing most of the spectral features into the extreme learning machine network to obtain the RICAELM model.
进一步的,所述步骤(3)具体实现如下:将翠冠梨成熟度鉴别模型输入层与隐含层之间的连接权值和隐含层节点的偏置值作为粒子群搜索空间中的一个粒子,采用粒子群优化算法对粒子进行迭代寻优,设定粒子数m,产生种群,初始化PSO的粒子速度v、惯性权值w、学习因子c1和c2、最大迭代次数k,按照适应度函数计算粒子的适应度值,然后更新粒子的位置和速度,具体更新公式如下:Further, the specific implementation of the step (3) is as follows: the connection weight between the input layer and the hidden layer of the Cuiguan pear maturity identification model and the bias value of the hidden layer nodes are used as one of the particle swarm search space Particles, use the particle swarm optimization algorithm to iteratively optimize the particles, set the number of particles m, generate a population, initialize the particle velocity v, inertia weight w, learning factors c 1 and c 2 , and the maximum number of iterations k of the PSO, according to the adaptation The degree function calculates the fitness value of the particle, and then updates the position and velocity of the particle. The specific update formula is as follows:
vi(a+1)=vi(a)+c1r1[pbesti-xi(a)]+c2r2[gbest-xi(a)]v i (a+1)=v i (a)+c 1 r 1 [pbest i -x i (a)]+c 2 r 2 [gbest-x i (a)]
xi(a+1)=xi(a)+vi(a+1)x i (a+1)= xi (a)+v i (a+1)
其中,i是粒子(i=1、2…),xi(a+1)、vi(a+1)是第i个粒子的第a+1次迭代时的位置和速度,c1和c2学习因子,r1和r2是在[0,1]区间内均匀分布的随机数,vi、xi是第i个粒子第a次迭代速度和位置,pbesti是第i个粒子的个体最优位置,gbest是全局最优位置。where i is the particle (i=1, 2...), x i (a+1), v i (a+1) is the position and velocity of the i-th particle at the a+1-th iteration, c 1 and c 2 learning factor, r 1 and r 2 are random numbers uniformly distributed in the interval [0,1], v i , x i are the speed and position of the i-th particle in the a-th iteration, pbest i is the i-th particle The individual best position of gbest is the global best position.
当寻优满足寻优达到最大迭代次数k或评价值小于指定的精度b(b>0)时,搜索就结束,得到最优的输入权值和隐含层偏置,并赋值给RICAELM网络,得到最佳翠冠梨成熟度鉴别模型。When the optimization satisfies the optimization and reaches the maximum number of iterations k or the evaluation value is less than the specified accuracy b (b>0), the search ends, and the optimal input weight and hidden layer bias are obtained and assigned to the RICAELM network. The best identification model of Cuiguan pear maturity was obtained.
进一步的,所述步骤(3)中,极限学习机ELM隐含层激活函数选择Sigmoidal函数。Further, in the step (3), the extreme learning machine ELM hidden layer activation function selects the Sigmoidal function.
本发明的有益效果是:利用二阶导数,消除光谱的基线漂移和背景光干扰,提高光谱分辨率。利用离散小波变换,能压缩数据,节约成本空间,提高建模的效率和精度。利用稳健性独立分量分析算法,选取最优独立分量数建立校正模型;采用PSO-RICAELM算法建立模型,是一种分类精度更高、更稳定、泛化能力更好的模型,所建模型更具实际意义。整个测量过程不消耗化学试剂,测试快速,节省人力物力,批量测试时结果准确,大大提高检测效率。本方法可以在采摘、贮藏、运输、销售等环节推广使用。The beneficial effects of the invention are: the second-order derivative is used to eliminate the baseline drift of the spectrum and the background light interference, and improve the spectral resolution. The use of discrete wavelet transform can compress data, save cost and space, and improve the efficiency and accuracy of modeling. The robust independent component analysis algorithm is used to select the optimal number of independent components to establish a correction model; the PSO-RICAELM algorithm is used to establish a model, which is a model with higher classification accuracy, more stability, and better generalization ability. practical meaning. The whole measurement process does not consume chemical reagents, the test is fast, saves manpower and material resources, the result is accurate in batch testing, and the detection efficiency is greatly improved. The method can be popularized and used in links such as picking, storing, transporting and selling.
附图说明Description of drawings
图1为本发明成熟度方法流程图;Fig. 1 is a flowchart of the maturity method of the present invention;
图2为本发明四种不同成熟度的样品原始光谱图;Fig. 2 is the sample original spectrogram of four kinds of different maturities of the present invention;
具体实施方式detailed description
由于近红外光谱可以视作多种主要成分光谱的组合,近些年,有学者将“盲源分离(BBS)”问题引入近红外光谱分析方法中,将主要成分的光谱从复杂的混合光谱中分离出来。稳健性独立分量分析算法是一种基于峭度和最优步长的算法,为信号盲源分离提供了一种高效率的方法,主要优点在于可以选取最佳步长以及任何不为零的独立分量,适用于光谱的分解,可以提取光谱的典型特征。同时,ELM属于前馈神经网络,学习训练速度快,设置参数少,可以较大程度的减少人为误差。将经过稳健性独立分量分析算法处理后的光谱作为输入到ELM网络中,得到精度更高、更稳定的RICAELM模型。经过采用PSO寻优,RICAELM输入层权值和隐含层偏差选择最优输入,得到分类精度更高、更稳定、泛化能力更好的模型。Since the near-infrared spectrum can be regarded as a combination of multiple main component spectra, in recent years, some scholars have introduced the problem of "blind source separation (BBS)" into the near-infrared spectral analysis method, and the spectra of the main components are separated from the complex mixed spectrum. seperate. The robust independent component analysis algorithm is an algorithm based on kurtosis and optimal step size, which provides a high-efficiency method for signal blind source separation. The main advantage is that the optimal step size and any non-zero independent component Component, suitable for spectrum decomposition, can extract the typical features of the spectrum. At the same time, ELM is a feed-forward neural network, with fast learning and training speed and few setting parameters, which can greatly reduce human errors. The spectrum processed by the robust independent component analysis algorithm is input into the ELM network, and a RICAELM model with higher precision and stability is obtained. After adopting PSO optimization, RICAELM input layer weights and hidden layer deviations select the optimal input, and obtain a model with higher classification accuracy, more stability, and better generalization ability.
本发明采用了PSO-RICAELM结合的方法,使近红外光谱分析法可以有效的鉴别翠冠梨成熟度,丰富了化学计量方法并为近红外光谱分析领域中农作物成熟度鉴别提供了理论前提和技术支持。The present invention adopts the PSO-RICAELM combined method, so that the near-infrared spectral analysis method can effectively identify the maturity of Cuiguan pear, enriches the stoichiometric method and provides a theoretical premise and technology for the identification of crop maturity in the field of near-infrared spectral analysis support.
本发明提供了一种翠冠梨成熟度准确鉴别的近红外光谱分析法。下面结合附图1、附图2以及实施例对本发明进一步说明。实施例为本发明举例,并非对该发明限定。The invention provides a near-infrared spectroscopic analysis method for accurately identifying the maturity of Cuiguan pears. The present invention will be further described below in conjunction with accompanying drawing 1, accompanying drawing 2 and embodiment. The examples are examples of the present invention and are not intended to limit the present invention.
本发明的技术方案为,收集样品和采谱,对原始光谱预处理,首先用二阶导数对近红外光谱数据进行处理,其次用离散小波变换对近红外光谱数据进行有效压缩,得到数据量合适的矩阵,对该矩阵使用稳健性独立分量分析算法分解,提取基本成分光谱矩阵和相应的近似浓度矩阵,将近似浓度矩阵作为模型输入,通过粒子群寻优RICAELM建模。整个方案流程图如附图1所示。The technical scheme of the present invention is to collect samples and collect spectra, and to preprocess the original spectrum, first process the near-infrared spectrum data with the second order derivative, and then use the discrete wavelet transform to effectively compress the near-infrared spectrum data to obtain a suitable amount of data. The matrix is decomposed by the robust independent component analysis algorithm, the basic component spectral matrix and the corresponding approximate concentration matrix are extracted, the approximate concentration matrix is used as the model input, and the particle swarm optimization RICAELM model is used. The flow chart of the whole program is shown in Figure 1.
附图2是近红外光谱仪直接获取的原始光谱,不同成熟度翠冠梨的光谱存在差异,部分谱区交叠严重,这是因为翠冠梨的糖、酸等含量发生了变化,从而在近红外光谱的吸收上出现了区别,这是鉴别成熟度的基础,也说明鉴别翠冠梨成熟度是有意义的。利用二阶导数,能有效的消除基线漂移和其他干扰的影响。利用离散小波变换方法,压缩光谱数据,并去除光谱噪声,保留了光谱的主要信息且大大减小了数据量,此步骤需选择合理的小波函数及小波分解层数。Attached Figure 2 is the original spectrum directly acquired by the near-infrared spectrometer. There are differences in the spectra of Cuiguan pears at different maturity levels, and some spectral regions overlap seriously. There is a difference in the absorption of infrared spectrum, which is the basis for identifying the maturity, and it also shows that it is meaningful to identify the maturity of Cuiguan pear. Using the second order derivative can effectively eliminate the influence of baseline drift and other disturbances. Using the discrete wavelet transform method to compress the spectral data and remove the spectral noise, the main information of the spectrum is preserved and the amount of data is greatly reduced. This step needs to choose a reasonable wavelet function and wavelet decomposition layers.
稳健性独立分量分析算法用于分解小波压缩后数据。稳健性独立分量分析算法是盲源分离算法的一种,为信号盲源分离提供了一种高效率的方法,目的是将混合信号中的独立成分分离出来,该类算法的主要优点在于可以选取最佳步长以及任何不为零的独立分量,解决了盲源分离信号排序问题,提升了鲁棒性。用于光谱数据矩阵分解时,可以得到独立成分矩阵和相应的近似浓度矩阵。独立成分矩阵的每一行相当于一种统计独立成分的光谱信息,及混合物样品中的纯物质信息,是光谱的基本成分矩阵。与其对应的近似浓度矩阵反映了该物质在原始数据中所占比重,即该独立分量对整个样品近红外光谱的贡献。A robust independent component analysis algorithm is used to decompose the wavelet-compressed data. Robust independent component analysis algorithm is a kind of blind source separation algorithm, which provides a high-efficiency method for signal blind source separation, the purpose is to separate the independent components in the mixed signal, the main advantage of this type of algorithm is that it can choose The optimal step size and any non-zero independent components solve the problem of blind source separation signal ordering and improve robustness. When used for spectral data matrix decomposition, the independent component matrix and the corresponding approximate concentration matrix can be obtained. Each row of the independent component matrix is equivalent to the spectral information of a statistical independent component, and the pure substance information in the mixture sample, which is the basic component matrix of the spectrum. The corresponding approximate concentration matrix reflects the proportion of the substance in the original data, that is, the contribution of the independent component to the near-infrared spectrum of the entire sample.
PSO-RICAELM是粒子群寻优极限学习机网络。ELM属于前馈神经网络,学习训练速度快,设置参数少,可以较大程度的减少人为误差。将经过稳健性独立分量分析算法处理后的光谱作为输入到ELM网络中,得到精度更高、更稳定的RICAELM模型。RICAELM输入层权值和隐含层偏差随机输入,采用PSO寻优,得到分类精度更高、更稳定、泛化能力更好的模型。实施中,应用PSO-RICAELM算法,将隐含层神经元个数初始设定为10,并以d=2为步长依次增加至24,在各隐含神经元取值下重复训练15次,得到最佳模型的模型参数,从而获得最佳PSO-RICAELM模型。PSO-RICAELM is a particle swarm optimization extreme learning machine network. ELM is a feed-forward neural network with fast learning and training speed and few setting parameters, which can greatly reduce human errors. The spectrum processed by the robust independent component analysis algorithm is input into the ELM network, and a RICAELM model with higher precision and stability is obtained. RICAELM input layer weights and hidden layer deviations are randomly input, and PSO is used to optimize, and a model with higher classification accuracy, more stability, and better generalization ability is obtained. In the implementation, the PSO-RICAELM algorithm is applied, the number of neurons in the hidden layer is initially set to 10, and the number of neurons in the hidden layer is increased to 24 in turn with d=2 as the step size, and the training is repeated 15 times under the value of each hidden neuron. The model parameters of the best model are obtained to obtain the best PSO-RICAELM model.
实施例:Example:
1.样品收集与光谱采集1. Sample Collection and Spectrum Acquisition
试验样品来自某标准化果业园,在样品正常成熟期前一周开始采摘样品,挑选中等大小,色泽相近且无病虫害和机械损伤的翠冠梨36个,每隔6天采摘一次样品,共采摘四次样品;采摘的样品在当天内完成实验,用光谱仪对样品扫描三次取平均值;采谱完成后,得到四种不同成熟度的样品光谱共144条光谱数据,将所有数据用K/S算法按3:1数量比划分为校正集样品和预测集样品。光谱采集仪器是型号为MCS600的德国蔡司光谱仪。谱区采集范围:800nm-1700nm,实验均在室温下进行。实验中对每个样品3次不同位置的扫描,取其平均光谱。模型建立软件基于Matlab2015a进行。The test samples came from a standardized orchard. The samples were picked one week before the normal maturity period of the samples. 36 Cuiguan pears were selected with medium size, similar color and no pests and mechanical damage. The samples were picked every 6 days. Second sample; the picked sample completed the experiment within the same day, and the sample was scanned three times with a spectrometer to get the average value; after the spectrum collection was completed, a total of 144 spectral data of four samples with different maturity levels were obtained, and all the data were calculated using the K/S algorithm According to the ratio of 3:1, it is divided into calibration set samples and prediction set samples. The spectrum acquisition instrument is a German Zeiss spectrometer model MCS600. Spectrum area collection range: 800nm-1700nm, experiments are carried out at room temperature. In the experiment, each sample was scanned three times at different positions, and the average spectrum was taken. The modeling software is based on Matlab2015a.
2.光谱数据处理2. Spectral data processing
对采集到的光谱进行二阶导数处理,消除基线漂移和背景光的干扰。The second derivative processing is performed on the collected spectrum to eliminate the interference of baseline drift and background light.
对处理过的光谱进行离散小波变换,压缩数据。小波基函数选择db2,分解至4层,压缩后数据约占原数据量的7%,且压缩后数据包含了原始数据的大部分信息。Perform discrete wavelet transform on the processed spectrum to compress the data. The wavelet basis function chooses db2 and decomposes to 4 layers. The compressed data accounts for about 7% of the original data, and the compressed data contains most of the information of the original data.
用稳健性独立分量分析算法分解压缩后的矩阵。稳健性独立分量分析算法中需设置独立分量数,将独立分量数的初始值设为5,为找到最佳独立分量数,以1为步长依次将独立分量数增加至20,并进行分析,得到独立分量最优值为12。根据独立分量值,使用稳健性独立分量分析算法分解压缩后矩阵得到了基本成分光谱矩阵和对应的近似浓度矩阵The compressed matrix is decomposed using a robust independent component analysis algorithm. In the robust independent component analysis algorithm, the number of independent components needs to be set, and the initial value of the number of independent components is set to 5. In order to find the optimal number of independent components, the number of independent components is increased to 20 in steps of 1, and the analysis is carried out. The optimal value of the independent component is 12. According to the independent component values, the compressed matrix is decomposed using the robust independent component analysis algorithm to obtain the basic component spectral matrix and the corresponding approximate concentration matrix
3.建立PSO-RICAELM模型3. Establish PSO-RICAELM model
将四种翠冠梨的实际成熟度以及它们的近似浓度矩阵作为分析模型,使用PSO-RICAELM方法建立分析模型;在建立模型过程中,PSO的各参数如下:设定粒子数m=20,学习因子c1=1.5和c2=1.5、最大迭代次数k=200,最小精度b为0.01。应用PSO-RICAELM算法,将隐含层神经元个数初始设定为10,并以d=2为步长依次增加至24,在各隐含神经元取值下重复训练15次,得到最佳模型的模型参数,从而获得最佳PSO-RICAELM分析模型。The actual maturity of the four Cuiguan pears and their approximate concentration matrix are used as the analysis model, and the analysis model is established by using the PSO-RICAELM method; in the process of establishing the model, the parameters of the PSO are as follows: set the number of particles m=20, learn The factors c 1 =1.5 and c 2 =1.5, the maximum number of iterations k=200, and the minimum precision b is 0.01. Applying the PSO-RICAELM algorithm, the number of neurons in the hidden layer is initially set to 10, and the number of neurons in the hidden layer is increased to 24 in turn with d=2 as the step size, and the training is repeated 15 times under the value of each hidden neuron to obtain the best The model parameters of the model, so as to obtain the best PSO-RICAELM analysis model.
4.结果与分析4. Results and Analysis
采用正确识别率(CAR)为所建定性模型的评价指标:The correct recognition rate (CAR) is used as the evaluation index of the qualitative model:
正确识别率=正确识别的样本个数/应当被识别的总个数。Correct recognition rate = number of samples correctly recognized/total number of samples that should be recognized.
经验证,经粒子寻优后,模型预测能力增加,准确率从88.9%增加到94.4%,从而验证了PSO-RICAELM模型的正确性。It has been verified that after particle optimization, the prediction ability of the model increases, and the accuracy rate increases from 88.9% to 94.4%, thus verifying the correctness of the PSO-RICAELM model.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710408868.9A CN107121407B (en) | 2017-06-02 | 2017-06-02 | The method that near-infrared spectrum analysis based on PSO-RICAELM identifies Cuiguan pear maturity |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710408868.9A CN107121407B (en) | 2017-06-02 | 2017-06-02 | The method that near-infrared spectrum analysis based on PSO-RICAELM identifies Cuiguan pear maturity |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107121407A true CN107121407A (en) | 2017-09-01 |
CN107121407B CN107121407B (en) | 2019-07-23 |
Family
ID=59729542
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710408868.9A Expired - Fee Related CN107121407B (en) | 2017-06-02 | 2017-06-02 | The method that near-infrared spectrum analysis based on PSO-RICAELM identifies Cuiguan pear maturity |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107121407B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107796766A (en) * | 2017-10-18 | 2018-03-13 | 盐城工学院 | A kind of smelly pin salt place of production discrimination method, device and computer-readable recording medium |
CN108845075A (en) * | 2018-04-25 | 2018-11-20 | 南京农业大学 | Compost maturity real-time predicting method based on deep learning network |
CN109030378A (en) * | 2018-06-04 | 2018-12-18 | 沈阳农业大学 | Japonica rice canopy chlorophyll content inverse model approach based on PSO-ELM |
CN109884088A (en) * | 2019-03-21 | 2019-06-14 | 杭州立宸科技有限公司 | Fruit maturity compartment intelligent checking system and detection method |
CN111929285A (en) * | 2020-08-11 | 2020-11-13 | 安徽理工大学 | Spectral identification method for alcohol doped in laser-induced fluorescent red wine |
CN113569470A (en) * | 2021-07-16 | 2021-10-29 | 西安工业大学 | Fruit and vegetable respiration rate model parameter estimation method based on improved particle swarm optimization |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101866424A (en) * | 2010-05-20 | 2010-10-20 | 复旦大学 | Method of Decomposing Mixed Pixels of Hyperspectral Remote Sensing Image Based on Independent Component Analysis |
CN104200268A (en) * | 2014-09-03 | 2014-12-10 | 辽宁大学 | PSO (Particle Swarm Optimization) extremity learning machine based strip steel exit thickness predicting method |
CN104463251A (en) * | 2014-12-15 | 2015-03-25 | 江苏科技大学 | Cancer gene expression profile data identification method based on integration of extreme learning machines |
-
2017
- 2017-06-02 CN CN201710408868.9A patent/CN107121407B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101866424A (en) * | 2010-05-20 | 2010-10-20 | 复旦大学 | Method of Decomposing Mixed Pixels of Hyperspectral Remote Sensing Image Based on Independent Component Analysis |
CN104200268A (en) * | 2014-09-03 | 2014-12-10 | 辽宁大学 | PSO (Particle Swarm Optimization) extremity learning machine based strip steel exit thickness predicting method |
CN104463251A (en) * | 2014-12-15 | 2015-03-25 | 江苏科技大学 | Cancer gene expression profile data identification method based on integration of extreme learning machines |
Non-Patent Citations (2)
Title |
---|
付建华 等: "基于稀疏主成分分析的近红外光谱法鉴别黄花梨的成熟度", 《理化检验-化学分册》 * |
吴微 等: "FastICA和RobustICA算法在盲源分离中的性能分析", 《计算机应用研究》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107796766A (en) * | 2017-10-18 | 2018-03-13 | 盐城工学院 | A kind of smelly pin salt place of production discrimination method, device and computer-readable recording medium |
CN108845075A (en) * | 2018-04-25 | 2018-11-20 | 南京农业大学 | Compost maturity real-time predicting method based on deep learning network |
CN108845075B (en) * | 2018-04-25 | 2021-06-29 | 南京农业大学 | Real-time prediction method of compost maturity based on deep learning network |
CN109030378A (en) * | 2018-06-04 | 2018-12-18 | 沈阳农业大学 | Japonica rice canopy chlorophyll content inverse model approach based on PSO-ELM |
CN109884088A (en) * | 2019-03-21 | 2019-06-14 | 杭州立宸科技有限公司 | Fruit maturity compartment intelligent checking system and detection method |
CN111929285A (en) * | 2020-08-11 | 2020-11-13 | 安徽理工大学 | Spectral identification method for alcohol doped in laser-induced fluorescent red wine |
CN113569470A (en) * | 2021-07-16 | 2021-10-29 | 西安工业大学 | Fruit and vegetable respiration rate model parameter estimation method based on improved particle swarm optimization |
CN113569470B (en) * | 2021-07-16 | 2024-04-05 | 西安工业大学 | Fruit and vegetable respiration rate model parameter estimation method based on improved particle swarm optimization |
Also Published As
Publication number | Publication date |
---|---|
CN107121407B (en) | 2019-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107121407B (en) | The method that near-infrared spectrum analysis based on PSO-RICAELM identifies Cuiguan pear maturity | |
CN101915744B (en) | Near infrared spectrum nondestructive testing method and device for material component content | |
CN110243806B (en) | Mixture component identification method based on similarity under Raman spectrum | |
WO2018010352A1 (en) | Qualitative and quantitative combined method for constructing near infrared quantitative model | |
CN107247033B (en) | The method of identifying the maturity of Huanghua pear based on the fast decay elimination algorithm and PLSDA | |
CN106706546A (en) | An Artificial Intelligence Learning Substance Analysis Method Based on Infrared and Raman Spectral Data | |
CN108734205A (en) | A kind of simple grain for different cultivars wheat seed pinpoints identification technology | |
CN114216877B (en) | Method and system for automatic detection and reconstruction of spectral peaks in near-infrared spectral analysis of tea | |
CN105117734B (en) | Corn seed classification hyperspectral imagery recognition methods based on model online updating | |
CN109060771B (en) | A Consensus Model Construction Method Based on Different Spectral Feature Sets | |
CN108037081A (en) | A kind of vinifera maturity monitoring method and system | |
CN114295578B (en) | Tobacco leaf conventional chemical composition general model modeling method based on near infrared spectrum | |
CN105486655A (en) | Rapid detection method for organic matters in soil based on infrared spectroscopic intelligent identification model | |
CN106248621A (en) | A kind of evaluation methodology and system | |
CN114067169A (en) | A Raman Spectral Analysis Method Based on Convolutional Neural Network | |
CN116519661A (en) | A rice recognition and detection method based on convolutional neural network | |
CN116385784A (en) | Method and system for measuring and calculating chlorophyll content of rice under cadmium stress | |
CN114113471A (en) | Method and system for detecting food freshness of artificial nose refrigerator based on machine learning | |
CN112926625A (en) | Method for analyzing deviation influence factors of satellite radiation data | |
CN116297239A (en) | A Hyperspectral Inversion Method for Soil Organic Matter Content | |
CN106126879B (en) | A kind of soil near-infrared spectrum analysis prediction technique based on rarefaction representation technology | |
CN112801172B (en) | Chinese cabbage pesticide residue qualitative analysis method based on fuzzy pattern recognition | |
CN117556245B (en) | Method for detecting filtered impurities in tetramethylammonium hydroxide production | |
CN108663334A (en) | The method for finding soil nutrient spectral signature wavelength based on multiple Classifiers Combination | |
CN105651727B (en) | The method that near-infrared spectrum analysis based on JADE and ELM differentiates apple shelf life |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190723 |