Pretreatment and spectral band selection method of near-infrared sorghum variety discrimination model
By collecting the spectrum data of sorghum seed samples in different environments, combined with pre -processing and spectral band selection, a number of near -infrared sorghum varieties are constructed, and the pre -processing and bands of the maximum combination of Matthews relationship number multiplication are selected. The problem of low stability of the sorghum variety discrimination model realizes the high accuracy and low errors of the model in different environments.
Patent Information
- Application Number
- CN202411490054.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-01-28
AI Technical Summary
The near-infrared sorghum variety discriminant model has low robustness and is susceptible to changes in the measurement environment, resulting in the problem of decreasing model accuracy and large errors under new conditions.
By collecting the spectral data of sorghum seed sample samples in different environments, set pre -processing and spectral combinations of m -bands, processing spectral data pre -processing and band selection, and building M × N near -infrared sorghum varieties judgment model, and and. Calculate the product of the Matthews phase relationship, and select the pre -processing and spectral wave band of the maximum product of the product.
It improves the stability of the identifiers of the decent -infrared sorghum variety, so that the model can still maintain higher accuracy and low errors under different environmental conditions.
Smart Images

Figure CN119375181A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of sorghum variety identification, and in particular to a preprocessing and spectral band selection method of a near-infrared sorghum variety identification model. Background Art
[0002] Sorghum grain is an important raw material for brewing. Controlling the source of sorghum raw materials from the source is crucial to the quality of brewing. Traditional detection methods such as DNA fingerprinting and isozyme electrophoresis require the consumption of samples, while near-infrared technology can detect various physical and chemical information of samples. Therefore, the application of this technology can achieve rapid and non-destructive discrimination between the target sorghum variety and other varieties. It is feasible to use near-infrared spectroscopy technology combined with appropriate chemometric methods to construct a sorghum variety authenticity discrimination model. However, the results of near-infrared spectroscopy analysis are extremely susceptible to changes in the measurement environment. Corresponding changes in the instrument, environmental temperature and humidity, and changes in the physical and chemical properties of the sample may lead to large differences between the predicted results and expectations.
[0003] Conventional near-infrared sorghum variety discrimination models only use spectra collected under single conditions (such as only one spectrometer and one environmental temperature and humidity condition) to build models. The model optimized under a single condition may not be applicable under new conditions. When the measurement conditions are inconsistent with those used for modeling, the model may have problems such as decreased accuracy and large errors, that is, the model has low robustness. Summary of the invention
[0004] The technical problem solved by the present invention is to provide a preprocessing and spectral band selection method for a near-infrared sorghum variety discrimination model to solve the problem of low robustness of the near-infrared sorghum variety discrimination model.
[0005] The present invention solves the above technical problems by adopting a technical solution: a near-infrared sorghum variety discrimination model preprocessing and spectral band selection method, comprising the following steps:
[0006] S1. Under N different environments, collect spectra of sorghum grain samples and assign a category to each sample to obtain N groups of spectral data;
[0007] S2, setting M combinations of preprocessing and spectral bands, and using the preprocessing and spectral bands in the M combinations to process N groups of spectral data, and then combining the corresponding category values to obtain M×N groups of sample data;
[0008] S3, constructing M×N near-infrared sorghum variety discrimination models, using M×N groups of sample data for one-to-one training, and obtaining the trained M×N near-infrared sorghum variety discrimination models;
[0009] S4. Calculate the product of the Matthews correlation coefficients of the near-infrared sorghum variety discrimination model corresponding to the same combination of pretreatment and spectral band, and select the pretreatment and spectral band corresponding to the maximum product.
[0010] Furthermore, if the category of the sample is the target category, it is assigned a value of 1, otherwise it is assigned a value of 0.
[0011] Furthermore, the spectral band of the N groups of spectral data is from 1125 nm to 2478 nm.
[0012] Furthermore, the preprocessing includes no processing, standard normal variable transformation and first-order derivative, and the spectral band includes the full spectral band range, less than 1750nm and greater than 1400nm.
[0013] Furthermore, M × N near-infrared sorghum variety discrimination models were constructed using the discriminant partial least squares method.
[0014] The beneficial effects of the present invention are as follows: the present invention provides a method for preprocessing and selecting spectral bands of a near-infrared sorghum variety discrimination model. The method collects spectra of sorghum grain samples under N different environments, sets M combinations of preprocessing and spectral bands, obtains M×N groups of sample data, constructs M×N near-infrared sorghum variety discrimination models, and uses the M×N groups of sample data for one-to-one training to obtain the trained M×N near-infrared sorghum variety discrimination models. The product of the Matthews correlation coefficients of the near-infrared sorghum variety discrimination models with the same preprocessing and spectral band combination is calculated, and the preprocessing and spectral band corresponding to the maximum product is selected, thereby obtaining a near-infrared sorghum variety discrimination model with better robustness and the corresponding preprocessing and spectral bands, thereby solving the problem of low robustness of the near-infrared sorghum variety discrimination model. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 The present invention provides a flow chart of a preprocessing method and a spectral band selection method for a near-infrared sorghum variety discrimination model. DETAILED DESCRIPTION
[0016] Aiming at the problem that the existing near-infrared sorghum variety discrimination model has low robustness, the present invention provides a near-infrared sorghum variety discrimination model preprocessing and spectral band selection method, such as Figure 1 As shown, the following steps are included:
[0017] S1. Under N different environments, collect spectra of sorghum grain samples and assign a category to each sample to obtain N groups of spectral data; specifically, N is a positive integer not less than 2. If the category of the sample is the target category, it is assigned a value of 1, i.e. a true sample; otherwise, it is assigned a value of 0, i.e. a false sample. The spectral band of the N groups of spectral data is 1125nm to 2478nm.
[0018] S2. Set M combinations of preprocessing and spectral bands, and use the preprocessing and spectral bands in the M combinations to process N groups of spectral data, and then combine them with corresponding category values to obtain M×N groups of sample data; specifically, the preprocessing includes no processing, standard normal variable transformation and first-order derivative, and the spectral bands include the full spectral band range, less than 1750nm and greater than 1400nm.
[0019] S3. Construct M×N near-infrared sorghum variety discrimination models, and use M×N groups of sample data for one-to-one training to obtain the trained M×N near-infrared sorghum variety discrimination models; specifically, construct the M×N near-infrared sorghum variety discrimination models using the same method, such as using the discriminant partial least squares method.
[0020] S4. Calculate the product of the Matthews correlation coefficients of the near-infrared sorghum variety discrimination model corresponding to the same combination of pretreatment and spectral band, and select the pretreatment and spectral band corresponding to the maximum product.
[0021] Example:
[0022] The present invention is further described by taking 6100 sorghum grains as the test samples, the number and variety of which are: 2000 grains of Guojiaohong No. 1; 4100 grains of other varieties, the 4100 grains of other varieties include 3200 grains of Hongyingzi, 400 grains of Langnuohong No. 19 and 500 grains of Yiwuhong No. 4. Among them, Guojiaohong No. 1 is the target category, that is, 2000 grains of Guojiaohong No. 1 samples are regarded as true samples, and their category is assigned a value of 1, while the remaining 4100 grains are regarded as false samples, and their category attributes are assigned a value of 0.
[0023] In the first step, sample spectral data under two environments were collected, with a spectral range of 1125nm to 2478nm and a resolution of 6.38nm, and two sets of spectral data were obtained, which were recorded as X1 and X2 respectively.
[0024] In the second step, three pretreatments and three spectral bands are set, totaling 9 combinations. X1 and X2 are processed respectively, and then combined with the corresponding category values to obtain 18 groups of sample data. The pretreatment includes no treatment, standard normal variable transformation and first-order derivative. The spectral band includes the full spectral band range, less than 1750nm and greater than 1400nm.
[0025] The third step is to construct 18 near-infrared sorghum variety discrimination models, and use 18 groups of sample data for one-to-one training to obtain 18 trained near-infrared sorghum variety discrimination models.
[0026] The fourth step is to calculate the product of the Matthews correlation coefficients of the near-infrared sorghum variety discrimination model corresponding to the same combination of pretreatment and spectral band, and select the pretreatment and spectral band corresponding to the maximum product.
[0027] Specifically, the true positive, false positive, true negative and false negative of each trained near-infrared sorghum variety discrimination model are counted, where the number of true positives is represented by TP, which means that both the predicted result and the actual result are true; the number of false positives is represented by FP, which means that the predicted result is true but the actual sample is a false sample; the number of true negatives is represented by TN, which means that both the predicted result and the actual result are false; the number of false negatives is represented by FN, which means that the predicted result is false but the actual sample is a true sample. Using the Matthews correlation coefficient formula: The Matthews correlation coefficient MCC of each model was calculated, and then the product of the Matthews correlation coefficients of the near-infrared sorghum variety discrimination model with the same pretreatment and spectral band combination was calculated. The results are shown in Table 1.
[0028] Table 1. Related data results of 18 near-infrared sorghum variety discrimination models
[0029]
[0030]
[0031] Pr in Table 1 MCC It represents the product of the Matthews correlation coefficients of the near-infrared sorghum variety discrimination model with the same pretreatment and spectral band combination, that is, the product of the MCC of the near-infrared sorghum variety discrimination model corresponding to the first environment and the MCC of the near-infrared sorghum variety discrimination model corresponding to the second environment.
[0032] From the data in Table 1, it can be seen that the product of the Matthews correlation coefficient of the near-infrared sorghum variety discrimination model corresponding to the eighth combination is the largest, which is 0.9985. Therefore, the selected pretreatment is the standard normal variable transformation, and the spectral band is greater than 1400nm, that is, 1400nm to 2478nm. Therefore, the near-infrared sorghum variety discrimination model trained with sample data with the pretreatment of standard normal variable transformation and the spectral band of 1400nm to 2478nm has better robustness.
Claims
1. A near-infrared sorghum variety discrimination model preprocessing and spectral band selection method, characterized in that: The following steps are involved: S1. Under N different environments, collect spectra of sorghum grain samples and assign a category to each sample to obtain N groups of spectral data; S2, setting M combinations of preprocessing and spectral bands, and using the preprocessing and spectral bands in the M combinations to process N groups of spectral data, and then combining the corresponding category values to obtain M×N groups of sample data; S3, constructing M×N near-infrared sorghum variety discrimination models, using M×N groups of sample data for one-to-one training, and obtaining the trained M×N near-infrared sorghum variety discrimination models; S4. Calculate the product of the Matthews correlation coefficients of the near-infrared sorghum variety discrimination model corresponding to the same combination of pretreatment and spectral band, and select the pretreatment and spectral band corresponding to the maximum product.
2. The method for preprocessing and selecting spectral bands of the near-infrared sorghum variety discrimination model according to claim 1, characterized in that: If the category of the sample is the target category, it is assigned a value of 1, otherwise it is assigned a value of 0.
3. The method for preprocessing and spectral band selection of the near-infrared sorghum variety discrimination model according to claim 1, characterized in that: The spectral band of group N spectral data is from 1125nm to 2478nm.
4. The method for preprocessing and selecting spectral bands of the near-infrared sorghum variety discrimination model according to claim 3, characterized in that: In S1, the preprocessing includes no processing, standard normal variable transformation and first-order derivative, and the spectral band includes the full spectral band range, less than 1750nm and greater than 1400nm.
5. The method for preprocessing and selecting spectral bands of the near-infrared sorghum variety discrimination model according to any one of claims 1 to 4, characterized in that: The discriminant partial least squares method was used to construct M×N near-infrared sorghum variety discrimination models.