A feature selection method and system based on improved horned lizard optimization algorithm
By improving the horn lizard optimization algorithm and combining with multiple strategic mechanisms, the problem that algorithms in high-dimensional medical data are easily trapped in local optimality is solved, effective selection of key features and efficient convergence of models are achieved, and the clinical discrimination of medical data is improved.
Patent Information
- Application Number
- CN202510771627.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-06-11
AI Technical Summary
In the prior art, the horn lizard optimization algorithm is prone to fall into local optimal solutions when processing high-dimensional medical data, resulting in missing key features, insufficient convergence accuracy, and affecting clinical discrimination.
Introduce the following (RF), general reverse learning (OBL), based on biogeographic learning strategy (BLS) and hierarchical structure (HS) mechanisms, improve the horned lizard optimization algorithm (HLOA), obtain sample vector index through BLS to update individual positions, use HS to update the optimal individual, OBL increases the search range, RF updates individuals, and combine the KNN model to obtain the classification accuracy of the feature subset as the fitness value to find the optimal feature subset.
It effectively avoids the algorithm from falling into local optimization, improves the accuracy and convergence speed of feature selection, ensures that key features are not missed, and improves the clinical discrimination of the model.
Smart Images

Figure CN120336792B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data feature selection, and in particular to a feature selection method and system based on an improved horned lizard optimization algorithm. Background Art
[0002] Medical data is generally high-dimensional, multi-source, heterogeneous, and dynamically evolving. For example, a single whole-genome sequencing run can generate over 30,000 feature variables, while real-time monitoring equipment in intensive care units generates new time-series data every second. However, truly clinically valuable features within this massive data set are often buried in noise and redundant information, leading to reduced performance of machine learning models, increased computational costs, and diminished clinical interpretability. Efficiently extracting key features from this vast amount of complex medical data has become a core bottleneck hindering the development of medical artificial intelligence.
[0003] Feature selection techniques, as a key approach to addressing this challenge, aim to identify the most discriminative feature subsets for disease prediction or diagnosis through a systematic screening process. In medicine, feature selection not only improves model accuracy but also directly impacts the credibility of clinical decisions. However, traditional feature selection methods often perform poorly when dealing with high-dimensional medical data. The integration of metaheuristic algorithms with a wrapper framework offers a new approach to wrapper methods. Traditional wrapper methods improve screening quality by recursively evaluating feature subsets, but their exhaustive search strategy leads to an exponential increase in computational complexity. Heuristic algorithms, with their efficient global search capabilities and intelligent optimization mechanisms, retain the core advantage of wrapper methods in capturing feature correlation effects while significantly reducing computational costs by dynamically adjusting the search space. However, traditional metaheuristic algorithms still have significant limitations in medical scenarios: they are prone to falling into local optimal solutions, resulting in the omission of key features, and their insufficient convergence accuracy affects clinical discriminability. The Horned Lizard Optimization Algorithm (HLOA) is a swarm intelligence optimization algorithm that works well for feature selection problems. However, it also encounters the aforementioned problems when faced with high-dimensional data sets, such as falling into local optimality, missing key features, and poor convergence accuracy.
[0004] In summary, how to prevent the algorithm from falling into a local optimal solution and causing the omission of key features is an important issue that needs to be solved urgently. Summary of the Invention
[0005] The embodiment of the present invention provides a feature selection method and system based on an improved horned lizard optimization algorithm, which can solve the problem in the prior art that the algorithm cannot avoid falling into a local optimal solution, resulting in the omission of key features.
[0006] The embodiment of the present invention provides a feature selection method based on an improved horned lizard optimization algorithm, comprising the following steps:
[0007] An improved horned lizard optimization algorithm (bROBEHLOA) was constructed. The algorithm improved the horned lizard optimization algorithm by the following steps: using BLS to obtain the sample vector index of each individual and updating the individual position according to the sample vector index; sorting the updated individual positions, obtaining the three best individuals in the sorting, and updating the three best individuals using the hierarchical structure HS; using general backward learning (OBL) to increase the search range of the algorithm; and using random following RF to update the individuals according to the increased search range.
[0008] Feature selection is performed on the acquired medical dataset, and each individual representing the feature subset in the algorithm population is initialized. The classification results of the feature subset are obtained using the trained KNN model of the nearest neighbor algorithm, and the classification accuracy is used as the fitness value of each individual. The bROBEHLOA algorithm is used to find the feature subset with the optimal fitness value from the initialized population, and the optimal feature subset is output when the maximum number of iterations is reached.
[0009] Furthermore, the training steps of the KNN model of the neighbor algorithm include: restricting the historical medical data set to [-1, 1] and dividing the data set into a test set and a training set through ten-fold cross validation;
[0010] Use the training set to train the KNN model and obtain the trained KNN model.
[0011] Furthermore, the method of using BLS to obtain the sample vector index of each individual and updating the individual position according to the sample vector index includes the following specific steps:
[0012] Get the migration rate and emigration rate of each individual:
[0013] ;
[0014] in, represents the migration rate; represents the removal rate; represents the total number of individuals;
[0015] Generate a sample vector for each individual based on the migration rate and emigration rate;
[0016] Update the positions of all individuals according to the sample vector:
[0017] ;
[0018] ;
[0019] in, Indicates the current individual's position under BLS; Indicates the i The position of each individual after being updated by the sample vector; is a randomly generated [0,1] vector of dim dimension; Represents individuals sorted according to fitness values.
[0020] Furthermore, the updated individual positions are sorted, the three best individuals in the sorting are obtained, and the hierarchical structure HS is used to update the three best individuals. The specific steps include:
[0021] Sort all individuals and select the three best individuals;
[0022] Use HS to update the best three individuals;
[0023] ;
[0024] ;
[0025] ;
[0026] ;
[0027] in, The individual ranked first after sorting is named individual A; It is the global optimum under the current iteration; and are two randomly selected individuals and ; Indicates the current iteration number; Indicates the maximum number of iterations; The second ranked individual is named B Individual's j Dimension value; represents a randomly selected dimension; The third individual after sorting is named C Individual's j Dimension value; and Represents the first j dimension value, and Represents the first k Dimension value; Represents a random number in the range [0,1].
[0028] Furthermore, the general reverse learning OBL is used to increase the search range of the algorithm, and the specific steps include:
[0029] Use OBL to obtain the opposite point of the individual and obtain the fitness value of the opposite point;
[0030] According to the fitness value of the opposite point, use the greedy idea to determine whether to retain the opposite point;
[0031] ;
[0032] in, Indicates the opposite point, Indicates the individual's current location, represents the upper limit of the solution space, Represents the lower bound of the solution space.
[0033] Furthermore, the trained KNN model is used to obtain the classification results of the feature subset, and the classification accuracy is used as the fitness value of each individual. The specific steps include:
[0034] Each individual vector in the training set is converted into a binary vector through the conversion function T function; based on the binary vector, the trained KNN model is used to obtain the classification accuracy as the fitness value of each individual.
[0035] An embodiment of the present invention provides a feature selection system based on an improved horned lizard optimization algorithm, comprising:
[0036] An algorithm improvement module is used to construct an improved horned lizard optimization algorithm (bROBEHLOA). The algorithm improves the horned lizard optimization algorithm by the following steps: using BLS to obtain the sample vector index of each individual and updating the individual position according to the sample vector index; sorting the updated individual positions, obtaining the three best individuals in the sorting, and updating the three best individuals using the hierarchical structure HS; using general backward learning (OBL) to increase the search range of the algorithm; and using random following RF to update the individuals according to the increased search range.
[0037] The feature selection module is used to perform feature selection on the acquired medical dataset and initialize each individual representing the feature subset in the algorithm population; use the trained KNN model to obtain the classification results of the feature subset, and use the classification accuracy as the fitness value of each individual; use the bROBEHLOA algorithm to find the feature subset with the optimal fitness value from the initialized population, and output the optimal feature subset when the maximum number of iterations is reached.
[0038] The embodiment of the present invention provides a feature selection method and system based on an improved horned lizard optimization algorithm. Compared with the prior art, the method and system have the following beneficial effects:
[0039] The improved horned lizard optimization algorithm bROBEHLOA includes the following steps: using BLS to obtain the sample vector index of each individual and updating the individual position according to the sample vector index; sorting the updated individual positions, obtaining the best three individuals in the sorting and updating the best three individuals using the hierarchical structure HS; using general reverse learning OBL to increase the search range of the algorithm; using random following RF according to the increased search range; when using the bROBEHLOA algorithm to find the optimal feature subset, random following RF and general reverse learning OBL can prevent the algorithm from falling into local optimality and missing key features, and can obtain the optimal feature subset in the final feature selection result. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A flowchart of using bROBEHLOA to perform feature selection on a public dataset provided by an embodiment of the present invention;
[0041] Figure 2 A graph showing the convergence curves of bROBEHLOA and various algorithms on a low-dimensional public dataset of blood using a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0042] Figure 3 A graph showing the convergence curves of bROBEHLOA, a feature selection method based on an improved horned lizard optimization algorithm provided in an embodiment of the present invention, and various algorithms on a low-dimensional public dataset for three-category lung cancer classification;
[0043] Figure 4 A graph showing the convergence curves of bROBEHLOA and various algorithms on a low-dimensional public dataset of Parkinson's disease, based on a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0044] Figure 5 A graph showing the convergence curves of bROBEHLOA and various algorithms on a low-dimensional public wine dataset, using a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0045] Figure 6 A graph showing the convergence curves of bROBEHLOA and various algorithms on a low-dimensional public dataset of the ionosphere, based on a feature selection method based on an improved horned lizard optimization algorithm provided in an embodiment of the present invention;
[0046] Figure 7 A graph showing the convergence curves of bROBEHLOA and various algorithms on a low-dimensional public dataset of breast cancer cells using a feature selection method based on an improved horned lizard optimization algorithm provided in an embodiment of the present invention;
[0047] Figure 8A graph showing the convergence curves of bROBEHLOA and various algorithms on a low-dimensional public dataset of Cleveland heart disease using a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0048] Figure 9 A graph showing the convergence curves of bROBEHLOA, a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention, and various algorithms on a low-dimensional public dataset from a zoo;
[0049] Figure 10 A graph showing the convergence curves of bROBEHLOA and various algorithms on a low-dimensional public dataset of heart disease using a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0050] Figure 11 A graph showing the convergence curves of bROBEHLOA and various algorithms on a low-dimensional public hepatitis dataset based on a feature selection method based on an improved horned lizard optimization algorithm provided in an embodiment of the present invention;
[0051] Figure 12 A graph showing the convergence curves of bROBEHLOA and various algorithms on a high-dimensional public dataset of prostate tumors, using a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0052] Figure 13 A graph showing the convergence curves of bROBEHLOA and various algorithms on a high-dimensional public dataset of brain tumor 1, based on a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0053] Figure 14 A graph showing the convergence curves of bROBEHLOA and various algorithms on the high-dimensional public dataset of brain tumor 2, based on a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0054] Figure 15 A graph showing the convergence curves of bROBEHLOA and various algorithms on a high-dimensional public dataset of small round cell tumors, using a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0055] Figure 16 A graph showing the convergence curves of bROBEHLOA and various algorithms on a high-dimensional public dataset of the central nervous system, based on a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0056] Figure 17A graph showing the convergence curves of bROBEHLOA, a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention, and various algorithms on a high-dimensional public dataset of diffuse large B-cell lymphoma;
[0057] Figure 18 A graph showing the convergence curves of bROBEHLOA and various algorithms on a high-dimensional public dataset of leukemia using a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0058] Figure 19 A graph showing the convergence curves of bROBEHLOA and various algorithms on a high-dimensional public dataset of Leukemia 1, based on a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0059] Figure 20 A graph showing the convergence curves of bROBEHLOA and various algorithms on the high-dimensional public dataset of Leukemia 2, based on a feature selection method based on an improved horned lizard optimization algorithm provided by an embodiment of the present invention;
[0060] Figure 21 This is a graph showing the convergence curve results of bROBEHLOA, a feature selection method based on an improved horned lizard optimization algorithm provided in an embodiment of the present invention, and various algorithms on a high-dimensional public dataset of lung cancer. DETAILED DESCRIPTION
[0061] To make the above-mentioned objects, features, and advantages of the present invention more readily apparent, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. The following description sets forth numerous specific details to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art may make similar modifications without departing from the scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0062] See also Figure 1 The embodiment of the present invention provides a feature selection method based on an improved horned lizard optimization algorithm, comprising the following steps:
[0063] Step 1: Construct an improved horned lizard optimization algorithm bROBEHLOA; the improvement of the horned lizard optimization algorithm includes the following steps: using BLS to obtain the sample vector index of each individual, and updating the individual position according to the sample vector index; sorting the updated individual positions, obtaining the three best individuals in the sorting, and using the hierarchical structure HS to update the three best individuals; using general reverse learning OBL to increase the search range of the algorithm; according to the increased search range, using random following RF to update the individuals.
[0064] Step 2: Perform feature selection on the acquired medical dataset and initialize each individual representing the feature subset in the algorithm population; use the trained KNN model to obtain the classification results of the feature subset, and use the classification accuracy as the fitness value of each individual; use the bROBEHLOA algorithm to find the feature subset with the optimal fitness value from the initialized population, and output the optimal feature subset when the maximum number of iterations is reached.
[0065] To address the problem of HLOA being prone to falling into local optima, this paper introduces three strategies: random following (RF), general opposition-based learning (OBL), and a biogeography-based learning strategy (BLS). These strategies enhance HLOA's exploration capabilities and reduce the probability of falling into local optima. Furthermore, a hierarchical structure (HS) mechanism is introduced to balance the exploration and exploitation phases, accelerating convergence. To enable the improved HLOA to handle discrete feature selection problems, a conversion function is used to convert it into a binary algorithm. This improved algorithm is named bROBEHLOA.
[0066] like Figure 1 As shown, the technology mainly includes the following steps:
[0067] Step 1: Read the medical dataset.
[0068] Step 2: Constrain the data to [-1, 1] and split the dataset into test and training sets by 10-fold cross validation.
[0069] Step 3: Initialize dimension dim, maximum number of iterations Maxiter, and optimal vector set Xbest within the parameter range.
[0070] Step 4: Initialize the algorithm population.
[0071] Step 5: Train the training set through the KNN model and calculate the fitness value of each individual.
[0072] To calculate the individual fitness value using the KNN model, each individual vector needs to be converted into a binary vector through a conversion function, and then its fitness value is calculated. The specific calculation is as follows:
[0073] .
[0074] .
[0075] .
[0076] .
[0077] in, T Function is the conversion function formula, For the i of individuals in a population j Dimension value; is the classification accuracy; is the individual fitness value; and was set to 0.95 and 0.05; Indicates the number of features selected for this subset; Represents the total number of features.
[0078] Step 6: Use bROBEHLOA to find the optimal feature subset.
[0079] Step 7: Determine whether the current number of iterations exceeds the maximum number of iterations. If not, repeat steps 5 and 6.
[0080] Step 8: Output the optimal feature subset.
[0081] Among them, step 6 is specifically as follows:
[0082] (1) Production rate of α-melanocyte-stimulating hormone (MSH).
[0083] MSH levels affect the brightness of the horned lizard's skin. Its main purpose is to enhance the development ability near the current solution. Its mathematical model is as follows:
[0084] .
[0085] in, and Respectively represent the maximum fitness value and minimum fitness value of the current iteration; It is k The fitness value of each individual. When it is less than 0.3, it means that the individual has deviated from the development zone of the optimal solution and needs to be updated using the formula as follows:
[0086] .
[0087] in, It is i The position of each individual in the solution space, is the current optimal solution, and Indicates that two randomly selected individual numbers are not equal. Randomly assigned a value of 0 or 1 with equal probability.
[0088] (2) Generate sample vector index through BLS and update individual positions with the help of sample vector.
[0089] BLS updates individuals by combining the generated sample vectors with historical iteration information, which can enhance the algorithm's development of the optimal solution that was previously ignored, thereby reducing the possibility of falling into a local optimum. The specific calculation model is as follows:
[0090] First, the migration rate and emigration rate are calculated for each individual, as follows:
[0091] .
[0092] in, represents the migration rate; represents the removal rate; Represents the total number of individuals. Based on the obtained migration rate and emigration rate, a sample vector is generated for each individual, and a sample vector index is generated. The generation rule of the index must meet the following conditions:
[0093] The best individuals learn from their own historical best positions; the worst individuals learn from the historical best positions of other individuals; the best individuals are more likely to be learned; the worst individuals are more inclined to learn from other individuals.
[0094] Finally, all individuals are updated by learning sample vectors. The update formula is as follows:
[0095] .
[0096] .
[0097] in, Indicates the current individual's position under BLS; Indicates the i The position of each individual after being updated by the sample vector; is a randomly generated [0,1] vector of dim dimension, Represents individuals sorted according to fitness values.
[0098] (3) Sort the three best individuals and update them individually through HS.
[0099] HS strengthens the correlation between individuals by updating the three best individuals separately and letting other individuals learn from them. The update formula is as follows:
[0100] .
[0101] .
[0102] .
[0103] .
[0104] in, The individual ranked first after sorting is named individual A; It is the global optimum under the current iteration; and are two randomly selected individuals and ; Indicates the current iteration number; Indicates the maximum number of iterations; The second ranked individual is named B Individual's j Dimension value; represents a randomly selected dimension; The third individual after sorting is named C Individual's j Dimension value; and Represents the first j dimension value, and ; Represents the first k Dimension value; Represents a random number in the range [0,1].
[0105] (4) Execute the main part of HLOA.
[0106] The main part of the original HLOA algorithm randomly selects an update individual from three update methods through random number judgment, and then replaces the current worst individual. The model is as follows:
[0107] .
[0108] .
[0109] in, represents the i-th individual; are four randomly selected individuals and are not equal to each other; , are random numbers in [0,1]; , , The values of are set to 1, 1E-6, and 0.009807 respectively; is a random number generated by a standard Cauchy distribution; Indicates the current worst individual; and are two random numbers in [0,0.4046661]; and are two random numbers in [0.5440510,1]; and are two values randomly picked from a standard palette, and ,The normalized values of each color in the standard palette are shown in Table 1. It is a random number in the range of [-1,1].
[0110] Table 1. Normalized values of standard color palette.
[0111]
[0112] (5) Update individuals through OBL.
[0113] Generally, reverse learning finds the opposite position of an individual and determines whether to retain the opposite point through fitness value evaluation, thereby expanding the exploration range and strengthening the exploration ability. The specific formula is as follows:
[0114] .
[0115] in, Indicates the opposite point, x Indicates the current location of an individual.
[0116] (6) Update individual positions through RF.
[0117] The RF strategy iteratively learns from the previous updated individual and strengthens the correlation between individuals. Unlike traditional methods, the RF strategy is not limited to the current optimal state and can help individuals escape from the local optimal state. The specific formula is as follows:
[0118] .
[0119] .
[0120] .
[0121] in, Indicates the first i individual; It is i The random dimension value of each individual; Respectively represent the upper and lower limits of the solution space; represents the random dimension value of the optimal individual; Indicates the random dimension value of the last updated individual.
[0122] (7) All individuals are transformed by the aforementioned transformation function and the fitness values are calculated.
[0123] The present invention performed feature selection on 10 low-dimensional public datasets and 10 high-level public datasets. Each algorithm was independently run 10 times, using ten-fold cross-validation. The datasets were evenly divided into 10 parts, one of which was randomly selected for the test set, and the remaining parts for the training set. The number of individuals (N) for all evaluated algorithms was set to 20, and the maximum number of iterations (Max_iter) was set to 50. The algorithms were ultimately evaluated based on average fitness, average error rate, and average feature count. The final results were tested using the Wilcoxon signed-rank test. The following table shows the comparison results for fitness, classification error rate, and number of selected features, respectively. "+ / = / -" indicates that bROBEHLOA outperformed, was similar to, or underperformed the algorithm, respectively. See Tables 2, 3, and 4 below.
[0124] bROBEHLOA was compared with the binary horned lizard optimization algorithm (bHLOA), the binary gravity search algorithm (bGSA), the binary particle swarm optimization algorithm (bPSO), the binary ant lion optimizer (bALO), the binary bat algorithm (bBA), the binary salp swarm algorithm (bSSA), the binary slime mold algorithm (bSMA), the binary Harris Hawk optimization algorithm (bHHO), and the binary moth flame optimization algorithm (bMFO). bHLOA is the original version of bROBEHLOA, without RF, OBL, BLS, and HS. bGSA, bPSO, bALO, bBA, bSSA, bSMA, bHHO, and bMFO are all well-known feature selection methods that have demonstrated strong performance across multiple datasets and are widely used in the field of feature selection for optimization algorithms. Therefore, these algorithms were selected for comparison to demonstrate the superiority of the present invention in the field of feature selection.
[0125] Table 2 Comparison of the average fitness values of bROBEHLOA and other algorithms on 20 datasets.
[0126]
[0127] Table 3 Comparison of the average classification error rates of bROBEHLOA and other algorithms on 20 datasets.
[0128]
[0129] Table 4 Comparison of the average number of selected features between bROBEHLOA and other algorithms in 20 data sets.
[0130]
[0131] like Figures 2 to 11As shown, the convergence curve results of bROBEHLOA and various algorithms on 10 low-dimensional public data sets are shown. Figures 12 to 21 Shown are the convergence curve results of bROBEHLOA and various algorithms on 10 high-dimensional public data sets.
[0132] The beneficial effects of the present invention are:
[0133] This paper proposes an improved horned lizard optimization algorithm based on multiple strategy mechanisms. By utilizing multiple strategy mechanisms, the exploration ability of the horned lizard algorithm is enhanced, the convergence speed is accelerated, and the correlation between individuals is strengthened. Finally, the effectiveness of bROBEHLOA in feature selection of medical data of different dimensions is reflected in medical data sets of different dimensions.
[0134] An embodiment of the present invention provides a feature selection system based on an improved horned lizard optimization algorithm, comprising:
[0135] An algorithm improvement module is used to construct an improved horned lizard optimization algorithm bROBEHLOA; the algorithm's improvement on the horned lizard optimization algorithm includes the following steps: using BLS to obtain the sample vector index of each individual, and updating the individual position according to the sample vector index; sorting the updated individual positions, obtaining the three best individuals in the sorting, and updating the three best individuals using the hierarchical structure HS; using general reverse learning OBL to increase the search range of the algorithm; and using random following RF to update the individuals according to the increased search range.
[0136] The feature selection module is used to perform feature selection on the acquired medical dataset and initialize each individual representing the feature subset in the algorithm population; use the trained KNN model to obtain the classification results of the feature subset, and use the classification accuracy as the fitness value of each individual; use the bROBEHLOA algorithm to find the feature subset with the optimal fitness value from the initialized population, and output the optimal feature subset when the maximum number of iterations is reached.
[0137] A specific embodiment is as follows:
[0138] This embodiment discloses a feature selection method based on an improved horned lizard optimization algorithm, and the specific steps are as follows:
[0139] S1. Read medical dataset.
[0140] S2. Restrict the data to [-1,1] and divide the dataset into test set and training set through ten-fold cross validation.
[0141] S3. Initialize dimension dim, maximum number of iterations Maxiter, and optimal vector set Xbest within the parameter range.
[0142] S4. Initialize the algorithm population.
[0143] S5. Train the training set through the KNN model and calculate the fitness value of each individual.
[0144] S6. Use α-melanocyte-stimulating hormone (MSH), BLS, hierarchical HS, horned lizard optimization algorithm (HLOA), general reverse learning (OBL), and random follow-up (RF) to update individual positions to construct an improved horned lizard optimization algorithm (bROBEHLOA); use bROBEHLOA to find the optimal feature subset.
[0145] S7: Determine whether the current number of iterations exceeds the maximum number of iterations. If not, repeat S5 and S6.
[0146] S8. Output the optimal feature subset.
[0147] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.
Claims
1. A feature selection method based on an improved horned lizard optimization algorithm, characterized in that: The following steps are involved: An improved horned lizard optimization algorithm (bROBEHLOA) was constructed. The algorithm improved the horned lizard optimization algorithm by the following steps: using BLS to obtain the sample vector index of each individual and updating the individual position according to the sample vector index; sorting the updated individual positions, obtaining the three best individuals in the sorting, and updating the three best individuals using the hierarchical structure HS; using general backward learning (OBL) to increase the search range of the algorithm; and using random following RF to update the individuals according to the increased search range. Feature selection is performed on the acquired medical dataset, and each individual representing the feature subset in the algorithm population is initialized. The classification results of the feature subset are obtained using the trained KNN model of the nearest neighbor algorithm, and the classification accuracy is used as the fitness value of each individual. The bROBEHLOA algorithm is used to find the feature subset with the optimal fitness value from the initialized population, and the optimal feature subset is output when the maximum number of iterations is reached.
2. The feature selection method based on the improved horned lizard optimization algorithm according to claim 1, characterized in that: The training steps of the KNN model include: The historical medical dataset was restricted to [-1, 1] and the dataset was divided into a test set and a training set using ten-fold cross validation; Use the training set to train the KNN model and obtain the trained KNN model.
3. The feature selection method based on the improved horned lizard optimization algorithm according to claim 1, characterized in that: The BLS is used to obtain the sample vector index of each individual and update the individual position according to the sample vector index. The specific steps include: Get the migration rate and emigration rate of each individual: ; in, represents the migration rate; represents the removal rate; represents the total number of individuals; Generate a sample vector for each individual based on the migration rate and emigration rate; Update the positions of all individuals according to the sample vector: ; ; in, Indicates the current individual's position under BLS; Indicates the i The position of each individual after being updated by the sample vector; is a randomly generated [0,1] vector of dim dimension; Represents individuals sorted according to fitness values.
4. The feature selection method based on the improved horned lizard optimization algorithm according to claim 1, characterized in that: The updated individual positions are sorted, the three best individuals in the sorting are obtained, and the hierarchical structure HS is used to update the three best individuals. The specific steps include: Sort all individuals and select the three best individuals; Use HS to update the best three individuals; ; ; ; ; in, The individual ranked first after sorting is named individual A; It is the global optimum under the current iteration; and are two randomly selected individuals and ; Indicates the current iteration number; Indicates the maximum number of iterations; The second ranked individual is named B Individual's j Dimension value; represents a randomly selected dimension; The third individual after sorting is named C Individual's j Dimension value; and Represents the first j dimension value, and ; Represents the first k Dimension value; Represents a random number in the range [0,1].
5. The feature selection method based on the improved horned lizard optimization algorithm according to claim 1, characterized in that: The use of general reverse learning OBL to increase the search range of the algorithm includes the following specific steps: Use OBL to obtain the opposite point of the individual and obtain the fitness value of the opposite point; According to the fitness value of the opposite point, use the greedy idea to determine whether to retain the opposite point; ; in, Indicates the opposite point, Indicates the individual's current location, represents the upper limit of the solution space, Represents the lower bound of the solution space.
6. The feature selection method based on the improved horned lizard optimization algorithm according to claim 1, characterized in that: The trained KNN model is used to obtain the classification results of the feature subset, and the classification accuracy is used as the fitness value of each individual. The specific steps include: Each individual vector in the training set is converted into a binary vector through the conversion function T function; According to the binary vector, the trained KNN model is used to obtain the classification accuracy as the fitness value of each individual.
7. A feature selection system based on an improved horned lizard optimization algorithm, characterized in that: include: An algorithm improvement module is used to construct an improved horned lizard optimization algorithm (bROBEHLOA). The algorithm improves the horned lizard optimization algorithm by the following steps: using BLS to obtain the sample vector index of each individual and updating the individual position according to the sample vector index; sorting the updated individual positions, obtaining the three best individuals in the sorting, and updating the three best individuals using the hierarchical structure HS; using general backward learning (OBL) to increase the search range of the algorithm; and using random following RF to update the individuals according to the increased search range. The feature selection module is used to perform feature selection on the acquired medical dataset and initialize each individual representing the feature subset in the algorithm population; use the trained KNN model to obtain the classification results of the feature subset, and use the classification accuracy as the fitness value of each individual; use the bROBEHLOA algorithm to find the feature subset with the optimal fitness value from the initialized population, and output the optimal feature subset when the maximum number of iterations is reached.
Citation Information
Patent Citations
PID (Proportion Integration Differentiation) parameter optimization method based on improved horny lizard optimization algorithm
CN118170003A
Flexible continuum robot motion control method based on improved angle and exendinium optimization algorithm
CN119141550A