Multi-component spectral feature selection method based on double-layer optimization

By employing a two-layer optimized spectral feature selection method, combined with the SparseEA and Relief algorithms, the selection of spectral features and noise fitting are dynamically adjusted, thus solving the problems of high dimensionality and noise in spectral data and improving the accuracy and noise resistance of the spectral model.

CN120929797APending Publication Date: 2025-11-11XIAN UNIV OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510764473.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing spectral feature selection methods are inefficient when dealing with high-dimensionality, redundancy, and noise issues, making it difficult to establish high-precision quantitative spectral analysis models.

Method used

A multi-component spectral feature selection method based on bilayer optimization is adopted. By combining bilayer encoding of SparseEA and the Relief feature selection algorithm with genetic operators and Gaussian functions to dynamically adjust feature selection and noise fitting, key wavelengths are identified and data dimensionality is reduced.

Benefits of technology

It significantly improves the accuracy and noise resistance of spectral data processing, effectively reduces model redundancy and noise interference, and improves the accuracy of spectral models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929797A_ABST
    Figure CN120929797A_ABST
Patent Text Reader

Abstract

The invention provides a multi-component spectral feature selection method based on double-layer optimization, and aims to solve the problem of model performance reduction caused by high dimension, redundancy and noise interference in hyperspectral data. The method comprises the following steps: performing binary and real value vector double-layer coding on individuals, and randomly generating an initial population based on a fitness value; and then, calculating an importance score delta of each spectral variable in evolutionary iteration in combination with a filtering type Relief feature selection method so as to dynamically guide population optimization. A Gaussian function dynamic noise reduction method based on importance scores is designed in the optimization process, and interference noise existing in spectral variables is optimized and fitted through real number vectors; and finally, obtaining an optimal spectral feature subset through an environment selection strategy. According to the method, the data dimension can be effectively reduced, noisy and redundant spectral variables are eliminated, and the accuracy of the model is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine learning and feature selection, specifically a multi-component spectral feature selection method based on two-layer optimization. Background Technology

[0002] Spectral feature selection refers to the process of selecting wavelengths with significant characteristics from the original spectrum. Existing technologies still face several challenges and limitations in solving this problem. First, most feature selection methods primarily address the optimization of a single objective, considering only the algorithm's error on the selected subset while ignoring the impact of the feature subset's size. Spectral data is typically high-dimensional, and selecting all wavelengths increases computational complexity. Second, for multi-component spectral feature selection, the detection spectra of complex mixtures exhibit overlapping and intersecting peaks, resulting in a large number of redundant and interfering wavelength variables in the spectral data. This redundant information degrades the performance of the established quantitative spectral analysis model, leading to a spectral feature selection problem. Most existing feature selection methods employ sparse multi-objective optimization algorithms. Compared to traditional multi-objective evolutionary algorithms, sparse multi-objective optimization algorithms can more efficiently select the optimal feature subset when dealing with large-scale sparse feature selection problems, reducing the impact of redundant information on classification results and improving the accuracy of the quantitative spectral analysis model. However, existing sparse multi-objective algorithms struggle to handle noise in spectral datasets when solving feature selection problems.

[0003] Spectral data commonly suffers from noise, which originates from various factors such as random noise, optical noise, and electronic noise. The noise content and distribution in actual acquired spectral data are uncertain, and existing denoising methods often only address specific types of noise, failing to cope with this uncertainty. Therefore, more flexible and adaptable spectral feature selection techniques are needed to solve these problems. Summary of the Invention

[0004] To overcome the shortcomings of existing technologies, this invention proposes a multi-component spectral feature selection method based on two-layer optimization to solve the multi-component spectral feature selection problem. This method uses an evolutionary algorithm to continuously optimize the iterative process, identifying and retaining key wavelengths with significant features, thereby reducing data complexity and enhancing the accuracy of spectral data processing.

[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0006] A multi-component spectral feature selection method based on bilayer optimization includes:

[0007] Step 1: Using SparseEA's two-layer encoding method, individuals are represented as the product of a binary vector Mask and a real-valued vector Dec, and the initial score of the spectral variable is calculated.

[0008] Step 2: Generate the initial population P based on the initial scores of the obtained spectral variables;

[0009] Step 3: Perform binary classification on population P based on non-dominated sorting;

[0010] Step 4: Based on the classification results, calculate the importance score δ of the spectral variable using the filtered Relief feature selection method;

[0011] Step 5: Based on the importance score δ, and combined with the genetic operator, dynamically guide the evolution of the binary vector Mask of the population P to obtain the binary vector matrix O.Mask of the offspring population O;

[0012] Step 6: Based on the importance score δ, and combined with the genetic operator to dynamically guide the evolution of the real-valued vector Dec of the population P, the real-valued vector matrix O.Dec of the offspring population O is obtained;

[0013] Step 7: After obtaining the offspring population, generate the next generation population P using environmental selection methods. ' ;

[0014] Step 8: Repeat steps 3 to 7 until the iteration termination condition is met, and then output the final Pareto optimal solution.

[0015] Furthermore, step one includes:

[0016] Step 1.1: Construct a D×D real-valued vector matrix Dec = [Dec1, Dec2, ..., Dec] for combining spectral wavelengths. i Dec D ], where D represents the number of wavelength variables, Dec i Let represent the real-valued vector of the i-th spectral wavelength combination, and Dec i =[Dec i,1 Dec i,2 Dec i,j Dec i,D ], where Dec i,j This represents the real value of the j-th wavelength variable in the i-th spectral wavelength combination; simultaneously, it constructs a D×D binary vector matrix Mask = [Mask1, Mask2, ..., Mask...]. i Mask D ], where Mask i Mask represents the binary vector of the i-th spectral wavelength combination.i,j This represents the binary value of the j-th wavelength variable in the i-th spectral wavelength combination.

[0017] The initialization matrix Mask is the identity matrix, i.e., Mask i,i =1 (i = 1, 2, 3, ..., D), with all other elements being 0; initialize the matrix Dec as a uniformly selected random number matrix; thus obtaining the j-th wavelength variable X of the i-th spectral wavelength combination individual. i,j , represented as X i,j =Dec i,j ×Mask i,j .

[0018] Step 1.2: Construct the spectral wavelength combination matrix Q = [X1, X2, ..., X...] i , ..., X D ], where X i =[X i,1 X i,2 , ..., X i,j , ..., X i,D ]; Non-dominated ordination is performed on D individuals with different spectral wavelength combinations in population Q, resulting in the non-dominated ordination result F = [F1, F2, ..., F i …, F D ], where F i Represents the individual X with the i-th spectral wavelength combination. i The number of non-dominated fronts, F, is the number of non-dominated fronts of the i-th spectral wavelength combination individual. i As the initial score for the i-th wavelength variable, Score = [F1, F2, ..., F... i …, F D ];

[0019] Furthermore, step two includes:

[0020] Step 2.1: Construct an initial real-valued vector matrix of spectral wavelength combination with dimension N×D, Dec = [Dec1, Dec2, ..., Dec...]. k Dec N [], where N represents the number of individuals with spectral wavelength combinations, and each real-valued vector is a uniformly selected random number; simultaneously, a zero matrix of dimension N×D is constructed as a binary vector matrix Mask = [Mask1, Mask2, ..., Mask] k Mask N ].

[0021] Step 2.2: Based on the initial scores of the wavelength variables, a binary tournament selection strategy is used to randomly select rand()×D elements from the binary vector of each individual combination of spectral wavelength variables and set them to 1, where rand() represents a random number uniformly distributed in the interval [0, 1], thus obtaining the modified binary vector matrix Mask. The k-th row of the Dec matrix is ​​then... k Mask in the k-th row of the Mask matrix k Multiplying them together yields the k-th spectral wavelength combination individual X. k This leads to the initial population P = [X1, X2, ..., X...] k , ..., X N ].

[0022] Furthermore, step three includes:

[0023] Step 3.1: Construct a label vector of dimension 1×N: Label = [Label1, Label2, ..., Label...] k , ..., Label N ], among which, Label k The tag representing the individual with the k-th spectral wavelength combination;

[0024] Step 3.2: Perform non-dominated sorting on population P and divide it into two categories. Set the label of individuals with non-dominated spectral wavelength combinations to 1 and the label of individuals with dominant spectral wavelength combinations to 0.

[0025] Furthermore, step four includes:

[0026] Step 4.1: Calculate the individual X with any i-th spectral wavelength combination in population P. i Individual X with the j-th spectral wavelength combination j Euclidean distance between them (distance(X)) i X j The Euclidean distance is calculated as shown in equation (1):

[0027]

[0028] In the formula, X i,k and X j,k They represent X respectively i and X j The k-th wavelength variable in the equation.

[0029] Step 4.2: Construct and initialize the collection Let these represent the sets of nearest neighbors that have the same label as the target instance and the sets of nearest neighbors that have different labels as the target instance, respectively. Construct and initialize these sets. These represent the nearest neighbors that have the same label as the target instance and the nearest neighbors that have different labels from the target instance, respectively.

[0030] Step 4.3: If the i-th spectral wavelength combination individual X i Label i Individual X with the j-th spectral wavelength combination j Label j Same, that is, individual X i With X j If they are individuals of the same type, then distance(X) will be used. i X j Add X to NearhitSet j Add it to the hit list; similarly, if the two labels are different, i.e., individual X i With X j If they are different classes, then distance(X) will be used. i X j Add X to NearmissSet j Add to miss;

[0031] Step 4.4: Find the match between X and NearhitSet i The closest combination of spectral wavelengths is X i Guessing the neighbor Select the NearmissSet that matches X i The closest combination of spectral wavelengths is X i Misjudging the neighbor The importance score δ of the k-th wavelength variable in population P can then be calculated using equation (2). k .

[0032]

[0033] In equation (2), X represents i The k-th wavelength variable X in i,k And guessed the neighbor The k-th wavelength variable European distance between them X represents i The k-th wavelength variable X in i,k Misjudging a Neighbor The k-th wavelength variable The Euclidean distance between them.

[0034] In the implementation examples of this specification, step five includes:

[0035] Step 5.1: Randomly select two individuals p and q from the population P to generate a child o, whose binary vector o.mask value is the same as the binary vector p.mask value of the parent p.

[0036] Step 5.2: Based on the importance score of the wavelength variable, perform the following two-step crossover operation on the binary vector of offspring o with equal probability: from Two wavelength variables are randomly selected from the non-zero variables, and the binary value of the variable with the lower importance score is set to 0; or from... Two wavelength variables are randomly selected from the non-zero variables, and the binary value of the variable with the higher importance score is set to 1; where, This represents the inversion of the binary vector q.mask of q. This represents the inversion of the binary vector p.mask of p;

[0037] Step 5.3: Based on the importance scores of the wavelength variables, perform the following two-step mutation operation on the binary vector of the offspring o with equal probability: randomly select two wavelength variables from the non-zero variables of o.mask, and set the binary value of the variable with the lower importance score to 0; or from Two wavelength variables are randomly selected from the non-zero variables, and the binary value of the variable with the higher importance score is set to 1; where, This represents the inversion of the binary vector o.mask of o;

[0038] Step 5.4: Repeat steps 5.1 to 5.3 until the binary vector matrix O.Mask of the offspring population O is obtained.

[0039] Furthermore, step six includes:

[0040] Step 6.1: Define a variable Δ. Based on the importance score δ of each wavelength variable in the parent p and q, introduce a Gaussian function to calculate the fluctuation range Δ of each wavelength variable. Update the search space of the dec value of each wavelength variable of the generated offspring individual o, which is dec±Δ.

[0041] Step 6.2: For each individual o in the offspring population O, perform simulated binary crossover and polynomial mutation operations based on the real-valued vectors p.dec and q.dec of its corresponding parents p and q, to ​​generate the real-valued vector o.dec of the offspring individual o, and use it as the baseline value. Determine the search space of the offspring individual o based on the calculated Δ value; specifically, when the value of o.dec is greater than the upper limit value dec+Δ, take the upper limit value dec+Δ; when the value of o.dec is less than the lower limit value dec-Δ, take the lower limit value dec-Δ; thus obtaining the real-valued vector matrix O.dec of the spectral wavelength variable combination of the offspring population O.

[0042] Furthermore, step seven includes: obtaining the offspring individual o = o.mask × o.dec based on the above steps, thus obtaining each offspring individual in the offspring population O. Then, the population P and the offspring population O are screened using an environmental selection method. Solutions with better Pareto non-dominated fronts and crowding distances are retained, thereby generating the next generation population P. ' ;

[0043] Furthermore, step eight includes: determining whether the iteration termination condition is met; when the iteration termination condition is met, outputting the Pareto optimal solution, which is the final spectral feature selection scheme.

[0044] Compared with existing technologies, the beneficial effects of this invention are reflected in:

[0045] 1. This invention addresses the problems of high dimensionality, redundancy, and noise interference in spectral data by designing a multi-component spectral feature selection method based on dual-layer optimization. Through a dual-layer encoding strategy, binary vectors and real-valued vectors are combined, and feature selection and noise fitting are dynamically adjusted during the evolution process. This effectively reduces data dimensionality, eliminates redundancy and noise interference, and significantly improves the accuracy of the model.

[0046] 2. This invention designs a feature selection strategy based on a filtering relief algorithm, which dynamically calculates the importance score of each spectral variable during evolutionary iteration and uses it to guide population optimization. This strategy can more efficiently identify and retain key features and find the optimal combination of spectral wavelengths.

[0047] 3. This invention designs a dynamic noise reduction method based on the Gaussian function of importance score. In the real-value optimization problem of wavelength elements, the Gaussian function is used to determine the perturbation range of each wavelength element, thereby limiting the optimization boundary of the real-value vector, thus more accurately suppressing the influence of noise on the model and improving the noise resistance of the established spectral model. Attached Figure Description

[0048] Figure 1 This is a flowchart illustrating the multi-component spectral feature selection method based on bilayer optimization proposed in this invention. Detailed Implementation

[0049] In this implementation example, a multi-component spectral feature selection method based on two-layer optimization is designed. In the initial stage of the algorithm, a two-layer encoding strategy is used to calculate the initial score for each wavelength variable, and an initial population is generated through a binary tournament selection strategy. During the main loop of the algorithm, new parents are obtained based on the number of non-dominated fronts and crowding distance of the population, and the importance score δ of the updated wavelength variables is calculated and updated. Genetic operators are used to guide the evolution of the binary vector and real-valued vector of the population, respectively, to obtain the offspring population. Environmental selection is then performed to generate the next generation population, and this process is repeated iteratively until the termination condition is met, outputting the final Pareto optimal solution, thus achieving spectral feature selection. Specifically, as shown... Figure 1 As shown, the method for selecting the spectral wavelength is performed according to the following steps:

[0050] Step 1: Using SparseEA's two-layer encoding method, individuals are represented as the product of a binary vector Mask and a real-valued vector Dec, and the initial score of the spectral variable is calculated.

[0051] Step 1.1: Construct a D×D real-valued vector matrix Dec = [Dec1, Dec2, ..., Dec] for combining spectral wavelengths. i Dec D ], where D represents the number of wavelength variables, Dec i Let represent the real-valued vector of the i-th spectral wavelength combination, and Dec i =[Dec i,1 Dec i,2 Dec i,j Dec i,D ], where Dec i,j This represents the real value of the j-th wavelength variable in the i-th spectral wavelength combination; simultaneously, it constructs a D×D binary vector matrix Mask = [Mask1, Mask2, ..., Mask...]. i Mask D ], where Mask i Mask represents the binary vector of the i-th spectral wavelength combination. i,j This represents the binary value of the j-th wavelength variable in the i-th spectral wavelength combination.

[0052] The initialization matrix Mask is the identity matrix, i.e., Mask i,i =1 (i = 1, 2, 3, ..., D), with all other elements being 0; initialize the matrix Dec as a uniformly selected random number matrix; thus obtaining the j-th wavelength variable X of the i-th spectral wavelength combination individual. i,j , represented as X i,j =Dec i,j ×Mask i,j .

[0053] Step 1.2: Construct the spectral wavelength combination matrix Q = [X1, X2, ..., X...] i , ..., X D ], where X i =[X i,1 X i,2 , ..., X i,j , ..., X i,D ]; Non-dominated ordination is performed on D individuals with different spectral wavelength combinations in population Q, resulting in the non-dominated ordination result F = [F1, F2, ..., F i …, F D ], where F i Represents the individual X with the i-th spectral wavelength combination. i The number of non-dominated fronts, F, is the number of non-dominated fronts of the i-th spectral wavelength combination individual. i As the initial score for the i-th wavelength variable, Score = [F1, F2, ..., F... i …, F D ];

[0054] Step 2: Generate the initial population P based on the initial scores of the obtained spectral variables;

[0055] Step 2.1: Construct an initial real-valued vector matrix of spectral wavelength combination with dimension N×D, Dec = [Dec1, Dec2, ..., Dec...]. k Dec N [], where N represents the number of individuals with spectral wavelength combinations, and each real-valued vector is a uniformly selected random number; simultaneously, a zero matrix of dimension N×D is constructed as a binary vector matrix Mask = [Mask1, Mask2, ..., Mask] k Mask N ].

[0056] Step 2.2: Based on the initial scores of the wavelength variables, a binary tournament selection strategy is used to randomly select rand()×D elements from the binary vector of each individual combination of spectral wavelength variables and set them to 1, where rand() represents a random number uniformly distributed in the interval [0, 1], thus obtaining the modified binary vector matrix Mask. The k-th row of the Dec matrix is ​​then... k Mask in the k-th row of the Mask matrix k Multiplying them together yields the k-th spectral wavelength combination individual X. k This leads to the initial population P = [X1, X2, ..., X...] k , ..., X N ].

[0057] Step 3: Divide population P into two categories based on non-dominated sorting;

[0058] Step 3.1: Construct a label vector of dimension 1×N: Label = [Label1, Label2, ..., Label1] k , ..., Label N ], among which, Label k The tag representing the individual with the k-th spectral wavelength combination;

[0059] Step 3.2: Perform non-dominated sorting on population P and divide it into two categories. Set the label of individuals with non-dominated spectral wavelength combinations to 1 and the label of individuals with dominant spectral wavelength combinations to 0.

[0060] Step 4: Based on the classification results, calculate the importance score δ of the spectral variable using the filtered Relief feature selection method;

[0061] Step 4.1: Calculate the individual X with any i-th spectral wavelength combination in population P. i Individual X with the j-th spectral wavelength combination j Euclidean distance between them (distance(X)) i X j The Euclidean distance is calculated as shown in equation (1):

[0062]

[0063] In the formula, X i,k and X j,k They represent X respectively i and X j The k-th wavelength variable in the equation.

[0064] Step 4.2: Construct and initialize the collection Let these represent the sets of nearest neighbors that have the same label as the target instance and the sets of nearest neighbors that have different labels as the target instance, respectively. Construct and initialize these sets. These represent the nearest neighbors that have the same label as the target instance and the nearest neighbors that have different labels from the target instance, respectively.

[0065] Step 4.3: If the i-th spectral wavelength combination individual X i Label i Individual X with the j-th spectral wavelength combination j Label j Same, that is, individual X i With X j If they are individuals of the same type, then distance(X) will be used. i X j Add X to NearhitSet jAdd it to the hit list; similarly, if the two labels are different, i.e., individual X i With X j If they are different classes, then distance(X) will be used. i X j Add X to NearmissSet j Add to miss;

[0066] Step 4.4: Find the match between X and NearhitSet i The closest combination of spectral wavelengths is X i Guessing the neighbor Select the NearmissSet that matches X i The closest combination of spectral wavelengths is X i Misjudging the neighbor The importance score δ of the k-th wavelength variable in population P can then be calculated using equation (2). k .

[0067]

[0068] In equation (2), X represents i The k-th wavelength variable X in i,k And guessed the neighbor The k-th wavelength variable European distance between them X represents i The k-th wavelength variable X in i,k Misjudging the Neighbor The k-th wavelength variable The Euclidean distance between them.

[0069] Step 5: Based on the importance score δ, and combined with the genetic operator, dynamically guide the evolution of the binary vector Mask of the population P to obtain the binary vector matrix O.Mask of the offspring population O;

[0070] Step 5.1: Randomly select two individuals p and q from the population P to generate a child o, whose binary vector o.mask value is the same as the binary vector p.mask value of the parent p.

[0071] Step 5.2: Based on the importance score of the wavelength variable, perform the following two-step crossover operation on the binary vector of offspring o with equal probability: from Two wavelength variables are randomly selected from the non-zero variables, and the binary value of the variable with the lower importance score is set to 0; or from... Two wavelength variables are randomly selected from the non-zero variables, and the binary value of the variable with the higher importance score is set to 1; where, This represents the inversion of the binary vector q.mask of q. This represents the inversion of the binary vector p.mask of p;

[0072] Step 5.3: Based on the importance scores of the wavelength variables, perform the following two-step mutation operation on the binary vector of the offspring o with equal probability: randomly select two wavelength variables from the non-zero variables of o.mask, and set the binary value of the variable with the lower importance score to 0; or from Two wavelength variables are randomly selected from the non-zero variables, and the binary value of the variable with the higher importance score is set to 1; where, This represents the inversion of the binary vector o.mask of o;

[0073] Step 5.4: Repeat steps 5.1 to 5.3 until the binary vector matrix O.Mask of the offspring population O is obtained;

[0074] Step 6: Based on the importance score δ, and combined with the genetic operator to dynamically guide the evolution of the real-valued vector Dec of the population P, the real-valued vector matrix O.Dec of the offspring population O is obtained;

[0075] Step 6.1: Define a variable Δ. Based on the importance score δ of each wavelength variable in the parent p and q, introduce a Gaussian function to calculate the fluctuation range Δ of each wavelength variable. Update the search space of the dec value of each wavelength variable of the generated offspring individual o, which is dec±Δ.

[0076] Step 6.2: For each individual o in the offspring population O, simulated binary crossover and polynomial mutation operations are performed based on the real-valued vectors p.dec and q.dec of its corresponding parents p and q, generating the real-valued vector o.dec of the offspring individual o. This vector is then used as a baseline value. The search space of the offspring individual o is determined based on the calculated Δ value. Specifically, when the value of o.dec is greater than the upper limit dec+Δ, the upper limit dec+Δ is used; when the value of o.dec is less than the lower limit dec-Δ, the lower limit dec-Δ is used. This yields the real-valued vector matrix O.dec of the spectral wavelength variable combination of the offspring population O.

[0077] Step 7: After obtaining the offspring population, generate the next generation population P using environmental selection methods. ' ;

[0078] Step 7.1: Calculate the offspring individual o = o.mask × o.dec based on the real-valued vector and binary vector of the offspring individual o; thus generating each offspring individual in the offspring population O.

[0079] Step 7.2: Select from population P and offspring population O using environmental selection methods to generate the next generation population P.' ;

[0080] Step 8: Repeat steps 3 to 7 until the iteration termination condition is met, and then output the final Pareto optimal solution.

[0081] Determine whether the iteration termination condition is met. If the iteration termination condition is met, output the Pareto optimal solution, which is the final spectral feature selection scheme.

[0082] In summary, the multi-component spectral feature selection method proposed in this invention achieves efficient screening of spectral data features through the synergistic effect of a dual-layer coding structure and a dynamic evolution mechanism. It can effectively reduce the dimensionality of spectral wavelength data, improve the noise resistance of the constructed spectral model, and realize the processing and analysis of complex spectral data.

[0083] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of protection claimed by the present invention. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A multi-component spectral feature selection method based on bilayer optimization, characterized in that, The steps are as follows: Step 1: Using SparseEA's two-layer encoding method, individuals are represented as the product of a binary vector Mask and a real-valued vector Dec, and the initial score of the spectral variable is calculated. Step 2: Generate the initial population P based on the initial scores of the obtained spectral variables; Step 3: Divide population P into two categories based on non-dominated sorting; Step 4: Based on the classification results, calculate the importance score δ of the spectral variable using the filtered Relief feature selection method; Step 5: Based on the importance score δ, and combined with the genetic operator, dynamically guide the evolution of the binary vector Mask of the population P to obtain the binary vector matrix O.Mask of the offspring population O; Step 6: Based on the importance score δ, and combined with the genetic operator to dynamically guide the evolution of the real-valued vector Dec of the population P, the real-valued vector matrix O.Dec of the offspring population O is obtained; Step 7: After obtaining the offspring population, generate the next generation population P using environmental selection methods. ' ; Step 8: Repeat steps 3 to 7 until the iteration termination condition is met, and then output the final Pareto optimal solution.

2. The method for selecting multi-component spectral features based on bilayer optimization according to claim 1, characterized in that, Step one includes: Step 1.1: Construct a D×D real-valued vector matrix Dec = [Dec1, Dec2, ..., Dec] for spectral wavelength combinations. i ,…,Dec D ], where D represents the number of wavelength variables, Dec i Let represent the real-valued vector of the i-th spectral wavelength combination, and Dec i =[Dec i,1 Dec i,2 ,…,Dec i,j ,…,Dec i,D ], where Dec i,j This represents the real value of the j-th wavelength variable in the i-th spectral wavelength combination; simultaneously, it constructs a D×D binary vector matrix Mask = [Mask1, Mask2, ..., Mask]. i Mask D ], where Mask i Mask represents the binary vector of the i-th spectral wavelength combination. i,j This represents the binary value of the j-th wavelength variable in the i-th spectral wavelength combination; The initialization matrix Mask is the identity matrix, i.e., Mask i,i =1 (i=1,2,3,…,D), with all other elements being 0; initialize the matrix Dec as a uniformly selected random number matrix; thus obtaining the j-th wavelength variable X of the i-th spectral wavelength combination individual. i,j , represented as X i,j =Dec i,j ×Mask i,j ; Step 1.2: Construct the spectral wavelength combination matrix Q = [X1, X2, ..., X...] i ,…,X D ], where X i =[X i,1 ,X i,2 ,…,X i,j ,…,X i,D ]; Non-dominated ordination is performed on D individuals with different spectral wavelength combinations in population Q, resulting in the non-dominated ordination result F = [F1, F2, ..., F i ...,F D ], where F i Represents the individual X with the i-th spectral wavelength combination. i The number of non-dominated fronts, F, is the number of non-dominated fronts of the i-th spectral wavelength combination individual. i As the initial score for the i-th wavelength variable, Score = [F1, F2, ..., F i ...,F D ].

3. The method for selecting multi-component spectral features based on bilayer optimization according to claim 1, characterized in that, Step two includes: Step 2.1: Construct an initial real-valued vector matrix of spectral wavelength combination with dimension N×D, Dec = [Dec1, Dec2, ..., Dec...]. k ,…,Dec N [], where N represents the number of individuals with spectral wavelength combinations, and each real-valued vector is a uniformly selected random number; simultaneously, a zero matrix of dimension N×D is constructed as a binary vector matrix Mask = [Mask1, Mask2, ..., Mask] k Mask N ]; Step 2.2: Based on the initial scores of the wavelength variables, a binary tournament selection strategy is used to randomly select rand()×D elements from the binary vector of each individual combination of spectral wavelength variables and set them to 1, where rand() represents a random number uniformly distributed in the interval [0,1], thus obtaining the modified binary vector matrix Mask. The k-th row of the Dec matrix is ​​then... k Mask in the k-th row of the Mask matrix k Multiplying them together yields the k-th spectral wavelength combination individual X. k This leads to the initial population P = [X1, X2, ..., X...] k ,…,X N ].

4. The method for selecting multi-component spectral features based on bilayer optimization according to claim 1, characterized in that, Step three includes: Step 3.1: Construct a label vector of dimension 1×N: Label = [Label1, Label2, ..., Label k ,…,Label N ], among which, Label k The tag representing the individual with the k-th spectral wavelength combination; Step 3.2: Perform non-dominated sorting on population P and divide it into two categories. Set the label of individuals with non-dominated spectral wavelength combinations to 1 and the label of individuals with dominant spectral wavelength combinations to 0.

5. The method for selecting multi-component spectral features based on bilayer optimization according to claim 1, characterized in that, Step four includes: Step 4.1: Calculate the individual X with any i-th spectral wavelength combination in population P. i Individual X with the j-th spectral wavelength combination j Euclidean distance between them (distance(X)) i ,X j The Euclidean distance is calculated as shown in equation (1): In the formula, X i,k and X j,k They represent X respectively i and X j The k-th wavelength variable in; Step 4.2: Construct and initialize the collection Let represent the sets of nearest neighbors with the same label as the target instance and the sets of nearest neighbors with different labels as the target instance, respectively. Construct and initialize these sets. These represent the nearest neighbors that have the same label as the target instance and the nearest neighbors that have different labels from the target instance, respectively. Step 4.3: If the i-th spectral wavelength combination individual X i Label i Individual X with the j-th spectral wavelength combination j Label j Same, that is, individual X i With X j If they are individuals of the same type, then distance(X) will be used. i ,X j Add X to NearhitSet j Add to hit; Similarly, if the two labels are different, i.e., individual X i With X j If they are different classes, then distance(X) will be used. i ,X j Add X to NearmissSet j Add to miss; Step 4.4: Find the match between X and NearhitSet i The closest combination of spectral wavelengths is X i Guessing the neighbor Select the NearmissSet that matches X i The closest combination of spectral wavelengths is X i Misjudging the neighbor The importance score δ of the k-th wavelength variable in population P can then be calculated using equation (2). k ; In equation (2), X represents i The k-th wavelength variable X in i,k And guessed the neighbor The k-th wavelength variable European distance between them X represents i The k-th wavelength variable X in i,k Misjudging a Neighbor The k-th wavelength variable The Euclidean distance between them.

6. The method for selecting multi-component spectral features based on bilayer optimization according to claim 1, characterized in that, Step five includes: Step 5.1: Randomly select two individuals p and q from the population P to generate a child o, whose binary vector o.mask value is the same as the binary vector p.mask value of the parent p. Step 5.2: Based on the importance score of the wavelength variable, perform the following two-step crossover operation on the binary vector of offspring o with equal probability: from Two wavelength variables are randomly selected from the non-zero variables, and the binary value of the variable with the lower importance score is set to 0; or from... Two wavelength variables are randomly selected from the non-zero variables, and the binary value of the variable with the higher importance score is set to 1; where, This represents the inversion of the binary vector q.mask of q. This represents the inversion of the binary vector p.mask of p; Step 5.3: Based on the importance scores of the wavelength variables, perform the following two-step mutation operation on the binary vector of the offspring o with equal probability: randomly select two wavelength variables from the non-zero variables of o.mask, and set the binary value of the variable with the lower importance score to 0; or from Two wavelength variables are randomly selected from the non-zero variables, and the binary value of the variable with the higher importance score is set to 1; where, This represents the inversion of the binary vector o.mask of o; Step 5.4: Repeat steps 5.1 to 5.3 until the binary vector matrix O.Mask of the offspring population O is obtained.

7. The method for selecting multi-component spectral features based on bilayer optimization according to claim 1, characterized in that, Step six includes: Step 6.1: Define a variable Δ. Based on the importance score δ of each wavelength variable in the parent p and q, introduce a Gaussian function to calculate the fluctuation range Δ of each wavelength variable. Update the search space of the dec value of each wavelength variable of the generated offspring individual o, which is dec±Δ. Step 6.2: For each individual o in the offspring population O, simulated binary crossover and polynomial mutation operations are performed based on the real-valued vectors p.dec and q.dec of its corresponding parents p and q, generating the real-valued vector o.dec of the offspring individual o. This vector is then used as a baseline value. The search space of the offspring individual o is determined based on the calculated Δ value. Specifically, when the value of o.dec is greater than the upper limit dec+Δ, the upper limit dec+Δ is used; when the value of o.dec is less than the lower limit dec-Δ, the lower limit dec-Δ is used. This yields the real-valued vector matrix O.dec of the spectral wavelength variable combination of the offspring population O.

8. The method for selecting multi-component spectral features based on bilayer optimization according to claim 1, characterized in that, In step seven, based on the above steps, the offspring individual o = o.mask × o.dec is obtained, thus obtaining each offspring individual in the offspring population O. Then, the population P and the offspring population O are screened using an environmental selection method. Solutions with better Pareto non-dominated fronts and crowding distances are retained, thereby generating the next generation population P. ' .

9. The method for selecting multi-component spectral features based on bilayer optimization according to claim 1, characterized in that, In step eight, it is determined whether the iteration termination condition is met. When the iteration termination condition is met, the Pareto optimal solution is output, which is the final spectral feature selection scheme.

Citation Information

Cited By

  • Probability model driven large-scale sparse multi-objective optimization method and system

    CN122196521A