ABMOHS-based electroencephalogram feature selection method and related device
Through the ABMOHS-based EEG feature selection method, the problems of complex algorithms and long iteration time in the existing technology are solved, efficient and effective feature selection is achieved, and powerful global search capabilities and fast convergence characteristics are provided.
Patent Information
- Application Number
- CN202510145496.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-06-03
AI Technical Summary
The algorithm principles of the existing EEG feature selection method are complex and the iteration time is long, resulting in a cumbersome feature selection process.
The EEG feature selection method based on ABMOHS is adopted, and by setting the harmonic memory parameters, designing the objective function, selecting performance evaluation indicators, using the ABMOHS algorithm for feature selection, generating initial harmonic memory database, calculating the objective function value, performing non-dominant sorting, updating the harmonic memory, and outputting Pareto optimal solution set.
It realizes efficient and effective selection of EEG features, with strong global search capabilities and fast convergence speed, and can quickly find the optimal solution to meet the diverse needs in practical applications.
Smart Images

Figure CN120086558A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electroencephalogram (EEG) feature selection, and relates to an EEG feature selection method and related device based on ABMOHS. Background Art
[0002] A Brain-Computer Interface (BCI) generally refers to establishing a new type of information exchange and control channel between the brain and the external environment without relying on the conventional spinal cord or peripheral neuromuscular tissue system, so as to achieve direct interaction between the brain and external devices. In addition, the Brain-Computer Interface also involves two-way interaction, including feedback from the computer or the environment, which can affect brain activities through neuromodulation techniques. In recent years, the European Union, the United States, and Japan have spent a large amount of manpower, material resources, and financial resources on the research and application of Brain-Computer Interface technology. China has already had certain technical accumulations in the field of Brain-Computer Interface. With the support of various national science and technology plans, China has formed multiple internationally influential brain science research teams and has the conditions to participate in international competition. A Brain-Computer Interface that only adopts one paradigm in the Brain-Computer Interface system is a single-paradigm Brain-Computer Interface. Such Brain-Computer Interfaces mainly include event-related potential Brain-Computer Interfaces, steady-state visual evoked potential Brain-Computer Interfaces, and motor imagery Brain-Computer Interfaces.
[0003] In the EEG decoding of a motor imagery Brain-Computer Interface system, feature selection is very important. On the one hand, there are individual differences in motor imagery EEG, so feature selection methods are needed to select subject-specific band features, time window features, channel features, etc. On the other hand, feature selection can reduce the feature dimension, reduce the complexity of the classification model, and avoid the curse of dimensionality and overfitting. Existing feature selection methods mainly include filter-based, wrapper-based, and embedded. Filter-based feature selection methods use evaluation criteria such as information metrics and distance metrics to select features, such as Fisher score, mutual information, divergence, etc. Wrapper-based feature selection methods generate feature subsets in a specific way and then use the results of the classifier as the evaluation criteria for feature selection. Most wrapper-based methods are based on intelligent optimization algorithms. Embedded feature selection methods automatically eliminate some features during the training of the classifier, so feature selection and classification can be carried out simultaneously. A relatively typical embedded feature selection method is the Least Absolute Shrinkage and Selection Operator.
[0004] The filtering selection method is independent of the classifier during feature selection and does not perform classification recognition, resulting in the selected leads possibly leading to weak classification accuracy. The embedded selection method often requires a regularization coefficient selection process during feature selection, which increases the feature selection time. In addition, existing wrapper feature selection methods often use algorithms including particle swarm optimization algorithm, genetic algorithm, artificial bee colony algorithm, firefly algorithm, etc. These existing algorithms have a long iteration time and complex algorithm principles, making the feature selection process cumbersome. Summary of the Invention
[0005] The purpose of the present invention is to provide an electroencephalogram feature selection method and related device based on ABMOHS, so as to solve the problems of complex algorithm principles and long iteration time of existing algorithms.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] An electroencephalogram feature selection method based on ABMOHS includes:
[0008] Set the harmony memory parameters, design the objective function of the feature selection problem, select the performance evaluation index, and verify the effectiveness of the feature selection for the ABMOHS algorithm;
[0009] Initialize the harmony memory using the ABMOHS algorithm, generate the initial harmony memory library, calculate the objective function value of the initial harmony memory library, and then perform non-dominated sorting;
[0010] Improvise new harmony memories, update the harmony memories according to the non-dominated sorting results, and output the Pareto optimal solution set.
[0011] Further, the harmony memory parameters include harmony memory size, constant, syllable adjustment coefficient, and number of iterations.
[0012] Further, the objective function of the feature selection problem is:
[0013]
[0014] Among them, x represents a vector encoded by 0 and 1, whose dimension length is equal to the number of features, Acc(x) represents the average accuracy rate of 5-fold cross-validation of the data, f 1 (x) represents the average error rate of 5-fold cross-validation of the data, f 2 (x) represents the number of selected features.
[0015] Further, the data selected for the effectiveness verification is the UCI machine learning database and the public electroencephalogram dataset.
[0016] Further, the method for initializing the harmony memory is:
[0017] Calculate the difference value of each feature in the sample set according to Fisher's criterion, and initialize the harmony memory through the binary tournament method based on the sample difference value of each feature to generate an initial harmony memory library.
[0018] Further, the process of initializing the harmony memory by the binary tournament method includes:
[0019] Set each decision variable value of the harmony vector to 0, then perform the binary tournament operation. Each time, randomly select two features, compare the Fisher's values between the two features, set the value of the decision variable corresponding to the feature with the larger Fisher's value to 1, and set the value of the decision variable corresponding to the feature with the smaller Fisher's value to 0.
[0020] Further, the method for updating the harmony memory includes:
[0021] Merge the new harmony memory and the initial harmony memory into Perform non-dominated sorting to generate all sorted subsets F = [F 1 , F 2 ,...]. Select the individuals in F according to the elitist retention strategy. When |F 1 | + |F 2 | +... + |F i-1 | ≤ HMS and |F 1 | + |F 2 | +... + |F i | > HMS, calculate the crowding distance of F i and sort the individuals in F i in descending order. Finally, select the individuals in F i in turn until the number of harmonies is the size of the harmony memory.
[0022] An EEG feature selection system based on ABMOHS includes:
[0023] A verification module, which is used to set the harmony memory parameters, design the objective function of the feature selection problem, select the performance evaluation index, and verify the effectiveness of the feature selection for the ABMOHS algorithm;
[0024] A calculation module, which is used to initialize the harmony memory by using the ABMOHS algorithm, generate an initial harmony memory library, calculate the objective function value of the initial harmony memory library, and then perform non-dominated sorting;
[0025] An update module, which is used to improvise new harmony memories, update the harmony memories according to the non-dominated sorting results, and output the Pareto optimal solution set.
[0026] A terminal device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method when executing the computer program.
[0027] A computer-readable storage medium storing a computer program, wherein the computer program implements the steps of the method when executed by a processor.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] The present invention provides an electroencephalogram (EEG) feature selection method based on ABMOHS. By setting harmony memory parameters, designing an objective function for the feature selection problem, selecting performance evaluation indicators, and verifying the effectiveness of the ABMOHS algorithm for feature selection, the effectiveness and reliability of the selected features are ensured. Then, the ABMOHS algorithm is used to initialize the harmony memory, generate an initial harmony memory library, calculate the objective function value of the initial harmony memory library, and then perform non-dominated sorting; improvise new harmony memories, update the harmony memories according to the non-dominated sorting results, and output the Pareto optimal solution set. The present invention provides an efficient and effective EEG feature selection method through the ABMOHS algorithm, which has the characteristics of strong global search ability and fast convergence speed, and helps to quickly find one or more sets of optimal solutions among a large number of EEG features, and these solutions reach a balance on multiple performance indicators, so as to meet the diverse needs in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0031] Figure 1 It is a flowchart of the EEG feature selection method based on ABMOHS of the present invention.
[0032] Figure 2 It is a graph showing the results of initializing the ABMOHS algorithm and randomly initializing the harmony memory for four datasets in the UCI machine learning database of the present invention.
[0033] Figure 3 It is a graph showing the results of initializing the ABMOHS algorithm and randomly initializing the harmony memory for the EEG dataset of the present invention.
[0034] Figure 4 It is a graph showing the feature selection results of ABMOHS and NSGA-II of the present invention on 4 datasets.
[0035] Figure 5 This is the feature selection result graph of ABMOHS and NSGA-II of the present invention on the EEG datasets of 7 subjects.
[0036] Figure 6 This is the schematic structural diagram of the EEG feature selection system based on ABMOHS according to the preferred embodiment of the present invention.
[0037] Figure 7 This is the schematic structural diagram of the electronic device according to the preferred embodiment of the present invention. Detailed implementation manners
[0038] The following describes exemplary embodiments of the present application with reference to the accompanying drawings. Various details of the embodiments of the present application are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0039] Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts belong to the scope of protection of the present application.
[0040] It should be noted that the terminals involved in the embodiments of the present application may include, but are not limited to, mobile phones, personal digital assistants (PDAs), wireless handheld devices, tablet computers, personal computers (PCs), MP3 players, MP4 players, wearable devices (such as smart glasses, smart watches, smart bracelets, etc.), smart home devices and other intelligent devices.
[0041] In addition, the term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0042] The following further describes the present invention in detail:
[0043] See Figure 1 , the present invention provides an EEG feature selection method based on ABMOHS, which specifically includes the following steps:
[0044] Step 1: Set the harmony memory parameters, including the harmony memory size (HMS), constant C, pitch adjustment coefficient (PAR), and number of iterations (NI).
[0045] Step 2: Design the objective function for the feature selection problem and select the performance evaluation metrics. The objective function for the feature selection problem is:
[0046]
[0047] where x represents a vector encoded by 0 and 1, whose dimension length is equal to the number of features, Acc(x) represents the average accuracy of 5-fold cross-validation of the data, f 1 (x) represents the average error rate of 5-fold cross-validation of the data, f 2 (x) represents the number of selected features.
[0048] Step 3: Validate the effectiveness of the ABMOHS algorithm for feature selection using the UCI machine learning database and the publicly available EEG dataset;
[0049] Step 4: Initialize the harmony memory (HM) using the ABMOHS algorithm.
[0050] Step 4-1: First, calculate the difference value of each feature in the two-class sample sets according to Fisher's criterion. A larger difference value indicates that the feature makes a greater contribution to the classification accuracy, that is, the feature is more likely to exist in the optimal Pareto solution set. Conversely, a smaller difference value indicates that the feature makes a smaller contribution to the classification accuracy, and the feature is least likely to be selected into the optimal solution set.
[0051] Step 4-2: Immediately afterwards, use the ABMOHS algorithm to initialize the harmony memory through a binary tournament method based on the difference values of the two classes of each feature, generating an initial harmony memory library.
[0052] Step 4-3: When initializing each solution, the ABMOHS algorithm first sets each decision variable value of the harmony vector to 0, and then performs rand()×n binary tournament operations, that is, randomly selects two features each time, compares the Fisher's values between the two features, sets the value of the decision variable corresponding to the feature with the larger Fisher's value to 1, and sets the value of the decision variable corresponding to the feature with the smaller Fisher's value to 0.
[0053] Step 5: Calculate the objective function value of the initial harmony memory library, and then perform non-dominated sorting to obtain F1. Improvise a new harmony memory, replacing the corresponding elements of the random solution in F1 with the corresponding elements of the new harmony.
[0054] Step 6: Update the harmony memory. First, merge the new harmony memory and the initial harmony memory into In addition, Non-dominated sorting is performed to generate all sorted subsets F = [F 1 , F 2 ,...]. In addition, individuals in F are selected according to the elitist retention strategy When |F 1 | + |F 2 | + … + |F i-1 | ≤ HMS and F| 1 | + |F 2 | + … + |F i | > HMS, calculate the crowding distance of F i and sort the individuals in F i in descending order. Finally, select individuals in F i in turn until the number of harmonies is the harmony memory size HMS.
[0055] Step 7: Check the termination criterion. If the termination criterion is met, that is, the maximum number of iterations NI is reached, output the Pareto optimal solution set; otherwise, repeat Steps 5 and 6.
[0056] Step 8: Analyze the feature selection results.
[0057] The present invention will be further described in detail below with reference to specific embodiments:
[0058] Embodiment 1:
[0059] In this embodiment, the motor imagery EEG feature selection method based on ABMOHS includes the following steps:
[0060] Step 1: Set the harmony memory parameters, including the harmony memory size (HMS), constant C, pitch adjustment coefficient (PAR), and number of iterations (NI). In this embodiment, the adaptive binary multi-objective harmony search algorithm (ABMOHS) is used. The harmony memory size HMS of the ABMOHS algorithm is set to 50, the number of iterations is set to 100, the constant C is set to 10, and the pitch adjustment probability PAR is set to 0.2.
[0061] Step 2: Objective function and evaluation index
[0062] In the feature selection problem, the objective function can be expressed as follows:
[0063]
[0064] Among them, x represents a vector encoded by 0 and 1, and its dimension length is equal to the number of features. For example, the number of features in the Wine dataset is 13, so the dimension of the vector encoded by 0 and 1 is 13. Acc(x) represents the average accuracy of 5-fold cross-validation of the data, and f 1 (x) represents the average error rate of 5-fold cross-validation of the data, and f 2 (x) represents the number of selected features. The classifier uses linear discriminant analysis (LDA).
[0065] The evaluation index of the ABMOHS algorithm selects Hypervolume because it is widely used to evaluate the convergence performance of multi-objective optimization. The Hypervolume value represents the volume enclosed by the points in the solution set P and the reference point in the objective space. Its definition is as follows:
[0066]
[0067] Among them, k represents the number of objective functions. In this embodiment, because it is to solve the feature selection problem, there are only two objectives, namely the error rate and the number of features, so k = 2. represents an objective vector in the solution set P. Vol(·) represents the Lebesgue measure. A larger Hypervolume value indicates that the solution set obtained by the ABMOHS algorithm has good convergence and diversity. In this embodiment, the reference point is set to z r = [1, n], where n represents the feature dimension.
[0068] Step 3: Select the UCI machine learning database and the public electroencephalogram dataset (BCI competition IV dataset 1) for method verification.
[0069] Step 3-1: In this embodiment, 4 datasets in the UCI machine learning database are selected, and their names, the number of features, the number of classes, and the number of samples are shown in Table 1. Since the algorithm in this embodiment focuses on solving the feature selection problem of binary classification, only 2 classification feature samples are selected from the Wine dataset. In addition, it should be noted that the number of feature samples in each class is different in different datasets. When initializing the harmony memory of the ABMOHS algorithm, it is necessary to calculate the difference of each feature in two classes, so the number of samples in each class dataset is the same. Among them, the number of features and samples of 2 datasets are less, and the number of features and samples of the latter 2 datasets are more.
[0070] Table 1 UCI machine learning database
[0071]
[0072] Step 3-2: The BCI competition IV dataset 1 was recorded from 7 healthy subjects ("a", "b", "c", "d", "e", "f", and "g") through 59 electrodes. "a" and "f" performed motor imagery tasks of the left hand and foot. At the same time, the other subjects performed motor imagery tasks of the left and right hands. During each paradigm run, the visual cues on the computer screen were in the form of left, right, or downward arrows, indicating the motor imagery of the left hand, right hand, and foot, respectively. The cue was displayed for 4 s, during which the subject was instructed to perform the relevant motor imagery task. Each subject's EEG sample dataset for each type of motor imagery contained 100 sets of calibration data and 100 sets of evaluation data. In this embodiment, 100 sets of calibration data from this dataset were used for both training data and test data. The sampling frequency of the EEG signal was 100 Hz. First, the EEG data was truncated, and the time intervals were divided into 0-2 s, 1-3 s, and 2-4 s. Then, the EEG signal in each time interval was filtered. The EEG data was band-pass filtered using a fifth-order Butterworth band-pass filter from 4-40 Hz. Subsequently, the 4-40 Hz EEG signal was sub-band divided with an overlap rate of 50% and a bandwidth of 4 Hz, resulting in a total of k = 17 sub-bands. Then, CSP EEG features were extracted from the EEG signal in each sub-band, where the number of spatial filters m of CSP was 1. The resulting EEG feature matrices G1 and G2 for the two categories had the same feature dimension because the number of EEG experiment trials for the two categories was the same. The G1 feature matrix is as follows:
[0073]
[0074] where N represents the total number of experiment trials. Subsequently, the sub-band EEG CSP features of the remaining time intervals were extracted. The feature matrices obtained from the three time intervals were combined, and finally, the dimension of the single-category EEG feature matrix was N×6mk. Since the sample of the single-category EEG dataset was 100 and the sub-band k = 17, the dimension of the single-category EEG feature matrix was 100×102.
[0075] Step 4: The initialization steps of the harmony memory library based on the ABMOHS algorithm in this embodiment are as follows:
[0076] Step 4-1: First, calculate the difference value of each feature in the two sample sets. A larger difference value indicates that the feature contributes more to the classification accuracy, that is, the feature is more likely to be in the optimal Pareto solution set. Conversely, the smaller the difference value, the less the feature contributes to the classification accuracy, and the feature is least likely to be selected into the optimal solution set.
[0077] Step 4-2: Immediately initialize the harmony memory library by means of a binary tournament based on the difference values of the two types of samples for each feature. When initializing each solution, first set each decision variable value of the harmony vector to 0, and then perform rand()×n binary tournament operations, that is, randomly select two features each time, compare the Fisher's values between the two features, set the value of the decision variable corresponding to the feature with the larger Fisher's value to 1, and set the value of the decision variable corresponding to the feature with the smaller Fisher's value to 0.
[0078] Fisher's Criteria (FC):
[0079] Assume x ch,t represents the electroencephalogram signal with the lead being ch and the time segment being t, and ch = 1, 2, 3, …, M, where M is the total number of leads. The log energy of a single lead in a single-trial experiment is calculated as follows:
[0080] p ch,t = log(var(x ch,t ))
[0081] where var(x ch,t ) represents the variance of the variable x ch,t . The set composed of all p ch,t obtained from the single-trial experiments of a single lead under one type of task is denoted as where N is the total number of single-trial experiments for a single task. Then the Fisher's value can be expressed as follows:
[0082]
[0083] where, Θ ch,t represents the Fisher's value at time t for lead ch.
[0084] Step 5: Calculate the objective function value of the initial harmony memory library, and then perform non-dominated sorting to obtain F1. Improvise a new harmony memory, and replace the corresponding elements of the new harmony with the corresponding elements of the random solution in F1.
[0085] In the ABMOHS algorithm, the corresponding elements of the random solution in the objective vector F1 are used to replace the corresponding elements of the new harmony. The formula for the replacement probability HMCR(t) is as follows:
[0086]
[0087] where, C represents a constant, n represents the dimension of the solution, t represents the current iteration number, is the operator that takes the largest integer less than ln n.
[0088] Step 6: Update the harmony memory
[0089] First, merge the new harmony memory and the initial harmony memory into In addition, Non-dominated sorting is performed to generate all sorted subsets F = [F 1 , F 2 ,...]. In addition, individuals in F are selected according to the elitist retention strategy When |F 1 | + |F 2 | + … + |F i-1 | ≤ HMS and |F 1 | + |F 2 | + … + |F i | > HMS, calculate the crowding distance of F i and sort the individuals in F i in descending order. Finally, select individuals in F i in turn until the number of harmonies is the harmony memory size HMS.
[0090] Step 7: Check the termination criterion
[0091] If the ABMOHS algorithm meets the termination criterion and reaches the maximum number of iterations NI, otherwise, repeat Steps 5 and 6.
[0092] Step 8: Analyze the feature selection results and calculate the Hypervolume and time cost.
[0093] Comparative Example 1:
[0094] The difference between this comparative example and Example 1 is that the harmony memory is initialized using the traditional random initialization strategy (RIS).
[0095] Comparative Example 2:
[0096] The difference between this comparative example and Example 1 is that the NSGA-II, a classical multi-objective optimization algorithm, is used for EEG feature selection. The population size of the NSGA-II algorithm is set to 50, the number of iterations is set to 100, single-point crossover is used, the crossover probability is 0.9, and random flip mutation is used, where the mutation probability is set to 1 / n (n is the dimension of the decision variable).
[0097] By comparing Example 1 of the present invention with Comparative Example 1, it can be seen that:
[0098] When the ABMOHS harmony memory initialization strategy of the present invention is compared with the random initialization strategy (RIS), as Figure 2As shown, 50 initial solutions generated by these two strategies on four datasets, namely Wine, Climate, Hillvaley, and Musk1, are given. From Figure 2 it can be seen that most of the solutions generated by the random initialization strategy are dominated by the solutions generated by the harmony initialization strategy proposed by ABMOHS, and the latter obviously contains fewer feature numbers. In addition, from the initial harmony memory solution sets generated by the two initialization strategies on the datasets Hillvaley and Musk1 with large-scale feature dimensions, it can be more clearly seen that the objective value distribution of the initialized harmony memory library proposed by ABMOHS is wider, which indicates that the diversity of the initialized harmony memory solutions obtained by this method is stronger, and these solution sets are closer to the Pareto front. As Figure 3 shown, 50 initial solutions generated by these two harmony initialization strategies on the EEG datasets of 7 subjects are given. From Figure 3 it can be seen that most of the solutions generated by the random initialization strategy are dominated by the solutions generated by the harmony initialization strategy proposed by ABMOHS, and the latter obviously contains fewer feature numbers. Figure 2 And Figure 3 the results are consistent, indicating that compared with the traditional random initialization harmony memory strategy, the initialization harmony memory strategy of the ABMOHS algorithm of the present invention can improve the quality of the generated initial solutions, thereby accelerating the convergence of the ABMOHS algorithm.
[0099] Through the comparison between Example 1 of the present invention and Comparative Example 2, it can be seen that:
[0100] As Figure 4 shown, it is the experimental results of ABMOHS and NSGA-II in solving the feature selection problems of four datasets in the UCI machine learning database. Figure 4 Among them, the error rate and the number of features are the Pareto optimal solution sets obtained after the final iteration of the multi-objective optimization algorithm. From the experimental results of the small-scale feature dataset Wine, it can be seen that when the number of features is 1, the error rate obtained by the ABMOHS multi-objective optimization algorithm is less than that of NSGA-II, and the same error rate as NSGA-II is obtained at other numbers of features. From the experimental results of the dataset Climate, it can be seen that when the number of features is 2 and 4, the ABMOHS algorithm obtains a smaller error rate. From the experimental results of the datasets Hillvaley and Musk1 with large-scale feature dimensions, it can be seen that the ABMOHS algorithm proposed by the present invention obtains a smaller number of features and error rate. This shows that when solving the feature selection problem with large-scale feature dimensions, compared with the NSGA-II algorithm, the ABMOHS algorithm can obtain a better Pareto solution set.
[0101] As shown in Table 2, the Hypervolume values and time costs of ABMOHS and NSGA-II on 4 datasets are given. It can be seen from Table 2 that the Hypervolume values obtained on datasets with small-scale feature dimensions are very close. From the experimental results of the large-scale feature dimension datasets Hillvaley and Musk1, it can be seen that the Hypervolume values obtained by the ABMOHS algorithm are all greater than those of NSGA-II, and the running time is less. It can be concluded that the ABMOHS algorithm of the present invention has better comprehensive performance than NSGA-II when solving the feature selection problem of large-scale feature dimensions. In addition, under the same number of iterations, the time cost of the ABMOHS algorithm is much less than that of NSGA-II.
[0102] Table 2 Hypervolume and time cost (s) of feature selection of ABMOHS and NSGA-II on datasets
[0103]
[0104] As Figure 5 shown, it is the experimental results of feature selection of ABMOHS and NSGA-II in the EEG datasets of 7 subjects. The error rate and the number of features are the fitness values corresponding to the Pareto optimal solution set obtained after the final iteration of the multi-objective optimization algorithm. It can be seen from the results that the Pareto optimal solution set obtained by the ABMOHS algorithm of the present invention is closer to the Pareto front. In addition, from the results obtained for subjects c, d, and e, it can be seen that compared with NSGA-II, the number of features corresponding to the Pareto solution set obtained by the ABMOHS algorithm is less. For subject c, the error rate obtained when the number of features is 6 is approximately equal to the error rate when the number of features of the optimal solution set obtained by NSGA-II is 19. For subject d, when the number of features is 4, the error rate is 0, while for the solution set obtained by NSGA-II, the error rate is 0 when the number of features is 10. For subject e, when the number of features is 3, the error rate is 0, while for the result obtained by NSGA-II, the error rate is 0 when the number of features is 7. This shows that when solving the feature selection problem of large-scale feature dimensions, the ABMOHS algorithm can obtain a better Pareto solution set than the NSGA-II algorithm.
[0105] As shown in Table 3, the Hypervolume values and time costs obtained by ABMOHS and NSGA-II on the EEG datasets of 7 subjects are given. It can be seen from Table 3 that in the EEG test results of 7 subjects, the average Hypervolume value obtained by the ABMOHS algorithm is 98.93, which is greater than that of NSGA-II, and the running time is less. It can be concluded that the ABMOHS algorithm of the present invention has better comprehensive performance than NSGA-II when solving the feature selection problem of large-scale feature dimensions. In addition, the time cost of the ABMOHS algorithm is much less than that of NSGA-II under the same number of iterations.
[0106] Table 3 Hypervolume and time cost (s) of feature selection by ABMOHS and NSGA-II on the dataset
[0107]
[0108] The present invention also provides an EEG feature selection system based on ABMOHS, as Figure 6 shown, the system includes: a verification module, a calculation module and an update module.
[0109] The verification module is used to set the harmony memory parameters, design the objective function of the feature selection problem, select the performance evaluation index, and verify the effectiveness of the feature selection for the ABMOHS algorithm;
[0110] The calculation module is used to initialize the harmony memory by using the ABMOHS algorithm, generate the initial harmony memory library, calculate the objective function value of the initial harmony memory library, and then perform non-dominated sorting;
[0111] The update module is used to improvise new harmony memories, update the harmony memories according to the non-dominated sorting results, and output the Pareto optimal solution set.
[0112] It can be understood that the EEG feature selection system based on ABMOHS provided by the present invention corresponds to the EEG feature selection method based on ABMOHS provided in the foregoing embodiments. The relevant technical features of the EEG feature selection system based on ABMOHS can refer to the relevant technical features of the EEG feature selection method based on ABMOHS, which will not be elaborated herein.
[0113] Another object of the present invention is to provide an electronic device, as Figure 7 shown, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the steps of the EEG feature selection method based on ABMOHS.
[0114] The EEG feature selection method based on ABMOHS includes the following steps:
[0115] Set harmony memory parameters, design the objective function of the feature selection problem, select performance evaluation indicators, and verify the effectiveness of the feature selection for the ABMOHS algorithm;
[0116] Initialize the harmony memory using the ABMOHS algorithm, generate an initial harmony memory library, calculate the objective function value of the initial harmony memory library, and then perform non-dominated sorting;
[0117] Improvise new harmony memories, update the harmony memories according to the non-dominated sorting results, and output the Pareto optimal solution set.
[0118] The fourth object of the present invention is to provide a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the EEG feature selection method based on ABMOHS are implemented.
[0119] The EEG feature selection method based on ABMOHS includes the following steps:
[0120] Set harmony memory parameters, design the objective function of the feature selection problem, select performance evaluation indicators, and verify the effectiveness of the feature selection for the ABMOHS algorithm;
[0121] Initialize the harmony memory using the ABMOHS algorithm, generate an initial harmony memory library, calculate the objective function value of the initial harmony memory library, and then perform non-dominated sorting;
[0122] Improvise new harmony memories, update the harmony memories according to the non-dominated sorting results, and output the Pareto optimal solution set.
[0123] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0124] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate means for implementing the functions specified in one or more flows and / or blocks Figure 1 in one or more flows and / or blocks Figure 1 or in one or more blocks.
[0125] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means for implementing the functions specified in one or more flows and / or blocks Figure 1 in one or more flows and / or blocks Figure 1 or in one or more blocks.
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows and / or blocks Figure 1 in one or more flows and / or blocks Figure 1 or in one or more blocks.
[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific embodiments of the present invention, and any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the protection scope of the claims of the present invention.
Claims
1. A method for selecting EEG features based on ABMOHS, characterized in that: include: Set the harmony memory parameters, design the objective function of the feature selection problem, select the performance evaluation index, and verify the effectiveness of feature selection for the ABMOHS algorithm; The ABMOHS algorithm is used to initialize the harmony memory, generate the initial harmony memory library, calculate the objective function value of the initial harmony memory library, and then perform non-dominated sorting; Improvise new harmonic memory, update the harmonic memory according to the non-dominated sorting results, and output the Pareto optimal solution set.
2. The method for selecting EEG features based on ABMOHS according to claim 1, characterized in that: The harmony memory parameters include harmony memory size, constant, syllable adjustment coefficient and number of iterations.
3. The EEG feature selection method based on ABMOHS according to claim 1, characterized in that: The objective function of the feature selection problem is: Where x represents a vector encoded by 0 and 1, whose dimension length is equal to the number of features, Acc(x) represents the average accuracy of 5-fold cross-validation of the data, f1(x) represents the average error rate of 5-fold cross-validation of the data, and f2(x) represents the number of selected features.
4. The method for selecting EEG features based on ABMOHS according to claim 1, characterized in that: The data selected for the validity verification are the UCI machine learning database and the public EEG dataset.
5. The method for selecting EEG features based on ABMOHS according to claim 1, characterized in that: The method for initializing the harmony memory is: According to Fisher's criterion, the difference value of each feature in the sample set is calculated, and the harmonic memory is initialized through the binary league method according to the sample difference value of each feature to generate an initial harmonic memory library.
6. The method for selecting EEG features based on ABMOHS according to claim 5, characterized in that: The binary league method performs a process of initializing harmony memory, including: Set the value of each decision variable of the harmony vector to 0, and then perform a binary league operation, randomly select two features each time, compare the Fisher's value between the two features, set the value of the decision variable corresponding to the feature with a larger Fisher's value to 1, and set the value of the decision variable corresponding to the feature with a smaller Fisher's value to 0.
7. The method for selecting EEG features based on ABMOHS according to claim 1, characterized in that: The method for updating harmony memory comprises: Merge the new harmony memory with the initial harmony memory A non-dominated sort is performed to generate all sorted subsets F = [F1, F2, ...], and individuals in F are selected into When |F1|+|F2|+…+|F i-1 |≤HMS and |F1|+|F2|+…+|F i |>HMS, calculate F i The crowding distance of F i Sort the individuals and finally select F i individuals in the until the number of harmonies equals the harmonic memory size.
8. An EEG feature selection system based on ABMOHS, characterized in that: include: A verification module, which is used to set harmony memory parameters, design an objective function for feature selection problems, select performance evaluation indicators, and verify the effectiveness of feature selection for the ABMOHS algorithm; A calculation module, wherein the calculation module is used to initialize the harmony memory using the ABMOHS algorithm, generate an initial harmony memory library, calculate the objective function value of the initial harmony memory library, and then perform non-dominated sorting; An updating module is used to improvise a new harmony memory, update the harmony memory according to the non-dominated sorting result, and output a Pareto optimal solution set.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.