CN113984946A - Crayfish freshness detection method based on gas phase electronic nose and machine learning - Google Patents
Crayfish freshness detection method based on gas phase electronic nose and machine learning Download PDFInfo
- Publication number
- CN113984946A CN113984946A CN202111228666.9A CN202111228666A CN113984946A CN 113984946 A CN113984946 A CN 113984946A CN 202111228666 A CN202111228666 A CN 202111228666A CN 113984946 A CN113984946 A CN 113984946A
- Authority
- CN
- China
- Prior art keywords
- chromatogram
- crayfish
- electronic nose
- peak height
- phase electronic
- 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
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N30/00—Investigating or analysing materials by separation into components using adsorption, absorption or similar phenomena or using ion-exchange, e.g. chromatography or field flow fractionation
- G01N30/02—Column chromatography
- G01N30/86—Signal analysis
- G01N30/8675—Evaluation, i.e. decoding of the signal into analytical information
-
- 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/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- 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/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
-
- 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/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- 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/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- 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/04—Architecture, e.g. interconnection topology
- G06N3/049—Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
-
- 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/084—Backpropagation, e.g. using gradient descent
Abstract
The invention discloses a crayfish freshness detection method based on a gas-phase electronic nose and machine learning, which comprises the steps of placing a crayfish sample in a beaker, sealing the sample by using a double-layer preservative film, and standing and headspace; preheating an ultra-fast gas phase electronic nose instrument, and inserting a sample injection needle into a beaker for sampling to obtain a chromatogram; normalizing the maximum value and the minimum value of the peak height of the chromatogram; preprocessing the baseline data of the peak height, and eliminating the label noise of the chromatogram by using belief learning; performing feature extraction on the chromatogram by using a sequence model to obtain the trend features of the chromatogram with different freshness and odor changes; extracting the content characteristics of the volatile compounds corresponding to each retention time through a multilayer perceptron according to the chromatogram trend characteristics, and splicing the chromatogram trend characteristics and the content characteristics of the volatile compounds; performing feature classification by using the spliced features of the feedforward neural network; the method can accurately obtain the odor information of the crayfishes with different freshness, and realizes the accurate classification of the freshness of the crayfishes.
Description
Technical Field
The invention relates to the technical field of crayfish freshness detection, in particular to a crayfish freshness detection method based on a gas phase electronic nose and machine learning.
Background
Crayfish, also known as procambarus clarkii, is one of the important freshwater economic aquatic products in China. The crayfish is popular with consumers because of its tender meat, delicious taste and rich nutrition. In recent years, the crayfish industry in China is rapidly developed, the breeding area and the breeding yield are rapidly increased, and the total breeding yield of the crayfish in China reaches 239.37 ten thousand tons in 2020. However, the crayfish breeding environment is complex, and more microorganisms are carried on the surface and the body of the crayfish, so that the freshness of the crayfish is reduced to different degrees in the processes of fresh storage, transportation and processing, and even the crayfish is rotten and deteriorated due to death, and the potential safety risk of the processed crayfish is caused.
The electronic nose is a device comprehensively simulating a biological olfactory system, and classifies and identifies samples by identifying volatile compounds in the samples. The electronic nose does not need any sample pretreatment or solvent, has wide application range, short detection time and high sensitivity, and can give a relatively comprehensive and objective result. The types of the electronic nose may be classified into a sensor type electronic nose, a mass spectrum electronic nose, and an ultra-fast gas phase electronic nose. The most common sensor type electronic nose is used in the fields of food, medicine, traditional Chinese medicine and the like, but the sensor type electronic nose also has the limitations of time consumption, complicated sensors, large external influence and the like. The Heracles II ultra-fast gas phase electronic nose is a novel odor analysis instrument, is provided with two chromatographic columns with different polarities, replaces sensor signals in a traditional sensor type electronic nose with chromatographic peaks obtained by gas phase, obtains more compound signals, can accurately separate volatile compounds with different polarities, has the advantages of high sensitivity, short detection time, wide application range and the like, and plays an important role in the classification and identification of milk, white spirit, mutton and fruits. However, the odor difference of the live crayfish stored at different time and with different freshness is small, and the freshness of the crayfish is difficult to accurately judge in the data processing stage through a simple data dimension reduction mode, such as principal component analysis and the like.
Disclosure of Invention
This section is for the purpose of summarizing some aspects of embodiments of the invention and to briefly introduce some preferred embodiments. In this section, as well as in the abstract and the title of the invention of this application, simplifications or omissions may be made to avoid obscuring the purpose of the section, the abstract and the title, and such simplifications or omissions are not intended to limit the scope of the invention.
The present invention has been made in view of the above-mentioned conventional problems.
Therefore, the invention provides the crayfish freshness detection method based on the gas-phase electronic nose and machine learning, which can accurately obtain the odor information of crayfish with different freshness and accurately judge the freshness of the crayfish.
In order to solve the technical problems, the invention provides the following technical scheme: comprises placing a crayfish sample in a beaker, sealing the sample with a double-layer preservative film, and standing for headspace; preheating an ultra-fast gas phase electronic nose instrument, and inserting a sample injection needle into a beaker for sampling to obtain a chromatogram; carrying out normalization pretreatment on the maximum value and the minimum value of the peak height of the chromatogram; preprocessing the baseline data of the peak height, and eliminating the label noise of the crayfish sample by using a belief learning strategy; performing feature extraction on the chromatogram by using a sequence model to obtain the trend features of the chromatogram with different freshness and odor changes; extracting the content characteristics of the volatile compounds corresponding to each retention time through a multilayer perceptron according to the chromatogram trend characteristics, and splicing the chromatogram trend characteristics and the content characteristics of the volatile compounds; and performing feature classification by using the features spliced by the feedforward neural network.
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: the normalization pre-processing includes the steps of,
wherein h isscaleIs the peak height of the chromatogram after normalization, h is the peak height of the chromatogram, hminMinimum value of the peak height of the chromatogram, hmaxThe maximum value of the peak height of the chromatogram.
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: preprocessing the baseline data for the peak height includes calculating an empirical distribution of peak heightsFor the range of values R for the peak height h { h |0 < h ≦ infinity }, there is a division S ═ S for any given normal number S1,S2,...,SrAnd (4) satisfying:
Si={h|(i-1)×s≤h≤i×s,sup(R)≤r×s},i=1,2,...r;
defining event A with peak height h falling in different data segment intervalsi={h|h∈SiThe probability of occurrence of the eventCalculating an estimated baseline value
Wherein, SrIs the r-th divided data segment; m is the event A with the maximum occurrence probabilityiNumber of corresponding section, SmN is the total peak height number of the corresponding division of the event with the maximum occurrence probability,for the empirical distribution of the ith partition,is the empirical distribution of the i-1 th partition.
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: empirical distribution of peak heightsComprises the steps of measuring the peak height h of the chromatogram1,h2,...,hnThe real random variables which are regarded as independent and same distribution are subjected to the cumulative distribution function of F (k) to obtain the empirical distribution of the peak heights
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: label noise for chromatogram culling includes defining an initial labeling, possibly false day label asThe real tag is defined as y*The total number of samples is N, and the number of categories is M; equally dividing N samples into a parts, taking one part as a test set, taking the rest a-1 parts as a training set, and calculating the estimated probability p of the test set samples, namely { p }jRepeating the operation a times to obtain the outward prediction of all samples; calculating the average probability t under each calibration category jjAnd as a confidence threshold:
Calibrating a counting matrix:
For a counting matrixNon-diagonal cells, selectingFiltering the samples at a maximum intervalSorting, filtering of each categoryA maximum-spaced sample;
wherein the probability that a sample x belongs to the jth class Is an initial markAbout the number; l represents satisfyLabeling;is a counting matrixTo the calibration value of (c).
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: the method is characterized in that: the chromatogram trend characteristics comprise that the sequence model preliminarily obtains rough trend characteristics X through multiple convolution, and then trend characteristics SLSTM (X) of the X are extracted based on an LSTM network, namely the chromatogram trend characteristics:
wherein, LSTM1、LSTM2Is an LSTM network.
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: further included is that the trend feature X is a sequence with the length of 65, and each position t contains 64 numerical features X of corresponding time periodt。
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: the volatile compound content characteristics include,
layeri(X)=ReLU(XWi)
wherein, layeriIs the i-layer network; wiIs a parameter of the ith layer; x is a design matrix of the position characteristics; layeroIs a layer o network.
The invention has the beneficial effects that: according to the method, the ultra-fast gas-phase electronic nose is used for acquiring the smell changes of the live crayfishes with different freshness and the crayfishes with different dead times, so that the smell information of the crayfishes with different freshness can be acquired more visually and accurately; label noise is eliminated by using belief learning, and the prediction accuracy is improved; meanwhile, trend characteristics and relative content characteristics of volatile compounds of ultra-fast gas electronic nose chromatographic data are respectively extracted by using the LSTM and the MLP, and the extracted characteristics are spliced and then classified by using a feedforward neural network, so that the crayfish freshness classification method has good stability and accuracy.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise. Wherein:
FIG. 1 is a chromatogram of a crawfish freshness detection method based on gas phase electronic nose and machine learning according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of peak height data PCA of a crawfish freshness detection method based on gas phase electronic nose and machine learning according to a second embodiment of the present invention;
fig. 3 is a confusion matrix of crawfish freshness detection method based on gas phase electronic nose and machine learning according to a second embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, specific embodiments accompanied with figures are described in detail below, and it is apparent that the described embodiments are a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present invention, shall fall within the protection scope of the present invention.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways than those specifically described and will be readily apparent to those of ordinary skill in the art without departing from the spirit of the present invention, and therefore the present invention is not limited to the specific embodiments disclosed below.
Furthermore, reference herein to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one implementation of the invention. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments.
The present invention will be described in detail with reference to the drawings, wherein the cross-sectional views illustrating the structure of the device are not enlarged partially in general scale for convenience of illustration, and the drawings are only exemplary and should not be construed as limiting the scope of the present invention. In addition, the three-dimensional dimensions of length, width and depth should be included in the actual fabrication.
Meanwhile, in the description of the present invention, it should be noted that the terms "upper, lower, inner and outer" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of describing the present invention and simplifying the description, but do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation and operate, and thus, cannot be construed as limiting the present invention. Furthermore, the terms first, second, or third are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
The terms "mounted, connected and connected" in the present invention are to be understood broadly, unless otherwise explicitly specified or limited, for example: can be fixedly connected, detachably connected or integrally connected; they may be mechanically, electrically, or directly connected, or indirectly connected through intervening media, or may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Example 1
Referring to fig. 1, a first embodiment of the present invention provides a crawfish freshness detection method based on gas phase electronic nose and machine learning, comprising:
s1: the crayfish sample is placed in a beaker, sealed with a double-layer preservative film, and kept still for headspace.
S2: preheating the ultra-fast gas phase electronic nose instrument, and putting a sample injection needle into a beaker for sampling to obtain a chromatogram.
S3: and carrying out normalization pretreatment on the maximum value and the minimum value of the chromatogram peak height.
Normalization pretreatment:
wherein h isscaleIs the peak height of the chromatogram after normalization, h is the peak height of the chromatogram, hminMinimum value of the peak height of the chromatogram, hmaxThe maximum value of the peak height of the chromatogram.
S4: and preprocessing the baseline data of the peak height, and eliminating the label noise of the crayfish sample by using a belief learning strategy.
(1) Preprocessing baseline data for peak height
The peak height h of the chromatogram map1,h2,...,hnThe real random variables which are regarded as independent and same distribution are subjected to the cumulative distribution function of F (k) to obtain the empirical distribution of the peak heights
② for the value range R of peak height h ═ { h |0 < h < + ∞ }, for any given normal number S there is a division S ═ S1,S2,...,SrAnd (4) satisfying:
Si={h|(i-1)×s≤h≤i×s,sup(R)≤r×s},i=1,2,...r;
wherein S isrTo scratchThe nth data segment.
Defining event A with peak height h in different data segment intervali={h|h∈SiThe probability of occurrence of the eventCalculating an estimated baseline value
Wherein m is the event A with the maximum occurrence probabilityiNumber of corresponding section, SmN is the total peak height number of the corresponding division of the event with the maximum occurrence probability,for the empirical distribution of the ith partition,is the empirical distribution of the i-1 th partition.
(2) The labeling noise of the rejected crayfish samples includes,
defining the initial label and the number of days with possible error asThe real tag is defined as y*The total number of samples is N and the number of categories is M.
Averagely dividing N samples into a parts, taking one part as a test set, taking the rest a-1 parts as a training set, and calculating the estimated probability p of the test set samples as { p ═ pjRepeating the operation a times to obtain the outward prediction of all samples;
Calculating average probability t under each calibration category jjAnd as a confidence threshold:
Calibrating a counting matrix:
wherein the content of the first and second substances,is a counting matrixTo the calibration value of (c).
To the count matrixNon-diagonal cells, selectingFiltering the samples at a maximum intervalSorting, filtering of each categoryA maximum-spaced sample;
preferably, the crayfish freshness label is misjudged due to differences of producing areas, transportation time and individuals, the artificial label can only be used as priori estimation of freshness, and the embodiment eliminates the wrong artificial label by using a belief learning strategy, namely, a sample with an obviously wrong result, so that the prediction accuracy is improved.
S5: and (4) performing feature extraction on the chromatogram by using a sequence model to obtain the chromatogram trend features of different freshness and odor changes.
The sequence model obtains rough trend characteristic X through multiple convolution preliminarily (the trend characteristic X is one longDegree 65 sequence, each position t containing 64 numerical features x of the corresponding time segmentt) And then extracting a trend feature SLSTM (X) of the X based on the LSTM network, namely a chromatogram trend feature:
wherein, LSTM1、LSTM2Is an LSTM network.
It should be noted that LSTM is a recurrent neural network, and can learn long-term dependency and extract the depth trend feature of the odor information.
The LSTM network processes the sequence in time order, for each location's feature xtFeeding in the input gate and the forgetting gate respectively to obtain a control vector itAnd ftThe calculation formula is as follows:
it=σ(Wiixt+bii+Whiht-1+bhi)
ft=σ(Wifxt+bif+Whfht-1+bhf)
each LSTM network contains a memory vector c, which is passed between different locations; control vector f obtained by forgetting gate for LSTM networktDetermining information that needs to be forgotten:
ft=σ(Wifxt+bif+Whfht-1+bhf)
The LSTM network comprises a hidden layer characteristic h for introducing sequence information; in the input gate, the LSTM network uses the hidden layer feature h of the previous timet-1Re-correcting the input Gate extracted deep characterization gtThereby capturing the interaction of different location features;
gt=hanh(Wigxt+big+Whght-1+bng)
wherein, gtThe smell quantity information at the time t and the overall information (including trend and quantity) before the time t are included;
In summary, at time t, the updated memory vector c of the LSTM networkt。
After updating the memory vector, the LSTM network further obtains h fused with the time information through an output gatet(ii) a Similar to the input gate, the LSTM network uses the hidden layer feature at the previous time to assist in computing the output gate control vector σt:
ot=σ(Wioxt+bio+Whoht-1+bho)
Finally, using the output gate control vector to determine the information needed to remain in the hidden layer vector, updating ht:
ht=ot⊙tanh(ct)
S6: and extracting the content characteristics of the volatile compounds corresponding to each retention time through a multilayer perceptron according to the chromatogram trend characteristics, and splicing the chromatogram trend characteristics and the content characteristics of the volatile compounds.
This example uses a multilayer perceptron (MLP) to extract the volatile compound content features for each retention time:
layeri(X)=ReLU(XWi)
wherein, layeriIs the i-layer network; wiIs a parameter of the ith layer; x is a design matrix of the position characteristics; layeroIs a layer o network.
S7: and performing feature classification by using the features spliced by the feedforward neural network.
Example 2
In order to verify and explain the technical effects adopted in the method, the embodiment selects principal component analysis, LDA, RF and SVM algorithms and adopts the method to perform comparison test, and compares test results by means of scientific demonstration to verify the real effect of the method.
Collecting fresh crayfish sample, collecting sample as 0 day after catching, placing in 4 deg.C refrigerator, and storing for 1, 2, 3, 4, 5 days. The dead shrimp samples are stored for 6h and 12h at 4 ℃ and 3h and 24h at normal temperature (25 ℃), wherein the group with 24h at 25 ℃ is a putrefactive group.
Wherein, the dead shrimp sample is treated as follows:
(1) selecting crayfishes with similar sizes, and removing dead shrimps and residual shrimps; 5 crayfish per bag were suffocated to death under a vacuum of 0.1 MPa.
(2) Sampling 20 crayfishes from a refrigerator at 4 ℃ at regular time every day, and putting the crayfishes at room temperature for 1h to restore the room temperature; putting each crayfish into a 500mL beaker, sealing the beaker by using a double-layer preservative film, and standing the beaker for 30 min.
(3) The instrument is preheated for 30min, a sample injection needle penetrates into a beaker for 5cm, samples are taken for 5000 mu L, crayfish with different storage days are detected by using an ultra-fast gas-phase electronic nose Heracles II, and the set instrument parameters are shown in Table 1.
Table 1: and analyzing the parameters.
Serial number | Parameter(s) | |
|
1 | Sample | 5000μL | |
2 | Temperature at sample inlet | 200 |
|
3 | Duration of | 45s | |
4 | |
40 |
|
5 | Trap shunt rate | 10mL/ |
|
6 | | 50s | |
7 | Trap final temperature | 240 |
|
8 | Initial temperature of |
50 |
|
9 | Programmed temperature raising mode of column temperature | Maintaining at 1 deg.C/s-80 deg.C for 60s at 2 deg.C/s-250 |
|
10 | Time of acquisition | 177s | |
11 | Temperature of detector | 260℃ |
Performing data dimensionality reduction on the chromatographic peak data by using principal component analysis to obtain a principal component analysis graph (figure 2), wherein 1-5 live crayfishes are respectively stored at 4 ℃ for 1-5 days, 6 and 7 dead crayfishes are respectively stored at 25 ℃ for 3h and 24h, and 8 and 9 dead crayfishes are respectively stored at 4 ℃ for 6h and 12 h; the results of PCA visual analysis can be known as follows: the contribution rate of PC1 was 21.8%, the contribution rate of PC2 was 12.6%, and the total contribution rate was 34.4%. The cross overlapping exists among all the classification sample points, so that different freshness degrees of the crayfishes cannot be distinguished; therefore, processing the sample odor information using principal component analysis cannot distinguish crayfish freshness.
Based on example 1, the specific parameters of the method are set as follows:
(1) and preprocessing the obtained ultra-fast gas phase electronic nose Heracles II chromatographic data.
(2) And calculating the empirical distribution of the peak heights by using the samples, solving the maximum probability interval of the peak heights recorded in the previous 666 records, and estimating a baseline value by using the interval mean value.
35407 pieces of peak height data are obtained in 177s of ultra-fast gas-phase electronic nose analysis time, and the front 666 pieces of data are taken; dividing the data into 67 data segments by taking step length 10 as a unit according to the maximum value and the minimum value of the first 666 data, counting the number of the 666 data falling into different data segments, finding the data segment falling into the most data, and taking the average value of the segment of data as a baseline value.
(3) Defining the initial annotation, the number of days of possible error label asThe real label is defined as y, the total number of samples is 380, and 9 types are divided into live shrimps (stored at 4 ℃ for 1 day, 2 days, 3 days, 4 days and 5 days) and dead shrimps (stored at 4 ℃ for 6h, 12h and 25 ℃ for 3h and 24h), wherein the live shrimp samples are 60 per type, and the dead shrimp samples are 20 per type.
Further, each type of 380 samples is averagely divided into 5 parts, one part is taken as a test set, the other 4 parts are taken as a training set, and the estimated probability p of the test set samples is calculated as { p ═ p {jJ-0, 1, 9, repeat 5 times to obtain an outlier prediction for all samples, where j is 0, 1I.e. the probability that sample x belongs to the jth class.
SelectingFiltering the samples at a maximum intervalSorting, filtering 22 maximum-spaced samples of each category; in the obtained 22 filtered samples, the misjudgment is eliminated according to the real labelThe number of live and dead shrimp samples is 10, and the original label is modified into a real label by the other 12 samples.
(4) 128 features obtained by inputting the multi-layer perceptron are spliced with 64 features obtained by the sequence model, and 9 classifications are obtained by using the feedforward neural network classification.
Respectively modeling 300 live shrimps (stored at 4 ℃ for 1 day, 2 days, 3 days, 4 days and 5 days) and 80 dead shrimps (stored at 4 ℃ for 6h, 12h and 25 ℃ for 3h and 24h) by using the method and LDA, RF and SVM algorithms; in each group, 80% of crayfish samples are randomly selected as a training set, and 20% of samples are selected as a verification set; calculating the accuracy of model prediction according to the confusion matrix (figure 3);
table 2: and (5) predicting a model result of crayfish freshness.
As can be seen from Table 2, the accuracy of 5 times of prediction by using the method is respectively 92.00%, 93.33%, 95.95%, 97.30% and 97.30%, and the total prediction result can reach 95.16%; the prediction accuracy of the method is far higher than the accuracy (79.16%, 75.99% and 71.50%) of modeling by utilizing LDA, RF and SVM, and the method has good stability and accuracy.
It should be noted that the above-mentioned embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, which should be covered by the claims of the present invention.
Claims (8)
1. A crayfish freshness detection method based on a gas phase electronic nose and machine learning is characterized by comprising the following steps: comprises the steps of (a) preparing a mixture of a plurality of raw materials,
placing a crayfish sample in a beaker, sealing the beaker by using a double-layer preservative film, and standing for headspace;
preheating an ultra-fast gas phase electronic nose instrument, and inserting a sample injection needle into a beaker for sampling to obtain a chromatogram;
carrying out normalization pretreatment on the maximum value and the minimum value of the peak height of the chromatogram;
preprocessing the baseline data of the peak height, and eliminating the label noise of the crayfish sample by using a belief learning strategy;
performing feature extraction on the chromatogram by using a sequence model to obtain the trend features of the chromatogram with different freshness and odor changes;
extracting the content characteristics of the volatile compounds corresponding to each retention time through a multilayer perceptron according to the chromatogram trend characteristics, and splicing the chromatogram trend characteristics and the content characteristics of the volatile compounds;
and performing feature classification by using the features spliced by the feedforward neural network.
2. The crayfish freshness detection method based on the gas-phase electronic nose and the machine learning as claimed in claim 1, characterized in that: the normalization pre-processing includes the steps of,
wherein h isscaleIs the peak height of the chromatogram after normalization, h is the peak height of the chromatogram, hminMinimum value of the peak height of the chromatogram, hmaxThe maximum value of the peak height of the chromatogram.
3. The crayfish freshness detection method based on the gas-phase electronic nose and the machine learning as claimed in claim 2, characterized in that: pre-processing the baseline data for the peak heights includes,
For the range of values R for the peak height h { h |0 < h ≦ infinity }, there is a division S ═ S for any given normal number S1,S2,...,SrAnd (4) satisfying:
Si={h|(i-1)×s≤h≤i×s,sup(R)≤r×s},i=1,2,...r;
defining event A with peak height h falling in different data segment intervalsi={h|h∈SiThe probability of occurrence of the eventCalculating an estimated baseline value
Wherein, SrIs the r-th divided data segment; m is the event A with the maximum occurrence probabilityiNumber of corresponding section, SmN is the total peak height number of the corresponding division of the event with the maximum occurrence probability,for the empirical distribution of the ith partition,is the empirical distribution of the i-1 th partition.
4. The crayfish freshness detection method based on the gas-phase electronic nose and the machine learning as claimed in claim 3, characterized in that: empirical distribution of peak heightsComprises the steps of (a) preparing a mixture of a plurality of raw materials,
the peak height h of the chromatogram map1,h2,...,hnThe real random variables which are regarded as independent and same distribution are subjected to the cumulative distribution function of F (k) to obtain the empirical distribution of the peak heights
5. The crayfish freshness detection method based on gas phase electronic nose and machine learning of claim 4, wherein: the label noise of the eliminated chromatogram includes,
defining the initial annotation, the number of days of possible error label asThe real tag is defined as y*The total number of samples is N, and the number of categories is M;
equally dividing N samples into a parts, taking one part as a test set, taking the rest a-1 parts as a training set, and calculating the estimated probability p of the test set samples, namely { p }jRepeating the operation a times to obtain the outward prediction of all samples;
calculating the average probability t under each calibration category jjAnd as a confidence threshold:
Calibrating a counting matrix:
For a counting matrixOff diagonal cell of (1), selectingFiltering the samples at a maximum intervalSorting, filtering of each categoryA maximum-spaced sample;
6. The crawfish freshness detection method based on gas phase electronic nose and machine learning as claimed in any one of claims 3, 4 and 5, wherein: the chromatogram trend characteristics include that,
the sequence model preliminarily obtains rough trend characteristics X through multiple convolution, and then extracts trend characteristics SLSTM (X) of the X based on the LSTM network, namely the chromatogram trend characteristics:
wherein, LSTM1、LSTM2Is an LSTM network.
7. The crayfish freshness detection method based on the gas-phase electronic nose and the machine learning as claimed in claim 6, characterized in that: also comprises the following steps of (1) preparing,
the trend feature X is a sequence of length 65, each position t containing 64 numerical features X for a corresponding time segmentt。
8. The crayfish freshness detection method based on gas phase electronic nose and machine learning of claim 7, wherein: the volatile compound content characteristics include,
layeri(X)=ReLU(XWi)
wherein, layeriIs the i-layer network; wiIs a parameter of the ith layer; x is a design matrix of the position characteristics; layeroIs a layer o network.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111228666.9A CN113984946B (en) | 2021-10-21 | 2021-10-21 | Crayfish freshness detection method based on gas phase electronic nose and machine learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111228666.9A CN113984946B (en) | 2021-10-21 | 2021-10-21 | Crayfish freshness detection method based on gas phase electronic nose and machine learning |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113984946A true CN113984946A (en) | 2022-01-28 |
CN113984946B CN113984946B (en) | 2022-12-27 |
Family
ID=79740055
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111228666.9A Active CN113984946B (en) | 2021-10-21 | 2021-10-21 | Crayfish freshness detection method based on gas phase electronic nose and machine learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113984946B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102297930A (en) * | 2011-07-20 | 2011-12-28 | 浙江大学 | Method for identifying and predicting freshness of meat |
CN103389324A (en) * | 2013-07-18 | 2013-11-13 | 浙江工商大学 | Prawn freshness detection method based on smell analysis technology |
CN106568907A (en) * | 2016-11-07 | 2017-04-19 | 常熟理工学院 | Chinese mitten crab freshness damage-free detection method based on semi-supervised identification projection |
CN110308240A (en) * | 2019-05-24 | 2019-10-08 | 深圳大学 | A kind of electronic nose method for quickly identifying |
WO2020027494A1 (en) * | 2018-08-01 | 2020-02-06 | (주)한그린테크 | Device and method for measuring freshness on basis of machine learning |
CN111624317A (en) * | 2020-06-22 | 2020-09-04 | 南京农业大学 | Nondestructive testing method for judging freshness of baby cabbage |
CN111665819A (en) * | 2020-06-08 | 2020-09-15 | 杭州电子科技大学 | Deep learning multi-model fusion-based complex chemical process fault diagnosis method |
CN111783568A (en) * | 2020-06-16 | 2020-10-16 | 厦门市美亚柏科信息股份有限公司 | Pedestrian re-identification method and device based on belief learning and storage medium |
-
2021
- 2021-10-21 CN CN202111228666.9A patent/CN113984946B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102297930A (en) * | 2011-07-20 | 2011-12-28 | 浙江大学 | Method for identifying and predicting freshness of meat |
CN103389324A (en) * | 2013-07-18 | 2013-11-13 | 浙江工商大学 | Prawn freshness detection method based on smell analysis technology |
CN106568907A (en) * | 2016-11-07 | 2017-04-19 | 常熟理工学院 | Chinese mitten crab freshness damage-free detection method based on semi-supervised identification projection |
WO2020027494A1 (en) * | 2018-08-01 | 2020-02-06 | (주)한그린테크 | Device and method for measuring freshness on basis of machine learning |
CN110308240A (en) * | 2019-05-24 | 2019-10-08 | 深圳大学 | A kind of electronic nose method for quickly identifying |
CN111665819A (en) * | 2020-06-08 | 2020-09-15 | 杭州电子科技大学 | Deep learning multi-model fusion-based complex chemical process fault diagnosis method |
CN111783568A (en) * | 2020-06-16 | 2020-10-16 | 厦门市美亚柏科信息股份有限公司 | Pedestrian re-identification method and device based on belief learning and storage medium |
CN111624317A (en) * | 2020-06-22 | 2020-09-04 | 南京农业大学 | Nondestructive testing method for judging freshness of baby cabbage |
Non-Patent Citations (6)
Title |
---|
GORSKA-HORCZYCZAK, E 等: "Chromatographic fingerprints supported by artificial neural network for differentiation of fresh and frozen pork", 《FOOD CONTROL》 * |
HUBERT CECOTTI 等: "Grape detection with convolutional neural networks", 《EXPERT SYSTEMS WITH APPLICATIONS》 * |
LOGUE C 等: "Neural-network-integrated electronic nose system for identification of spoiled beef", 《LEBENSMITTEL-WISSENSCHAFT UND TECHNOLOGIE》 * |
RAYMOND K 等: "An artificial neural network model for predicting flavour intensity in blackcurrant concentrates", 《FOOD QUALITY AND PREFERENCE》 * |
巴里·L.尼尔森: "《随机仿真原理与方法》", 31 December 2019, 国防工业出版社 * |
朱晓琳: "基于高光谱成像的水果品质及木材含水量评估方法", 《中国优秀硕士学位论文全文数据库 (工程科技Ⅰ辑)》 * |
Also Published As
Publication number | Publication date |
---|---|
CN113984946B (en) | 2022-12-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Mazen et al. | Ripeness classification of bananas using an artificial neural network | |
CN106568907B (en) | A kind of steamed crab freshness lossless detection method based on semi-supervised identification projection | |
CN105044298B (en) | A kind of Eriocheir sinensis class grade of freshness detection method based on machine olfaction | |
CN109934269B (en) | Open set identification method and device for electromagnetic signals | |
CN102353701B (en) | Diagnostic method for insect attacks on crops by utilizing volatile matter | |
CN104849321B (en) | A kind of method based on smell finger-print quick detection Quality Parameters in Orange | |
CN104298977B (en) | A kind of low-rank representation Human bodys' response method constrained based on irrelevance | |
CN109919241A (en) | Hyperspectral unknown class target detection method based on probability model and deep learning | |
CN105954412B (en) | For the sensor array optimization method of hickory nut freshness detection | |
CN105738581B (en) | A kind of method for quick identification of the different freshness hickory nuts based on electronic nose | |
CN105699437A (en) | Rapid nondestructive distinguishing method of Chinese walnuts with different fresh degrees based on electronic nose | |
Devi et al. | IoT-deep learning based prediction of amount of pesticides and diseases in fruits | |
Mavi et al. | Mango ripeness classification system using hybrid technique | |
CN113984946B (en) | Crayfish freshness detection method based on gas phase electronic nose and machine learning | |
Guo et al. | Hyperspectral image analysis for the evaluation of chilling injury in avocado fruit during cold storage | |
CN110726813B (en) | Electronic nose prediction method based on double-layer integrated neural network | |
CN110738259B (en) | Fault detection method based on Deep DPCA-SVM | |
Abalos et al. | Fresh fish classification using hog feature extraction and svm | |
Najib et al. | Fish quality study using odor-profile case-based reasoning (CBR) classification technique | |
Wang et al. | A Research of Neural Network Optimization Technology for Apple Freshness Recognition Based on Gas Sensor Array | |
Wang et al. | An E-nose and convolution neural network based recognition method for processed products of Crataegi Fructus | |
Shah et al. | Automatically localising ROIs in hyperspectral images using background subtraction techniques | |
CN114169903A (en) | Traditional Chinese medicine digital quality control tracing method capable of fusing nondestructive testing technology | |
Pusadan et al. | k-Nearest Neighbor and Feature Extraction on Detection of Pest and Diseases of Cocoa | |
Sadhana et al. | Fruit Quality Identification Using Deep LearningTechniques |
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 |