A near-infrared spectral band selection method for solid wood boards

By optimizing the near-infrared spectral band selection of solid wood boards using variable projection importance index and binary slime mold algorithm, the problems of relying solely on weights to determine band importance and sample overfitting in existing technologies are solved, achieving more efficient feature wavelength selection and reducing algorithm complexity.

CN116465855BActive Publication Date: 2026-08-25NORTHEAST AGRICULTURAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310438536.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-21
Publication Date
2026-08-25
Estimated Expiration
2043-04-21

AI Technical Summary

Technical Problem

The existing CARS method relies solely on the weights of the bands when selecting near-infrared spectral bands for solid wood panels, and does not consider the phenomenon of sample overfitting, resulting in poor selection performance and high algorithm time complexity.

Method used

The band selection is optimized by using the variable projection importance index and the binary slime mold algorithm. The optimal combination of feature wavelengths is selected by generating sampling vectors, optimizing the position of slime mold individuals, screening feature vector groups, and using cross-validation root mean square error.

Benefits of technology

It improves the band selection effect, reduces the number of algorithm iterations and time complexity, solves the sample overfitting problem, and achieves more efficient feature wavelength selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116465855B_ABST
    Figure CN116465855B_ABST
Patent Text Reader

Abstract

The application discloses a near-infrared spectrum wave band selection method for solid wood boards, and belongs to the technical field of spectrum wave band selection.The application solves the problem that the existing CARS method only relies on the weight value corresponding to the wave band when selecting the near-infrared spectrum wave band of the solid wood board, and does not consider the sample overfitting phenomenon.The application adopts a variable projection importance index and a binary myxomycete algorithm to replace the CARS sampling, a new wave band screening evaluation index is established by introducing the variable projection importance index to optimize the resampling algorithm of the CARS algorithm, and the problem that the wave band selection effect is poor when only relying on the weight value corresponding to the wave band to select the wave band and the model sample exists the overfitting phenomenon is solved.The method can be applied to the spectrum wave band selection of the solid wood board.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of spectral band selection technology, specifically relating to a method for selecting the near-infrared spectral band of solid wood panels. Background Technology

[0002] Near-infrared spectroscopy's excellent discrimination capabilities have led to its successful application in agriculture and forestry. One of its most important applications is the quantitative analysis and detection of the mechanical strength of solid wood panels, i.e., predicting certain properties of solid wood panels. This is due to the wealth of information contained in the near-infrared band of agricultural and forestry products. However, this information also contains a considerable amount of invalid information. This interference means that near-infrared spectral data cannot be directly used to train models, necessitating the selection of feature variables.

[0003] Competitive Adaptive Reweighted Sampling (CARS) is an efficient variable selection algorithm widely used for feature selection in near-infrared spectral data. CARS proposes to select the most relevant combination of variables (feature wavelengths) in a continuous selection process. Based on regression coefficients obtained from a Partial Least Squares (PLS) model, CARS iteratively selects N subsets of variables from N Monte Carlo sampling processes. In each sampling process, a fixed proportion of sample data is randomly selected to build a calibration model. Next, using the obtained regression coefficients, a two-step variable selection procedure is employed to select relevant wavelengths. Finally, cross-validation is used to select the subset with the lowest root mean square error (the most relevant wavelength combination). The main steps of this method are as follows: Monte Carlo sampling; variable removal based on exponential decay function; further competitive screening of variables based on adaptive reweighted sampling technique, according to the "survival of the fittest" principle, by evaluating the weight of each wavelength variable, wavelengths with larger absolute values ​​of regression coefficients are more likely to be selected, and wavelengths with smaller absolute values ​​are more likely to be eliminated; after N samplings, N variable subsets are obtained, and by calculating and comparing the root mean square error of the cross-validation of the variable subsets generated by each sampling, the variable subset with the smallest error value is taken as the optimal variable subset, and the variables contained in this subset are the optimal combination of feature wavelength variables.

[0004] However, CARS's approach of using weighted selection of variables also has two drawbacks: when the calculated weights are large, according to the algorithm's principles, the band should be retained; however, relying solely on weights to determine band importance has limited persuasiveness, leading to poor band selection results. Furthermore, the algorithm does not consider the impact of sample overfitting during band selection. Additionally, the algorithm suffers from weak targeting, numerous iterations, and high time complexity. Summary of the Invention

[0005] The purpose of this invention is to address the problem that the existing CARS method relies solely on the weights of the bands when selecting near-infrared spectral bands for solid wood panels, without considering sample overfitting. Therefore, this invention proposes a new method for selecting near-infrared spectral bands for solid wood panels.

[0006] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0007] A method for selecting the near-infrared spectral band of solid wood panels, the method specifically including the following steps:

[0008] Step 1: Analyze the near-infrared spectrum X of solid wood panels with dimensions N×Q. nir Perform sampling to generate M sampling vectors;

[0009] Step 2: Treat each sampling vector as the initial position of a slime mold in the binary slime mold algorithm, and then combine it with the partial least squares regression algorithm to optimize the position of the slime mold individual. Use the optimized slime mold individual position as the optimized sampling vector.

[0010] The optimized sampling vector corresponding to the slime mold individual whose location is closest to the food is used as the selected sampling vector;

[0011] Step 3: Use the selected sampling vectors to analyze the near-infrared spectrum X. nir Sampling is performed to obtain a set of feature vectors;

[0012] Step 4: Competitively filter wavelengths based on variable projection importance index and feature vector group, and treat all filtered wavelengths as a subset of variables;

[0013] Step 5: Use the optimized sampling vectors from Step 2 to return to Step 2 until the maximum number of iterations N0 is reached, resulting in N0 subsets of variables.

[0014] Then, from the N0 variable subsets, select the variable subset with the smallest root mean square error of cross-validation. The wavelengths contained in the selected variable subset are the optimal combination of feature wavelength variables.

[0015] The beneficial effects of this invention are:

[0016] This invention replaces CARS sampling with a variable projection importance index and a binary slime mold algorithm. By introducing the variable projection importance index, a new band selection evaluation index is established to optimize the resampling algorithm of CARS. This solves the problems of poor band selection performance when relying solely on the weights corresponding to the bands and when the model samples exhibit overfitting. Moreover, the method of this invention is highly targeted and requires fewer iterations, thus reducing the time complexity of the algorithm. Attached Figure Description

[0017] Figure 1 This is a flowchart of the method of the present invention;

[0018] Figure 2 This is a schematic diagram of the band selection results in this invention;

[0019] In the diagram, absorption represents the absorption rate. Detailed Implementation

[0020] Specific Implementation Method 1: Combination Figure 1 This embodiment describes a method for selecting the near-infrared spectral band of solid wood panels. The method specifically includes the following steps:

[0021] Step 1: Analyze the near-infrared spectrum X of solid wood panels with dimensions N×Q. nir Perform sampling to generate M sampling vectors;

[0022] M≤N, where each sample vector is a binary vector containing only 1s and 0s and of dimension Q, and the M sample vectors can form a sample matrix X of dimension M×Q. Sampling ;

[0023] Step 2: Treat each sampling vector as the initial position of a slime mold in the binary slime mold algorithm, and then combine it with the partial least squares regression algorithm (PLS) to optimize the position of the slime mold individual. Use the optimized slime mold individual position as the optimized sampling vector.

[0024] The optimized sampling vector corresponding to the slime mold individual whose location is closest to the food is used as the selected sampling vector;

[0025] Step 3: Use the selected sampling vectors to analyze the near-infrared spectrum X. nir Sampling is performed to obtain a set of feature vectors;

[0026] Step 4: Competitively filter wavelengths based on the Variable Projection Importance Index (VIP) and feature vector groups, and treat all the filtered wavelengths as a subset of variables;

[0027] Step 5: Use the optimized sampling vectors from Step 2 to return to Step 2 until the maximum number of iterations N0 is reached, resulting in N0 subsets of variables.

[0028] Then, based on the PLS model, the subset of variables with the smallest root mean square error (RMSECV) of cross-validation is selected from the N0 subset of variables. The wavelengths contained in the selected subset of variables are the optimal combination of characteristic wavelength variables.

[0029] The selection results obtained by using the method of this invention to select the near-infrared spectral band of solid wood boards are as follows: Figure 2 As shown.

[0030] Specific Implementation Method Two: This implementation method differs from Specific Implementation Method One in that the specific process of step two is as follows:

[0031] Step 2.1: Initialize the number of iterations t = 1;

[0032] Step 22: The food consumed by the slime mold represents the sampling vector with the highest fitness value. The slime mold approaches the food based on odors in the air. The approximation behavior of the slime mold is expressed by a mathematical formula; the mathematical formula is:

[0033]

[0034] Where, X′ i,Sampling (t) represents the position of the i-th slime mold individual after the (t-1)-th iteration in the approximation process, X′ i,Sampling (t+1) represents the position of the i-th slime mold individual after the t-th iteration in the approximation process, where i = 1, 2, ..., M, X b (t) represents the position of the individual with the best fitness value during the approximation process, X. A (t) and X B (t) represents the positions of two random individuals during the approximation process, vb is the parameter that oscillates randomly between [-a, a], and W SmellIndex(i) (t) represents the weights of individual slime molds, vc is a linearly decreasing parameter, and p i (t) represents the control parameter of the i-th slime mold individual in the t-th iteration, r represents the probability that the slime mold shrinks towards the food direction, and r is a random number between [0, 1]. The conversion function bin(·) is used to convert the continuous function into a binary function.

[0035] Steps two and three: After approaching the food, the slime molds wrap around it by updating the position of individual slime molds. The position update method is as follows:

[0036]

[0037] Among them, X i,Sampling(t+1) represents the position of the i-th slime mold individual after the t-th iteration in the wrapping process, X i,Sampling (t) represents the position of the i-th slime mold individual after the (t-1)-th iteration in the wrapping process, UB is the upper boundary of the slime mold position, LB is the lower boundary of the slime mold position, rand represents the probability that the slime mold returns to the upper and lower boundaries and moves back towards the food, rand is a random number uniformly distributed between 0 and 1, and z represents the probability that the rejected slime mold starts moving again from the starting point.

[0038] Step 24: If t < T, then let the iteration number t = t + 1, and return to Step 22;

[0039] Otherwise, the positions of each slime mold individual obtained in the last iteration are used as the optimized sampling vectors, and the optimized sampling vector corresponding to the slime mold closest to the food is used as the selected sampling vector.

[0040] The other steps and parameters are the same as in Specific Implementation Method 1.

[0041] In this embodiment, the slime mold optimization algorithm is used to replace the Monte Carlo optimization algorithm used in the CARS algorithm, resulting in lower time complexity and faster algorithm speed.

[0042] Specific Implementation Method Three: This implementation method differs from Specific Implementation Method One or Two in that the process of solving the fitness value is as follows:

[0043] Step 1: Based on vector X′ i,Sampling The matrix operator representation of (t) is as follows use Extracting near-infrared X-rays nir Feature vectors:

[0044]

[0045] Among them, X i,selection This represents the extracted feature vector. Indicates the use of For X nir Perform sampling;

[0046] The operation performed by the matrix operator is: when vector X′ i,Sampling When the k-th element of (t) is 1, the near-infrared spectrum X nir The k-th band is selected to extract the feature vector X. i,selection middle;

[0047] Step 2: Based on the feature vector X i,selection If a PLS model is established, the fitness value of slime mold is:

[0048]

[0049] Where RMSEP is the fitness value of slime mold, and j represents the feature vector X. i,selection The j-th spectrum in the array, j = 1, 2, ..., Q. y represents the output of the PLS model. j Predicted values ​​representing the mechanical properties of solid wood veneer.

[0050] Other steps and parameters are the same as in specific implementation method one or two.

[0051] Specific Implementation Method Four: This implementation method differs from Specific Implementation Methods One to Three in that the control parameter p i The update method for (t) is as follows:

[0052] p i (t)=tanh|S i (t-1)-DF|

[0053] Among them, S i (t-1) represents the fitness value of the i-th slime mold individual in the (t-1)-th iteration, DF is the current optimal fitness value, and tanh is the hyperbolic tangent function.

[0054] For the first iteration, S i (t-1) represents the fitness value calculated based on the initial sampling vector.

[0055] The other steps and parameters are the same as those in one of the specific implementation methods one to three.

[0056] Specific Implementation Method Five: This implementation method differs from Specific Implementation Methods One to Four in that the weight W of the slime mold individual is... SmellIndex(i) (t) is:

[0057]

[0058] SmellIndex = sort(S(t))

[0059] Where sort(S(t)) represents sorting all slime mold individuals in the t-th iteration according to their fitness values ​​in descending order, SmellIndex represents the sorting result, condition represents the individuals with the highest fitness values ​​in the population, others represent the remaining individuals, bF represents the best fitness value obtained in the (t-1)-th iteration, wF represents the worst fitness value obtained in the (t-1)-th iteration, and W... SmellIndex(i) (t) is the weight of the i-th slime mold individual in the sorting result, and ln represents the logarithm to the base e.

[0060] The other steps and parameters are the same as those in one of the specific implementation methods one to four.

[0061] Specific Implementation Method Six: This implementation method differs from Specific Implementation Methods One to Five in that the variation law of the parameter vb is as follows:

[0062]

[0063] vb∈[-a,a]

[0064] Where T is the maximum number of iterations and a is an intermediate variable.

[0065] The other steps and parameters are the same as those in one of the specific implementation methods one to five.

[0066] Specific Implementation Method Seven: This implementation method differs from Specific Implementation Methods One through Six in that the variation law of the parameter vc is as follows:

[0067] vc = 1 - t / T

[0068] The other steps and parameters are the same as those in one of the specific implementation methods one to six.

[0069] Specific Implementation Method Eight: This implementation method differs from Specific Implementation Methods One through Seven in that the conversion function bin(·) is:

[0070]

[0071] Where V(trans) is the sigmoid transfer function, and trans represents the independent variable of the sigmoid transfer function;

[0072]

[0073] Where e is the base of the natural logarithm.

[0074] The conversion function bin(·) can accept normalized real numbers and real number vectors as input and convert them into binary numbers or vectors.

[0075] The other steps and parameters are the same as those in any of the specific implementation methods one to seven.

[0076] Specific Implementation Method Nine: This implementation method differs from Specific Implementation Methods One to Eight in that the specific process of step four is as follows:

[0077] Step 4.1: Build a PLS model using feature vector sets. The structure of a PLS model with h latent variables is as follows:

[0078] X = TP tr +E

[0079] y = Tb + f

[0080] T = XW

[0081] W = W(P) tr W * ) -1

[0082] Where X represents the eigenvector group, T represents the fractional matrix, P represents the loading matrix, and P tr Let P be the transpose of matrix P, y be the measured response vector, b be the regression coefficient vector of T, and the k-th element of b explain the response y and the k-th column vector t of T. k The relationship between them is as follows: E represents the random error of X, f represents the random error of y, and W... * Let W represent the PLS model weight matrix, where W is the PLS weight that minimizes ||f|| (Euclidean norm), and -1 represents the inverse of the matrix.

[0083] Step 4.2: In near-infrared spectroscopy quantitative analysis, the variable projection importance index VIP of the j-th wavelength in the eigenvector group. j The calculation formula is as follows:

[0084]

[0085]

[0086] Where k = 1, 2, ..., h, h represents the number of latent variables, b k It is the k-th element of b, t k w is the k-th vector of T k It is W * The k-th vector, p is the column number of X, w k =(w 1k w 2k , ..., w jk , ..., w Qk ), w jk For w k The loading weight of the j-th wavelength, where ||·|| represents the norm;

[0087] The Q′ wavelengths with the highest variable projection importance index values ​​are selected, and all selected wavelengths are treated as a subset of variables.

[0088] The other steps and parameters are the same as those in one of the specific implementation methods one to eight.

[0089] In this embodiment, the resampling method of the variable projection importance index is used to replace the adaptive weighted sampling method of the CARS algorithm, which solves the problem of strong correlation between near-infrared spectral bands and avoids the problem of poor selection effect when selecting bands based on weights.

[0090] The above examples of this invention are merely illustrative of the computational model and process of this invention, and are not intended to limit the implementation of this invention. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is impossible to exhaustively list all possible implementations here. Any obvious variations or modifications derived from the technical solutions of this invention are still within the scope of protection of this invention.

Claims

1. A method for selecting the near-infrared spectral band of solid wood panels, characterized in that, The method specifically includes the following steps: Step 1: Near-infrared spectrum of solid wood board with dimensions N×Q Perform sampling to generate M sampling vectors; Step 2: Treat each sampling vector as the initial position of a slime mold in the binary slime mold algorithm, and then combine it with the partial least squares regression algorithm to optimize the position of the slime mold individual. Use the optimized slime mold individual position as the optimized sampling vector. The optimized sampling vector corresponding to the slime mold individual whose location is closest to the food is used as the selected sampling vector; Step 3: Use the selected sampling vectors to analyze the near-infrared spectrum. Sampling is performed to obtain a set of feature vectors; Step 4: Competitively filter wavelengths based on variable projection importance index and feature vector group, and treat all filtered wavelengths as a subset of variables; The specific process of step four is as follows: Step 4.1: Build a PLS model using feature vector sets. The structure of a PLS model with h latent variables is as follows: in, Represents a set of feature vectors. Represents a fractional matrix. Represents the load matrix, Representation matrix transpose, Represents the measured response vector. express The regression coefficient vector, express random error, express random error, This represents the weight matrix of the PLS model. It is ordered The minimum PLS weight, -1 represents the inverse of the matrix; Step 4.2: Projection importance index value of the j-th wavelength of the feature vector group. The calculation formula is as follows: in, h represents the number of latent variables. It is the k-th element of b. It is the k-th vector of T. yes The k-th vector, where p is the column number of X. , for The loading weight of the j-th wavelength, Representational norm; Project the variable with the highest importance index value Each wavelength is selected, and all selected wavelengths are treated as a subset of variables. Step 5: Use the optimized sampling vectors from Step 2 to return to Step 2, until the set maximum number of iterations is reached. Stop at time, get A subset of variables; From again The subset of variables with the smallest root mean square error in cross-validation is selected from the subset of variables. The wavelengths contained in the selected subset of variables are the optimal combination of feature wavelength variables.

2. The method for selecting the near-infrared spectral band of solid wood panels according to claim 1, characterized in that, The specific process of step two is as follows: Step 2.1 Initialize the number of iterations =1; Step 22: Slime molds approach food based on odors in the air. This approach behavior can be expressed using a mathematical formula; the mathematical formula is: in, Indicates the first step in the approximation process. After the nth iteration The location of each slime mold individual. Indicates the first step in the approximation process. After the nth iteration The location of each slime mold individual. , This indicates the position of the individual with the best fitness value during the approximation process. and To represent the positions of two random individuals during the approximation process. In order to be in The parameters of random oscillation between them It is the weight of individual slime molds. The parameter is linearly decreasing. For the first The second iteration Control parameters for individual slime molds The transition function represents the probability that the slime mold will contract towards the food source. Used to convert continuous functions into bivariate functions; Steps two and three: After approaching the food, the slime molds wrap around it by updating the position of individual slime molds. The position update method is as follows: in, Indicates the first step in the package delivery process After the nth iteration The location of each slime mold individual. Indicates the first step in the package delivery process After the nth iteration The location of each slime mold individual. This marks the upper boundary of the slime mold's location. This marks the lower boundary of the slime mold's location. This represents the probability that the slime mold returns to the upper and lower boundaries and moves back towards the food source. This represents the probability that a rejected slime mold will restart its movement from the starting point. Step Two Four, if Then let the number of iterations be... And return to step two; Otherwise, the positions of each slime mold individual obtained in the last iteration are used as the optimized sampling vectors, and the optimized sampling vector corresponding to the slime mold closest to the food is used as the selected sampling vector.

3. The method for selecting the near-infrared spectral band of solid wood panels according to claim 2, characterized in that, The process of solving for the fitness value is as follows: Step 1: Based on vectors The matrix operator is represented as ,use Extracting near-infrared spectra Feature vectors: in, This represents the extracted feature vector. Indicates the use of right Perform sampling; Step 2: Based on the feature vector If a PLS model is established, the fitness value of slime mold is: in, This represents the fitness value of slime molds. Representative eigenvector The first in One spectrum, , This represents the output of the PLS model. Predicted values ​​representing the mechanical properties of solid wood veneer.

4. The method for selecting the near-infrared spectral band of solid wood panels according to claim 2, characterized in that, The control parameters The update method is as follows: in, Indicates the first The second iteration Fitness value of an individual slime mold. This represents the currently obtained optimal fitness value. It is the hyperbolic tangent function.

5. The method for selecting the near-infrared spectral band of solid wood panels according to claim 4, characterized in that, The weight of the slime mold individuals for: in, Representative on the first In the next iteration, the fitness values ​​of all slime mold individuals are sorted in descending order. This represents the sorting results. `condition` indicates the individuals in the top half with the highest fitness values, and `others` represents the remaining individuals. Indicates the first The optimal fitness value obtained in the next iteration Indicates the first The worst fitness value obtained in the second iteration It is the number ranked in the sorting results. The weight of a slime mold individual at position e, where ln represents the logarithm to the base e.

6. The method for selecting the near-infrared spectral band of solid wood panels according to claim 5, characterized in that, The parameters The pattern of change is as follows: in, The maximum number of iterations, It is an intermediate variable.

7. The method for selecting the near-infrared spectral band of solid wood panels according to claim 6, characterized in that, The parameters The pattern of change is as follows: 。 8. The method for selecting the near-infrared spectral band of solid wood panels according to claim 7, characterized in that, The conversion function for: in, It is an sigmoid transfer function. The independent variable representing the sigmoid transfer function; in, It is the base of the natural logarithm.

Citation Information

Patent Citations

  • Near-infrared characteristic spectrum variable selection method based on window competitive self-adaptive reweighted sampling strategy

    CN109060716A

  • Multi-model fused spectral wavelength selection method

    CN113049507A