An electroencephalogram signal feature optimization method combining correlation and redundancy evaluation
Patent Information
- Application Number
- CN202311508050.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-11-13
AI Technical Summary
[0005]本发明要解决的技术问题是:现有的ReliefF算法在特征选择的过程中没有充分考虑样本整体的代表性以及特征之间的冗余性,导致关键特征信息的流失,从而导致脑电信号辨识效果较差
[0014]通过采用上述技术方案,通过计算样本之间的互信息分析样本重要性,通过样本加权的ReliefF算法筛选出类别相关特征,通过互信息对初选特征集中特征的冗余性打分,去除冗余特征得到最优特征集,从而实现脑电信号特征优化,准确选取了更具表征性的特征,进而实现运动想象脑电信号的有效分类识别。
Smart Images

Figure CN117540182B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electroencephalogram (EEG) signal processing, specifically relating to a method for optimizing EEG signal features by jointly assessing correlation and redundancy. Background Technology
[0002] In the classification and recognition of electroencephalogram (EEG) signals, as the volume of data processed increases, the rapid and efficient selection of features becomes an unavoidable problem. Generally, more comprehensive features lead to better classification results; however, too many features can lead to the curse of dimensionality. When the feature dimensionality is high, it not only consumes computation time and reduces computational efficiency, but also the presence of irrelevant or redundant features can negatively impact the accuracy of EEG signal recognition. Therefore, for situations with large sample sizes and high dimensionality, removing redundant features from a large pool and selecting the most representative and optimal features is currently a hot research topic in the field of EEG signal processing.
[0003] Currently, many feature dimension optimization algorithms have been proposed, such as the relevance feature method, principal component analysis, and Fisher's method. These algorithms have their own characteristics in different applications, which are closely related to the data type, the extracted features, and the recognition target. The ReliefF algorithm is a relevance feature selection algorithm that uses the idea of hypothesis margin to evaluate the classification ability of features in each dimension, thereby finding the most useful feature subset for classification.
[0004] Existing ReliefF algorithms do not consider the representativeness of the overall sample or the redundancy between features. During classification, different sample points often play different roles. It is generally believed that the center sample of a class can well represent the overall characteristics of the data distribution for that class and significantly influences the model's class discrimination direction; simultaneously, samples near the classification boundary are crucial for locating the decision boundary. Furthermore, when using mutual information for feature redundancy analysis, the degree of correlation between features varies due to the diversity of individual features. In most mutual information-based algorithms, the thresholds roughly determined by limited experience may not accurately assess the relationships between feature sets, leading to the loss of crucial feature information. Summary of the Invention
[0005] The technical problem to be solved by this invention is that the existing ReliefF algorithm does not fully consider the representativeness of the whole sample and the redundancy between features during the feature selection process, resulting in the loss of key feature information and thus poor EEG signal recognition performance.
[0006] Therefore, the present invention provides a method for optimizing EEG signal features by combining correlation and redundancy assessment.
[0007] The technical solution adopted by this invention to solve its technical problem is:
[0008] A method for optimizing EEG signal features by jointly assessing correlation and redundancy includes the following steps:
[0009] EEG signal data acquisition and preprocessing;
[0010] Extract the features of each sub-band and fuse them into sample features;
[0011] The initial feature set is selected using the sample-weighted ReliefF algorithm;
[0012] The redundancy of features in the initial feature set is scored using mutual information to select the optimal feature set.
[0013] The optimized feature samples are divided into training and test sets. The model is trained using the training set, and the test set is input into the resulting model to evaluate the recognition performance.
[0014] By adopting the above technical solution, the importance of samples is analyzed by calculating the mutual information between samples, category-related features are screened by the sample-weighted ReliefF algorithm, and the redundancy of features in the initial feature set is scored by mutual information. Redundant features are removed to obtain the optimal feature set, thereby optimizing EEG signal features and accurately selecting more representative features, thus achieving effective classification and recognition of motor imagery EEG signals.
[0015] Furthermore, the mutual information values between samples are used to assess the importance of each sample in the category discrimination process. Sample weights are calculated by mapping, and the ReliefF algorithm with sample weights is used to analyze the correlation between features and target categories. Features with larger weights are retained as the initial feature set.
[0016] Furthermore, calculate the difference D of the average mutual information between each sample and samples of the same class and samples of different classes. R The calculation formula is: D R = I_within - I_between, where I_within is the average intra-class mutual information of sample R, and I_between is the average inter-class mutual information of sample R. This is used to assess the importance of each sample in the classification decision process, and the resulting D is used to evaluate the importance of each sample in the classification decision process. R The values are mapped to the interval [0.5, 1.5] as the weights of sample R.
[0017] Furthermore, the formula for calculating the mutual information I between samples is: Where X is the selected sample, Y is a sample of the same or different class as X, p(x,y) is the joint distribution of (X,Y), p(x) and p(y) are the marginal distributions of X and Y respectively, x represents the value of X, y represents the value of Y, and I(X;Y) is the relative entropy between the joint distribution p(x,y) and the marginal distributions p(x) and p(y).
[0018] Furthermore, the obtained difference D R The piecewise function maps the interval [0.5, 1.5] to the interval [0.5, 1.5], and the mapping function is: Among them, D R Here, SW(R) represents the current value, SW(R) represents the weight of the mapped sample R, min_D represents the minimum value among all data points, and max_D represents the maximum value among all data points. Let v be the mean of all differences, and v be the weight adjustment factor, where v1 = 0.5 and v2 = -1.5.
[0019] Furthermore, each time a sample R is randomly selected from the sample set, k nearest neighbor samples H are found from the sample set of the same class as sample R, and k nearest neighbor samples M are found from the sample set of different classes from sample R. Combining the sample weight SW(R) of R, the weight of each feature is calculated using the sample-weighted ReliefF algorithm to analyze the correlation between the feature and the target class. The above process is repeated until the set number of iterations is reached, and the features with larger weights are retained as the initial feature set.
[0020] Furthermore, the mutual information between each feature in the initial feature set is calculated, and the redundancy score of each feature is updated according to the mutual information size to select the optimal feature set.
[0021] Furthermore, by comparing the redundancy between features through mutual information analysis, all feature redundancy scores are initialized to 0. Each time, the principal feature is selected according to the feature importance order obtained by the sample-weighted ReliefF algorithm, and mutual information is calculated with each subsequent feature. In each round, the redundancy score of each feature is calculated based on the size of the mutual information, and redundant features with higher scores are removed, finally obtaining the feature set with the optimal dimension.
[0022] Furthermore, in each round, the redundancy score of each feature is calculated based on the magnitude of mutual information. When the correlation is extremely strong, the redundancy score of the compared feature is increased by 10 points; when the correlation is strong, the redundancy score of the compared feature is increased by 5 points; and when the correlation is moderate, the redundancy score of the compared feature is increased by 2 points. The redundancy scores of all features are accumulated, and then the features with scores greater than 0 are sorted in descending order. The top B redundant features are removed to obtain the optimal feature set.
[0023] The beneficial effects of this invention are as follows: Based on the characteristics of sample importance and feature redundancy, this invention appropriately increases the weight of boundary and center samples in the ReliefF algorithm process, while reducing the weight of samples in non-core regions. This can weaken the impact of samples with weak expressiveness on weight updates, effectively eliminating irrelevant features while retaining strongly correlated features. Secondly, it also takes into account the redundancy among initially selected features, using feature redundancy scores instead of fixed thresholds to more comprehensively evaluate the redundancy of features relative to the feature set, thereby identifying more representative features as much as possible. Attached Figure Description
[0024] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0025] Figure 1 This is a flowchart illustrating the implementation of the EEG signal feature optimization method in this invention.
[0026] Figure 2 This is a schematic diagram of the frequency band division in this invention.
[0027] Figure 3 This is a flowchart of the feature optimization algorithm in this invention. Detailed Implementation
[0028] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0029] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, features defined with "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0030] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0031] A method for optimizing EEG signal features by jointly assessing correlation and redundancy includes the following steps:
[0032] Step 1: Acquire multi-class, multi-channel motor imagery EEG signals from the subject and preprocess them. Use a Butterworth filter to perform bandpass filtering and frequency band and sample division on the obtained EEG signals. Use CSP to extract spatial features of each frequency band and perform feature fusion to obtain multi-frequency band fused sample features.
[0033] S1.1 EEG signal data acquisition.
[0034] In this implementation: 64-channel data from multiple subjects were collected, with a signal sampling frequency of 160Hz. The experiment performed four categories of tasks: left fist, right fist, both fists, and both feet. Each subject performed a total of 90 motor imagery exercises across these four categories. Each experiment lasted approximately 8 seconds. For the first 0-2 seconds, the screen was black, and the subject was in a relaxed, ready state. During the following 4 seconds, targets randomly appeared on the top, bottom, left, and right sides of the computer screen as prompts (left: left fist movement; right: right fist movement; top: both fists movement; bottom: both feet movement). Based on each screen prompt, the subject completed the motor imagery experiment. There were 640 sampling points during each motor imagery session. After a 2-second rest period, the next experiment began.
[0035] S1.2 Data Preprocessing.
[0036] Preprocessing and sample segmentation were performed on the motion imagery data for each session. First, wavelet denoising was used to remove noise from the signal, common-average reference technique was used to eliminate interference, and baseline correction was performed to adjust the signal baseline. Then, a 6th-order Butterworth filter was used to bandpass filter the preprocessed EEG signal from 8 to 30 Hz, and the filtered EEG signal was divided into 10 sub-bands (A1-A10) with a bandwidth of 4 Hz and an overlap of 2 Hz. Figure 2 As shown; finally, for the samples in each sub-band, a sliding window sample division is performed using 160 data points with a 50% overlap. Therefore, a total of 630 sample data points are obtained for each frequency band of each subject, and the data storage format is 160*64*630 (number of data sampling points * number of channels * number of samples).
[0037] S1.3 Feature extraction.
[0038] For the 10 sub-frequency bands divided in step S1.2, a corresponding one-to-one CSP model is constructed. A total of six CSP models are constructed for the four types of actions. Spatial features of EEG signals in each frequency band are extracted using CSP, and the features of each sub-frequency band are fused to obtain the fused features of each frequency band as sample features. Normalization processing is then performed. The calculation process for feature extraction is as follows:
[0039] The EEG signal X is spatially filtered by filter W to obtain the filtered signal matrix Z: Z = WX.
[0040] Where X is the EEG signal matrix after the samples are divided.
[0041] In matrix Z, the eigenvectors corresponding to the first and last U eigenvalues are extracted to form the spatial filtered signal Z. p Given p = 1, 2, ..., 2U, find the eigenvectors:
[0042] Among them, f p Z is the obtained eigenvector. Pi For spatially filtered signal Z P The i-th row of signals.
[0043] Step 2: Filter the initial feature set related to the category.
[0044] For the sample data described in step 1, the mutual information value between samples is used to evaluate the importance of each sample in the classification decision process, which is used as the sample weight; the ReliefF algorithm with sample weighting is used to analyze the correlation between features and target categories, and features with larger weights are retained as the initial feature set.
[0045] S2.1 Weighting of EEG signal feature samples.
[0046] like Figure 3 As shown, the mutual information between each sample R and its intra-class samples, as well as the mutual information between samples from different classes, are calculated. The average value of each value is then calculated, and the difference between the average and average values is taken. This difference is used to appropriately increase the weight of boundary and center samples in the ReliefF algorithm, while decreasing the weight of samples in non-core regions. The formula for calculating the weight of sample R is as follows:
[0047] D R =I_within-I_between
[0048] Where I_within is the average within-class mutual information of sample R, I_between is the average between-class mutual information of sample R, and D R It represents the difference in mutual information between the two.
[0049] The formula for calculating I_within is as follows: T is the number of samples in the same class, I t Let R be the mutual information between the selected sample R and its t-th sample of the same class.
[0050] The formula for calculating I_between is as follows: P is the number of out-of-class samples, I g Let R be the mutual information between the selected sample R and its g-th heterogeneous sample.
[0051] The formula for calculating the mutual information I between two samples is:
[0052]
[0053] Where X is the selected sample, Y is a sample of the same or different class as X, p(x,y) is the joint distribution of (X,Y), p(x) and p(y) are the marginal distributions of X and Y respectively, x represents the value of X, y represents the value of Y, and I(X;Y) is the relative entropy between the joint distribution p(x,y) and the marginal distributions p(x) and p(y).
[0054] The difference D obtained R The piecewise function is used to map the interval [0.5, 1.5], and the mapping formula is as follows:
[0055]
[0056] Among them, D R Here, SW(R) represents the current value, SW(R) represents the weight of the mapped sample R, min_D represents the minimum value among all data points, and max_D represents the maximum value among all data points. Let v be the mean of all differences, and v be the weight adjustment factor, where v1 = 0.5 and v2 = -1.5.
[0057] S2.2 Obtain preliminary features.
[0058] The mapped sample weights are input into the calculation process of the feature weights in the ReliefF algorithm. From the perspective of sample importance, the sample weights are combined into the feature weight update formula of the ReliefF algorithm to obtain the weights of each feature.
[0059] For a feature sample of a high-dimensional EEG signal, a sample R is randomly selected from the sample set. K nearest neighbor samples H are found from the sample set of samples of the same class as sample R; k nearest neighbor samples M are found from the sample set of samples of different classes from sample R. Combining the weight SW(R) of sample R obtained in step S2.1, the weight of each feature is calculated to analyze the correlation between the feature and the target class. This process is repeated until the set number of iterations is reached. The formula for updating the feature weight in a single iteration is as follows:
[0060]
[0061] Among them, SW(R) q ) represents the selected sample R q The weight, W q+1 (A l W represents the weight of the l-th observed feature A of the (q+1)-th sample. q (A l H represents the weight of the l-th observed feature A of the q-th sample. r To compare with sample R q Let r be the r-th nearest neighbor sample of the same class (r = 1, 2, 3…k), C be the class of the sample (C = 1, 2), and p(C) be the proportion of samples of class C to the total number of samples. q )) for the sample R q The proportion of samples of the same class to the total number of samples, Class(R) q ) is the sample R q Category label, M r (C) is related to sample R q The r-th nearest neighbor sample of different classes, r = 1, 2, 3…k, m is the number of samplings, and the function diff(A,R1,R2) represents the difference between sample R1 and sample R2 on observed feature A. The calculation method is as follows:
[0062]
[0063] The features are sorted in descending order based on their weights, and the top n features with the largest weights are retained as the initial feature set.
[0064] Step 3: Remove redundant features to obtain the optimal feature set.
[0065] For the initial feature set described in step 2, the redundancy between features is compared through mutual information analysis. The redundancy score of each feature is calculated in each round, and redundant features with high scores are removed to finally obtain the feature set with the optimal dimension.
[0066] Specifically, for the ordered feature set {F1, F2, ..., F} obtained after the sample-weighted ReliefF algorithm... n The redundancy of each feature is evaluated using a score-based mutual information system. First, based on the ranking of features in the feature set, F1 is selected as the principal feature, and its redundancy is calculated relative to each subsequent feature, F2-F1. n Mutual information between I(F1,F) j ), j is between 2 and n, up to the last feature F in the feature set. nThe mutual information between F1 and the principal feature F2 has been calculated; then, F2 is taken as the principal feature, and the above mutual information calculation is repeated to calculate I(F2,F1). j ), j is between 3 and n, and so on, until F in the feature set. n-1 The mutual information, serving as the primary feature, has been calculated. During each round of calculation, the redundancy score of each feature is updated based on the mutual information magnitude. The specific calculation method is as follows:
[0067] The mutual information between the two features is scaled to the interval (0, 1). The scaling formula for mutual information is:
[0068]
[0069] Where X and Y are two feature vectors, and I(X;Y) is the mutual information between X and Y. XY This is the scaled mutual information.
[0070] For the mutual information I between scaled features XY The following value ranges are defined to determine the correlation strength of features: mutual information in the range (0.9, 1.0) indicates extremely strong correlation, [0.8, 0.9] indicates strong correlation, and [0.7, 0.8) indicates moderate correlation. First, all feature redundancy scores are initialized to 0. Each time, the principal feature is selected according to the feature importance order obtained by the ReliefF algorithm after sample weighting, and its mutual information is calculated with each subsequent feature to determine the degree of correlation. When the correlation is extremely strong, the redundancy score of the compared feature is increased by 10 points; when the correlation is strong, the redundancy score is increased by 5 points; and when the correlation is moderate, the redundancy score is increased by 2 points. The redundancy scores of all features are accumulated, and then the features with scores greater than 0 are sorted in descending order. The top B redundant features are removed to obtain the optimal feature set.
[0071] Step 4: SVM model training and testing.
[0072] The optimized feature samples are divided into training and test sets in an 8:2 ratio; a network model is constructed using the SVM algorithm, and the network model is trained using the training feature set and tested using the test feature set to obtain the classification and recognition performance of the obtained model.
[0073] The EEG signal feature optimization method proposed in this invention, which combines correlation and redundancy assessment, effectively eliminates redundant features while retaining strongly correlated features, accurately selecting more representative features, and thus achieving effective classification and recognition of motor imagery EEG signals. Ultimately, the model achieves a four-class classification accuracy of 91.26% for motor imagery EEG signals, which is an improvement compared to similar methods using the same database.
[0074] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined by the scope of the claims.
Claims
1. A method for optimizing EEG signal features by jointly assessing correlation and redundancy, characterized in that, Includes the following steps: EEG signal data acquisition and preprocessing; Extract the features of each sub-band and fuse them into sample features; The initial feature set is selected using the sample-weighted ReliefF algorithm; The redundancy of features in the initial feature set is scored using mutual information to select the optimal feature set. The optimized feature samples are divided into training set and test set. The model is trained using the training set, and the test set is input into the obtained model to evaluate the recognition effect. The initial feature set selection using the sample-weighted ReliefF algorithm includes the following steps: Step A1, the weighting of the EEG signal feature samples, includes: Calculate the average difference in mutual information between each sample and samples of the same class and samples of different classes. The calculation formula is: in, For the sample Average intra-class mutual information, For the sample Average inter-class mutual information; Inter-sample mutual information The calculation formula is: ; in, For the selected sample, for Similar or dissimilar samples, for The joint distribution , They are respectively , marginal distribution, represent The value of , represent The value of , For joint distribution With marginal distribution The relative entropy; To assess the importance of each sample in the classification decision process, the average difference in mutual information is used. The weights are mapped to the interval [0.5, 1.5] as sample weights. The mapping function is: in, The current value, The sample obtained after mapping The weight, The minimum value among all data. The maximum value among all data. The mean of all differences. As a weighting adjustment factor, ; Step A2, obtain the initial selected features, including: Each time, a sample R is randomly selected from the sample set. From the sample set of samples of the same class as sample R, k nearest neighbor samples H are found; from the sample set of samples of different classes as sample R, k nearest neighbor samples M are found; and the weights of sample R obtained in step A1 are combined with these results. The ReliefF algorithm, which uses sample weighting, is used to calculate the weight of each feature to analyze the correlation between the feature and the target category. This process is repeated until the set number of iterations is reached. The formula for updating the feature weight in a single iteration is as follows: in, Indicates the selected sample The weight, For the first The first sample Observational features The weight, For the first The first sample Observational features The weight, To be consistent with the sample The first of its kind The nearest neighbor samples, , For the category of the sample, For category The proportion of samples in the total sample size To be consistent with the sample The proportion of similar samples to the total sample size. For the sample Category tags, To be consistent with the sample Different types of the first The nearest neighbor samples, The function represents the number of samples. Indicates sample and samples The difference on observed feature A is calculated using the following formula: The features are sorted in descending order based on their weights, and the top n features with the largest weights are retained as the initial feature set.
2. The method for optimizing EEG signal features based on joint correlation and redundancy assessment according to claim 1, characterized in that, Calculate the mutual information between each feature in the initial feature set, update the redundancy score of each feature based on the mutual information size, and select the optimal feature set.
3. The method for optimizing EEG signal features based on joint correlation and redundancy assessment according to claim 2, characterized in that, The redundancy between features is compared by mutual information analysis. All feature redundancy scores are initialized to 0. In each round, the principal feature is selected according to the feature importance order obtained by the sample-weighted ReliefF algorithm, and mutual information is calculated with each subsequent feature. In each round, the redundancy score of each feature is calculated based on the size of the mutual information. Redundant features with high scores are removed, and finally the feature set with the optimal dimension is obtained.
4. The method for optimizing EEG signal features based on joint correlation and redundancy assessment according to claim 3, characterized in that, In each round, the redundancy score of each feature is calculated based on the magnitude of mutual information. When the correlation is extremely strong, the redundancy score of the compared feature is increased by 10 points; when the correlation is strong, the redundancy score of the compared feature is increased by 5 points; and when the correlation is moderate, the redundancy score of the compared feature is increased by 2 points. The redundancy scores of all features are accumulated, and then the features with scores greater than 0 are sorted in descending order. The top B redundant features are removed to obtain the optimal feature set.
Citation Information
Patent Citations
Electroencephalogram attention recognition system and method based on feature selection
CN114521903A
A PLI-Relief-based EEG channel selection method for fatigued driving
CN114931385A