A near-infrared spectroscopy band selection method based on binning-standard mutual information
By using the boxing method and standard mutual information calculation method in the selection of near-infrared spectral bands, the problem of band selection dependence on distance angle in the prior art is solved, and the prediction ability and robustness of the model are improved.
Patent Information
- Application Number
- CN202210699770.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-20
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-06-20
AI Technical Summary
The existing near-infrared spectral band selection methods mainly start from the distance perspective, and it is difficult to effectively remove irrelevant information variables, which affects the prediction ability and robustness of the model.
The near-infrared spectral band selection method based on the boxing method-standard mutual information is adopted to filter out the optimal bands that can be used for modeling through the normal width boxing preprocessing and the calculation of the standard mutual information value.
By introducing the concept of probability and calculation of information entropy, the limitation of using only spectral distance in conventional methods is broken, and the accuracy of band selection and the robustness of the model are improved.
Smart Images

Figure CN115099271B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of near infrared spectroscopy, and in particular to a near infrared spectroscopy band selection method based on binning method-standard mutual information. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Modern near-infrared spectroscopy technology has developed rapidly due to its advantages such as being green, efficient, and easy to implement online. It plays an important role in the fields of agriculture, medicine, and chemical industry, and has become an important means of material quality detection. The near-infrared spectral region is composed of the frequency doubling and group frequency absorption peaks of hydrogen-containing groups. The absorption sensitivity is relatively low, and the absorption band is wide and overlaps seriously. Relying on chemometric methods to pre-process and select the band of near-infrared spectra can make up for the shortcomings of the application of near-infrared spectroscopy technology. For specific sample systems, by appropriately processing or transforming the spectrum, the influence of various non-target factors on the spectrum can be weakened or even eliminated, and irrelevant information variables can be removed as much as possible, and the resolution and sensitivity can be improved, thereby improving the prediction ability and robustness of the correction model.
[0004] The essence of wavelength selection is the inheritance of the idea of Occam's razor, which is to select the most effective wavelength from a set of wavelengths to make the constructed spectral model better. Through wavelength selection, a wavelength subset that optimizes a certain evaluation criterion can be selected from the wavelength set of the original spectrum. This subset can reflect the original spectral information to the greatest extent, has the strongest explanatory power for the dependent variable, and contributes to the model at a high level. The benefits of wavelength selection for spectral data are: (1) avoiding overfitting and improving model prediction performance; (2) making the model trainer run faster and more efficiently; (3) eliminating uninformative wavelengths and interfering wavelengths to establish a highly robust, easy-to-interpret, and high-precision correction model.
[0005] At present, common near-infrared band selection methods include variable importance in projection (VIP), correlation coefficient (CC), elimination of uninformative variables (UVE), competitive adaptive reweighted sampling (CARS), etc. However, the commonly used near-infrared band selection methods, modeling methods and model evaluation methods are only based on the perspective of distance, such as Mahalanobis distance, Euclidean distance, Manhattan distance, etc. Summary of the invention
[0006] In order to solve the above problems, the present invention proposes a near infrared spectrum band selection method based on binning method-standard mutual information, which uses equal width binning preprocessing method and standard mutual information to process the sample near infrared spectrum and primary data, obtains the correlation between the near infrared spectrum and the primary data, calculates the corresponding NMI value, and screens out the best band that can be used for modeling, breaking the limitation of conventional methods that only use spectral distance for band selection.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] In a first aspect, the present invention provides a near infrared spectroscopy band selection method based on binning method-standard mutual information, comprising:
[0009] The near-infrared spectra of the samples and the corresponding primary data were preprocessed using the equal-width binning method;
[0010] The standard mutual information between each band and the primary data is calculated for the preprocessed near-infrared spectrum, and the obtained standard mutual information values are sorted;
[0011] According to the sorting results, the bands are accumulated in sequence for modeling, and the best bands are screened according to the modeling results.
[0012] As an optional implementation, a maximum number of iteration bins n of the primary data and the near-infrared spectrum is set to divide the primary data and the near-infrared spectrum into n groups with equal width, and different nominal values are set for data points in different groups.
[0013] As an optional implementation, the maximum number of iterative bins for the first-level data equal-width binning method is set to n, and i=1;
[0014] The first-level data is divided into i groups, and the first box width is obtained according to the maximum value Rmax and the minimum value Rmin;
[0015] The corresponding primary data are divided into corresponding groups and replaced with corresponding nominal values;
[0016] Set the maximum number of iteration bins of the near-infrared spectroscopy equal-width binning method to n, and set j = 1;
[0017] The primary data are divided into j groups, and the width of the second box is obtained according to the maximum value Amax and the minimum value Amin of the absorbance value of each band;
[0018] The corresponding near-infrared spectra are divided into corresponding groups and replaced with corresponding nominal values;
[0019] Calculate the standard mutual information value of the first-level data after binning and the spectrum of each band;
[0020] Let i=i+1, j=j+1, and repeat the above steps until the maximum number of iteration boxes n is reached.
[0021] As an optional implementation, the first box width Rwid = (Rmax-Rmin) / i; the second box width Awid = (Amax-Amin) / j; wherein Rmax is the maximum value of the primary data, Rmin is the minimum value of the primary data, Amax is the maximum absorbance value, and Amin is the minimum absorbance value.
[0022] As an optional implementation, the standard mutual information value is obtained according to the mutual information value of each band and the primary data and the respective information entropy values, specifically: Among them, H(U) is the information entropy value of variable U, H(V) is the information entropy value of variable V, and MI(U,V) is the mutual information value of variables U and V.
[0023] As an optional implementation, the standard mutual information values are sorted in descending order.
[0024] As an optional implementation, the band with the smallest predicted mean square error (RMSEP) is selected as the optimal band.
[0025] In a second aspect, the present invention provides a near-infrared spectral band selection system based on binning method-standard mutual information, comprising:
[0026] An equal-width binning processing module is configured to pre-process the near-infrared spectrum of the sample and the corresponding primary data using an equal-width binning method;
[0027] A standard mutual information processing module is configured to calculate the standard mutual information between each band and the primary data for the preprocessed near infrared spectrum, and to sort the obtained standard mutual information values;
[0028] The screening module is configured to accumulate the bands in sequence according to the sorting results for modeling, and screen the best bands according to the modeling results.
[0029] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in the first aspect is performed.
[0030] In a fourth aspect, the present invention provides a computer-readable storage medium for storing computer instructions, wherein when the computer instructions are executed by a processor, the method described in the first aspect is performed.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] The present invention provides a near-infrared spectral band selection method based on binning method-standard mutual information. By using the binning method, the near-infrared spectral data and the primary data are discretized to increase the difference between the data. The concept of information entropy is used to calculate the standard mutual information value between the band and the primary data, and then the values are arranged in descending order and accumulated in sequence for partial least squares modeling prediction. The minimum RMSEP value is used to select the optimal number of modeling bands. The concept of probability is introduced to break the limitation of conventional methods using spectral distance for band selection, and provide a new idea for subsequent optimization of model prediction results.
[0033] The near-infrared spectral band selection method based on the binning method-standard mutual information proposed in the present invention performs band selection from a randomness perspective and has a gain effect on the final model; the concept of probability is introduced into the band selection method, and a new band selection method is derived based on probability, breaking the situation where the existing method uses distance.
[0034] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0036] Figure 1 A flow chart of the binning method-standard mutual information algorithm provided in Example 1 of the present invention;
[0037] FIG. 2( a ) is a NMI distribution diagram of different wavelength bands of the mixed solution spectrum and the water content provided in Example 1 of the present invention;
[0038] FIG2( b ) is a modeling evaluation diagram of the NMI descending moisture content of the mixed solution spectrum provided in Example 1 of the present invention;
[0039] Figure 3 Band distribution diagram (original spectrum) of different band selection methods provided in Example 1 of the present invention for modeling and predicting the moisture content of a mixed solution;
[0040] FIG4( a) is a NMI distribution diagram of different bands of the original spectrum of corn and protein content provided in Example 1 of the present invention;
[0041] FIG4( b ) is a modeling evaluation diagram of the NMI descending protein content of the original spectrum of corn provided in Example 1 of the present invention;
[0042] FIG4( c ) is a distribution diagram of different spectrum bands and protein content NMI of corn after SNV pretreatment provided in Example 1 of the present invention;
[0043] FIG4( d ) is a descending modeling evaluation diagram of NMI spectrum of protein content after SNV pretreatment of corn provided in Example 1 of the present invention;
[0044] Figure 5 Band distribution diagram (original spectrum) of different band selection methods provided in Example 1 of the present invention for modeling and predicting corn protein content;
[0045] Figure 6 Band distribution diagram (spectrum after SNV preprocessing) of different band selection methods provided in Example 1 of the present invention for modeling and predicting corn protein content. DETAILED DESCRIPTION
[0046] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0047] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0048] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0049] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0050] Example 1
[0051] This embodiment aims to explore the method of applying information entropy to near-infrared spectral band selection from the perspective of randomness. Information entropy is applicable to the calculation of single random variable systems, but band selection is a multivariable system and can only be simplified to a two-random variable system, that is, a two-random variable system of n single band variables and a primary data variable. Therefore, this embodiment introduces mutual information (MI), and for better comparison, further derives the standard mutual information (NMI); at the same time, in order to better eliminate the characteristic between the noise of the spectrum and the primary enhancement data, the spectral data and the primary data are processed by equal-width binning method, and the continuous data is discretized to increase the stability of the model.
[0052] like Figure 1 As shown, this embodiment provides a near infrared spectroscopy band selection method based on binning method-standard mutual information (B-NMI), including:
[0053] The near-infrared spectra of the samples and the corresponding primary data were preprocessed using the equal-width binning method;
[0054] The standard mutual information between each band and the primary data is calculated for the preprocessed near-infrared spectrum, and the obtained standard mutual information values are sorted;
[0055] According to the sorting results, the bands are accumulated in sequence for modeling, and the best bands are screened according to the modeling results.
[0056] In this embodiment, a stable near-infrared spectrum of the sample and accurate primary data are obtained.
[0057] According to the formula of information entropy and NMI, if the near-infrared spectral information and primary data are directly calculated without preprocessing, the results will be at a low level and cannot well distinguish the bands with large amounts of information. Therefore, it is necessary to preprocess the data before calculating NMI. In addition, there are problems in near-infrared spectral detection, such as serious overlap of component spectra, redundant spectral information, and unclear characteristic absorption areas.
[0058] Therefore, this embodiment uses the equal-width binning method to preprocess the near-infrared spectrum of the sample and the corresponding primary data, highlighting the correlation between the information expressed by each band and the primary data;
[0059] Specifically, the maximum number of iterative bins for the equal-width binning method of primary data and near-infrared spectra is set to n, so that the data is divided into n groups with equal width, different values are set for data points in different groups, and continuous features are simplified into discrete features;
[0060] The specific steps are as follows:
[0061] Set the maximum number of iterative bins for the first-level data equal-width binning method to n, and let i = 1;
[0062] Divide the sample primary data into i groups and find the maximum value Rmax and the minimum value Rmin;
[0063] Calculate the box width Rwid = (Rmax-Rmin) / i;
[0064] The corresponding primary data are divided into corresponding groups and replaced with corresponding nominal values;
[0065] Set the maximum number of iteration bins for the near-infrared spectroscopy equal-width binning method to n, and set j = 1;
[0066] Find the maximum value Amax and the minimum value Amin of the absorbance value of each band respectively;
[0067] Calculate the box width Awid = (Amax-Amin) / j;
[0068] The corresponding near-infrared spectra were divided into corresponding groups and replaced with corresponding nominal values;
[0069] Calculate and save the standard mutual information (NMI) value of the first-level data and the spectral data of each band after binning;
[0070] Let j=j+1, i=i+1, and repeat the above steps until the maximum number of iteration boxes is reached.
[0071] As an optional implementation, the value of the bin number n is set to a range according to the number of samples to be tested, which is approximately twice the number of samples to be tested.
[0072] As an optional implementation, the near-infrared spectral data may be pre-processed and then subjected to equal-width binning processing again, such as SNV pre-processing.
[0073] In this embodiment, the standard mutual information between each band and the primary data is calculated for the near-infrared spectral data after equal-width binning, and the NMI values of each band spectrum and the primary data under all different bin number combinations are arranged from large to small.
[0074] In order to reflect the correlation between the primary data and the spectral data, this embodiment introduces the concept of information entropy, which is applied to the method of selecting near-infrared spectral bands from the perspective of randomness. For any random variable X, entropy is defined as follows:
[0075] H(X)=-∑ x P(x)logP(x) (1)
[0076] In the above formula, P(x) is the probability of event x occurring, and the unit of H(X) is bit.
[0077] According to the monotonicity of information entropy, if the probability of an event is higher, the amount of information is lower. Considering the accumulative nature of information entropy, information entropy is the sum of every possible amount of information, which means that information entropy can be used to measure the complexity of a system.
[0078] Since information entropy is only applicable to the calculation of a single random variable system, but band selection is a multivariable system, it can only be simplified to a two-random variable system, that is, a two-random variable system of n single band variables and a primary data variable, this embodiment introduces mutual information to indicate whether the two variables U and V are related, and the strength of the relationship. If the probability of variables U and V appearing at the same time is P(u,v), the mutual information MI(U,V) between variables U and V is defined as:
[0079]
[0080] Among them, R represents the number of data categories in variable U, and C represents the number of data categories in variable V.
[0081] The above formula shows that when two events occur independently (that is, the two variables are unrelated), the mutual information is 0 bits; the stronger the correlation between the two events, the greater the mutual information.
[0082] For the convenience of evaluation, the mutual information can be used to derive the standardized mutual information. This embodiment adopts the standardized mutual information, whose value range is 0 to 1. After decomposing formula (2), the NMI calculation formula is as follows:
[0083]
[0084] Among them, H(U) is the information entropy value of variable U, and H(V) is the information entropy value of variable V.
[0085] It can be understood that the variables U and V can represent band spectrum data and primary data.
[0086] Because the calculation of NMI values of primary data and spectral data is closely related to the number of bins of equal width, through the loop processing of the algorithm, the NMI values are calculated one by one within the given number of bins, and the NMI values are arranged in descending order.
[0087] In this embodiment, the bands are accumulated in sequence according to the NMI values for modeling, and the band with the best modeling is selected, thereby achieving the effect of noise elimination and background silencing.
[0088] As an optional implementation, the number of bands with the smallest RMSEP (mean square error of prediction) value is selected for modeling, that is, the optimal band.
[0089] The modeling results of the method in this embodiment are compared with the classic band selection methods (VIP, CC, UVE, CARS), and the R2 C , R 2 P , RMSEC, RMSEP, RPD and other indicators verify the accuracy of the method in this embodiment.
[0090] Experimental verification example 1
[0091] In the experimental design, an ideal ternary solvent mixture of water, ethanol and acetic acid was prepared, and the range of water volume fraction in the calibration set was (2%, 4%, 6%, 8%, 10%, 12%), the range of acetic acid volume fraction (1%, 3%, 5%, 7%, 9%, 11%), and the rest was made up by ethanol. The total volume of the solution remained unchanged, for a total of 36 samples. The range of water volume fraction in the verification set was (3%, 4%, 5%, 6%, 7%, 8%, 9%, 10%), each sample fraction was repeated twice, and the volume fractions of acetic acid and ethanol were randomly set to verify the robustness of the method, for a total of 16 samples.
[0092] (1) Collect the near-infrared spectra of the samples as training data sets and obtain the primary data of the samples;
[0093] Before collecting the spectrum, the near-infrared spectrometer was stabilized for 2 hours to ensure that the temperature fluctuation of the instrument was within a stable range. Air was used as the background reference and the background was collected once every hour. The solution sample was placed in a 1mm cuvette and collected in transmission mode. The instrument setting parameters were: spectral scanning range 10000-4000cm -1 , resolution 8cm -1 , the number of scans is 32, and the gain is 1x (B screen). The water content of the sample does not need to be measured, and the proportion of water in the solution is the primary data.
[0094] (2) The equal-width binning method is used for preprocessing. The spectral data is divided into n groups with equal width. Different values are set for the feature points in different groups, and the continuous features are simplified into discrete features. The value of the bin number is set according to the number of samples to be tested, which is about twice the number of samples to be tested. The number of bins designed in this experiment is 100.
[0095] (3) Calculate the standard mutual information value between each band and the primary data for the spectral data after equal-width binning in step (2), and sort the NMI values calculated for each band, as shown in Figure 2(a).
[0096] (4) The bands sorted by NMI value in step (3) are added up one by one for modeling, and the band with the best modeling is selected, as shown in Figure 2(b), with the number of waves selected being 95.
[0097] (5) The selected bands are modeled and compared with other classic band methods to prove the robustness of the binning method-standard mutual information (B-NMI) method. The comparison results are shown in Table 1. The selected band results are shown in Figure 3 The result after B-NMI band selection is significantly improved compared with the original spectrum, and Figure 3 The selected bands show that the bands selected by the B-NMI method are concentrated at 1300-1600nm and 1900-2000nm, both of which are water absorption bands, proving that this method can effectively extract water-related information.
[0098] Table 1 Results of partial least squares regression model of moisture content original spectrum using different band selection methods
[0099]
[0100] Experimental verification example 2
[0101] (1) Collect the near-infrared spectra of the samples as training sets and obtain the primary data of the samples.
[0102] This experiment uses a public corn dataset, which contains 80 samples measured by near-infrared spectroscopy in the spectral range of 1100-2498nm. Each spectrum has 700 data points with a resolution of 2nm. The sample spectral data were measured separately using three near-infrared spectrometers (M5, MP5, and MP6). The corresponding reference values of the moisture, fat, protein, and starch content of these samples were also obtained through laboratory analysis. This experiment only considers the spectral dataset of 80 samples measured by the M5 spectrometer and the corresponding changes in protein content.
[0103] (2) The equal-width binning method is used for preprocessing to highlight the information expressed by each band and the correlation with the primary data;
[0104] The corn data set was divided into a calibration set (60 samples) and a validation set (20 samples) using the KS algorithm. The spectra were then preprocessed with SNV to eliminate the baseline effects of solid scattering. To demonstrate the robustness of this method, this experiment compared the band selection optimization results of the original spectra and the spectra preprocessed with SNV. The calibration set original spectra and the spectra preprocessed with SNV were preprocessed with the primary data using the equal-width binning method, and the spectral data were divided into 100 groups with equal widths. Different values were set for the feature points in different groups, and the continuous features were simplified into discrete features.
[0105] (3) Calculate the standard mutual information (NMI) between the spectral data (original spectrum and spectrum after SNV preprocessing) after equal-width binning in step (2) and the primary data after equal-width binning. The distribution of NMI values between each band of the original spectrum and preprocessed spectrum and the primary data is shown in Figure 4(a) and Figure 4(c), respectively.
[0106] (4) The bands sorted by NMI value in step (3) are added up one by one for modeling, and the band with the smallest RMSEP value is selected. The optimal modeling band of the original spectrum is shown in Figure 4(b), and the selected wave number is 64. The optimal modeling band of the spectrum after SNV processing is shown in Figure 4(d), and the selected wave number is 37.
[0107] (5) The modeling results of this method are compared with those of the classic band selection methods (VIP, CC, UVE, CARS) and the R 2 C , R 2 P , RMSEC, RMSEP, RPD and other indicators verify the accuracy of the method. The comparison results of original spectrum modeling are shown in Table 2, and the comparison results of spectrum modeling after SNV processing are shown in Table 3. The comparison of band areas selected by different methods for original spectra is shown in Figure 5 As shown in the figure, the comparison of band areas selected by different methods after SNV preprocessing is shown in Figure 6 shown.
[0108] Through comparison, it was found that the modeling results of B-NMI-PLSR were significantly better than those of other spectral selection methods, proving the superiority of this method; and the band selected by the B-NMI method was concentrated at 2000-2300nm, which is mainly the absorption band of protein, proving that this method can effectively extract relevant information of protein.
[0109] Table 2 Partial least squares regression model results of corn protein original spectrum using different band selection methods
[0110]
[0111] Table 3 Results of partial least squares regression model for corn protein SNV after different band selection methods
[0112]
[0113] Example 2
[0114] This embodiment provides a near-infrared spectral band selection system based on binning method-standard mutual information, including:
[0115] An equal-width binning processing module is configured to pre-process the near-infrared spectrum of the sample and the corresponding primary data using an equal-width binning method;
[0116] A standard mutual information processing module is configured to calculate the standard mutual information between each band and the primary data for the preprocessed near infrared spectrum, and to sort the obtained standard mutual information values;
[0117] The screening module is configured to accumulate the bands in sequence according to the sorting results for modeling, and screen the best bands according to the modeling results.
[0118] It should be noted that the above modules correspond to the steps described in Example 1, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.
[0119] In further embodiments, there is also provided:
[0120] An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in Embodiment 1 is performed. For the sake of brevity, it will not be described in detail here.
[0121] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0122] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0123] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the method described in Example 1 is completed.
[0124] The method in Example 1 can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it is not described in detail here.
[0125] Those skilled in the art will appreciate that the units, i.e., algorithm steps, of the various examples described in conjunction with this embodiment can be implemented in electronic hardware or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0126] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A near infrared spectroscopy band selection method based on binning method-standard mutual information, characterized in that: include: The near-infrared spectra of the samples and the corresponding primary data were preprocessed using the equal-width binning method; The standard mutual information between each band and the primary data is calculated for the preprocessed near-infrared spectrum, and the obtained standard mutual information values are sorted; According to the sorting results, the bands corresponding to the sorted standard mutual information values are accumulated in turn to perform partial least squares modeling prediction, and the optimal number of bands is screened according to the modeling prediction results, and the number of bands with the smallest predicted mean square error value is selected as the optimal number of bands; The maximum number of iterative bins n for primary data and near-infrared spectra was set to divide primary data and near-infrared spectra into n groups with equal width, and different nominal values were set for data points in different groups; Set the maximum number of iterative bins for the first-level data equal-width binning method to n, and let i = 1; The first-level data is divided into i groups, and the first box width is obtained according to the maximum and minimum values; The corresponding primary data are divided into corresponding groups and replaced with corresponding nominal values; Set the maximum number of iteration bins of the near-infrared spectroscopy equal-width binning method to n, and set j = 1; The second box width is obtained according to the maximum and minimum absorbance values of each band; The corresponding near-infrared spectra are divided into corresponding groups and replaced with corresponding nominal values; Calculate the standard mutual information value of the first-level data after binning and the spectrum of each band; Let j=j+1, i=i+1, and repeat the above steps until the maximum number of iteration boxes n is reached.
2. A near infrared spectroscopy band selection method based on binning method-standard mutual information as claimed in claim 1, characterized in that: The width of the first box Rwid = (Rmax-Rmin) / i; the width of the second box Awid = (Amax-Amin) / j; wherein Rmax is the maximum value of the primary data, Rmin is the minimum value of the primary data, Amax is the maximum value of the absorbance value, and Amin is the minimum value of the absorbance value.
3. A near infrared spectroscopy band selection method based on binning method-standard mutual information as claimed in claim 1, characterized in that: The standard mutual information value is obtained according to the mutual information value of each band and the first-level data and their respective information entropy values, which is: Among them, H(U) is the information entropy value of variable U, H(V) is the information entropy value of variable V, and MI(U,V) is the mutual information value of variables U and V.
4. A near infrared spectroscopy band selection method based on binning method-standard mutual information as claimed in claim 1, characterized in that: Sort the standardized mutual information values in descending order.
5. A near infrared spectroscopy band selection system based on binning method-standard mutual information, characterized in that: include: An equal-width binning processing module is configured to pre-process the near-infrared spectrum of the sample and the corresponding primary data using an equal-width binning method; The maximum number of iterative bins n for primary data and near-infrared spectra was set to divide primary data and near-infrared spectra into n groups with equal width, and different nominal values were set for data points in different groups; Set the maximum number of iterative bins for the first-level data equal-width binning method to n, and let i = 1; The first-level data is divided into i groups, and the first box width is obtained according to the maximum and minimum values; The corresponding primary data are divided into corresponding groups and replaced with corresponding nominal values; Set the maximum number of iteration bins of the near-infrared spectroscopy equal-width binning method to n, and set j = 1; The second box width is obtained according to the maximum and minimum absorbance values of each band; The corresponding near-infrared spectra are divided into corresponding groups and replaced with corresponding nominal values; Calculate the standard mutual information value of the first-level data after binning and the spectrum of each band; Let j = j + 1, i = i + 1, and repeat the above steps until the maximum number of iteration boxes n is reached; A standard mutual information processing module is configured to calculate the standard mutual information between each band and the primary data for the preprocessed near infrared spectrum, and to sort the obtained standard mutual information values; The screening module is configured to accumulate the bands in sequence for modeling according to the sorting results, screen the optimal number of bands according to the modeling results, and select the number of bands with the smallest predicted mean square error value as the optimal number of bands.
6. An electronic device, characterized in that: The method comprises a memory and a processor and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method according to any one of claims 1 to 4 is completed.
7. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the method described in any one of claims 1 to 4.
Citation Information
Patent Citations
Apparatus and methods for selecting light emitters
CN101903698A
Input data processing method and device for categorical data mining model
CN108399255A