Brain electrical signal classification method, device and storage medium

By extracting the feature of the EEG signal and calculating important weights, selecting the second-level features and principal components, combining the FLDA classifier and ten-fold cross-verification, the problems of complex calculation and poor classification effect of the EEG signal classification method in the existing technology are solved, and an efficient and simple EEG signal classification method is realized.

CN114239638BActive Publication Date: 2025-02-25GUILIN UNIV OF AEROSPACE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111310072.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-05
Publication Date
2025-02-25
Estimated Expiration
2041-11-05

AI Technical Summary

Technical Problem

The existing EEG signal feature selection method has the problem of simple calculation but poor classification effect, and other methods have complex model parameters tuning, long training time, and easy to obtain local optimal solutions.

Method used

By obtaining multi-channel EEG signals, the first-level features are obtained by extracting features, important weights are calculated and the second-level features and principal components are sorted. The optimal combination is confirmed by FLDA classifier and ten-fold cross-validation for classification.

Benefits of technology

A method of classification of EEG signals with small calculation volume, simple model and efficient performance of feature filtering and classification accuracy are realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present invention discloses an electroencephalogram (EEG) signal classification method, device and storage medium, wherein the method comprises acquiring an EEG signal; extracting first-level features of the EEG signal; calculating first-level important weights for the first-level features; selecting second-level features according to the first-level important weights; extracting first-level principal components of the second-level features; calculating second-level important weights for the first-level principal components; selecting second-level principal components according to the second-level important weights; confirming an optimal combination according to the second-level features and the second-level principal components; and classifying the optimal combination. The method has the advantages of low computational complexity, simple model and high efficiency. In addition, considering the correlation and globality between features, the performance of feature filtering is improved, thereby improving the classification accuracy of EEG signal classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to an electroencephalogram (EEG) signal classification method, device and storage medium. Background Art

[0002] EEG signals, especially motor imagery EEG signals, have the characteristics of high signal dimension, low signal-to-noise ratio, and strong randomness, but they also usually contain a lot of noise and redundant information. By performing feature selection on EEG signals, the feature dimension can be effectively reduced, the complexity of the EEG signal classification model can be simplified, thereby alleviating the overfitting problem and reducing the model training time.

[0003] The current EEG signal feature selection methods mainly include filtering, wrapping, embedded and hybrid feature selection methods; however, these methods have the following disadvantages: the filtering method is simple to calculate but the classification effect is poor; other methods have better effects, but the model parameter tuning is more complicated, the model training time is long, and it is easy to obtain local optimal solutions. Summary of the invention

[0004] The purpose of the present invention is to solve at least one of the technical problems existing in the prior art and to provide an EEG signal classification method, device and storage medium.

[0005] The technical solution adopted by the present invention to solve the problem is:

[0006] A first aspect of the present invention is a method for classifying electroencephalogram signals, comprising:

[0007] Acquire multi-channel EEG signals;

[0008] Extracting features from the EEG signal to obtain a plurality of first-level features;

[0009] Calculating the importance weight of each first-level feature to obtain a corresponding first-level importance weight, sorting the plurality of first-level features in descending order according to the first-level importance weights, and selecting all the first-level features ranked before the first-level threshold variable as second-level features;

[0010] Performing principal component analysis on the second-level features to obtain first-level principal components;

[0011] Calculating the importance weight of each first-level principal component to obtain a corresponding second-level importance weight, sorting the plurality of first-level principal components in descending order according to the second-level importance weights, and selecting all the first-level principal components whose rankings are before the second-level threshold variable as the second-level principal components;

[0012] confirming the optimal combination according to the second-level features and the second-level principal components;

[0013] The optimal combination is classified to obtain a classification result.

[0014] According to the first aspect of the present invention, the feature extraction of the EEG signal to obtain a plurality of first-level features includes:

[0015] Filtering the EEG signal to obtain multiple frequency sub-bands;

[0016] Performing a co-spatial transformation on each of the frequency sub-bands and extracting logarithmic variance features;

[0017] The logarithmic variance features of each of the frequency sub-bands are cascaded to obtain the first-level features.

[0018] According to the first aspect of the present invention, the step of calculating the important weights comprises:

[0019] The variance of the input data is calculated as an important weight, and the calculation formula of the variance is as follows: In the formula, VAR (j) represents the variance, x (i,j) represents the j-th dimension feature of the i-th input data, represents the average value of the j-th dimension feature, and N is the total number of input data.

[0020] According to the first aspect of the present invention, the step of calculating the important weights comprises:

[0021] The correlation coefficient of the input data is calculated as an important weight, and the calculation formula of the correlation coefficient is as follows: Where PCC (j) represents the correlation coefficient, cov represents the covariance operation, δ represents the standard deviation, x (i,j) represents the j-th dimension feature of the ith input data, y represents the label value of the input data and y∈{−1, 1}.

[0022] According to the first aspect of the present invention, the step of calculating the important weights comprises:

[0023] Configuring an initial weight for each input data in a set consisting of a plurality of input data;

[0024] For each of the input data, determine first neighbor data of the same category as the input data and having a k-nearest neighbor relationship from the set of the input data, and calculate a first distance between each of the first neighbor data and the input data;

[0025] For each of the input data, determine second neighbor data of a different category from the input data and having a k-nearest neighbor relationship from the set of the input data, and calculate a second distance between each of the second neighbor data and the input data;

[0026] The initial weight is adjusted according to the magnitude relationship between the first distance and the second distance to obtain a target weight as an important weight.

[0027] According to the first aspect of the present invention, the value range of the first-level threshold variable is 1 to the total dimension of the first-level features; the value range of the second-level threshold variable is 1 to the total number of the first-level principal components.

[0028] According to the first aspect of the present invention, the confirming the optimal combination based on the second-level features and the second-level principal components includes: confirming the optimal combination from the second-level features and the second-level principal components through an FLDA classifier and ten-fold cross validation.

[0029] According to a first aspect of the present invention, an l2 norm constraint is added to the FLDA classifier for regularization.

[0030] In a second aspect of the present invention, an EEG signal classification device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the EEG signal classification method as described in the first aspect of the present invention is implemented.

[0031] A third aspect of the present invention is a storage medium, wherein the storage medium stores executable instructions, and when the executable instructions are executed by a processor, the EEG signal classification method as described in the first aspect of the present invention is implemented.

[0032] The above scheme has at least the following beneficial effects: it has the advantages of low computational complexity, simple model and high efficiency; in addition, considering the correlation and globality between features, the performance of feature filtering is improved, thereby improving the classification accuracy of EEG signal classification.

[0033] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The present invention will be further described below in conjunction with the accompanying drawings and examples.

[0035] Figure 1 4 is a flow chart of a method for classifying EEG signals according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] This section will describe in detail the specific embodiments of the present invention. The preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but it cannot be understood as a limitation on the scope of protection of the present invention.

[0037] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0038] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0039] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0040] An embodiment of the first aspect of the present invention provides a method for classifying EEG signals.

[0041] Reference Figure 1 , Figure 1 It is a flow chart of the EEG signal classification method.

[0042] The EEG signal classification method includes but is not limited to the following steps:

[0043] Step S100, acquiring multi-channel EEG signals.

[0044] In step S100, original multi-channel EEG signals are acquired through a plurality of EEG electrode sensors.

[0045] Step S200, extracting features from the EEG signal to obtain a plurality of first-level features.

[0046] Step S200 includes but is not limited to the following steps:

[0047] The EEG signal is filtered, and single trial data is extracted using a 0.5-2.5s time window to obtain multiple frequency sub-bands; each frequency sub-band is co-space transformed and logarithmic variance features are extracted; the logarithmic variance features of each frequency sub-band are cascaded to obtain the first-level features.

[0048] Step S300, calculating the importance weight of each first-level feature to obtain the corresponding first-level importance weight, sorting the multiple first-level features in descending order according to the first-level importance weights, and selecting all the first-level features ranked before the first-level threshold variable as second-level features.

[0049] For step S300, the following method may be used to calculate the importance weight of each first-level feature to obtain the corresponding first-level importance weight:

[0050] One method is to calculate the variance (VAR) of the first-level features as the first-level important weights. The calculation formula of the variance is as follows: In the formula, VAR (j) represents the variance, x (i,j) represents the j-th dimension feature of the i-th input data, represents the average value of the j-th dimension feature, and N is the total number of input data.

[0051] Another method is to calculate the correlation coefficient (Pearson correlation coefficient, PCC) of the first-level features as the first-level important weight. The calculation formula of the correlation coefficient is as follows: Where PCC (j) represents the correlation coefficient, cov represents the covariance operation, δ represents the standard deviation, x (i,j) represents the j-th dimension feature of the ith input data, y represents the label value of the input data and y∈{−1, 1}.

[0052] Another method is to configure an initial weight for each first-level feature in a set of multiple first-level features; for each first-level feature, determine from the set of the first-level features first neighbor data that is of the same category as the first-level feature and has a k-nearest neighbor relationship, and calculate a first distance between each first-level neighbor data and the first-level feature; for each first-level feature, determine from the set of the first-level features second neighbor data that is of a different category from the first-level feature and has a k-nearest neighbor relationship, and calculate a second distance between each second-level neighbor data and the first-level feature; adjust the initial weight according to the size relationship between the first distance and the second distance, and obtain a target weight as the first-level important weight.

[0053] Then, the first-level features are sorted in descending order according to the first-level importance weights, and all the first-level features ranked before the first-level threshold variable are selected as second-level features. The first-level threshold variable is set to K, and the first K first-level features are selected as second-level features.

[0054] Step S400: Perform principal component analysis on the second-level features to obtain first-level principal components corresponding to the second-level features.

[0055] Step S500, calculate the importance weight of each first-level principal component to obtain the corresponding second-level importance weight, sort the multiple first-level principal components in descending order according to the second-level importance weights, and select all the first-level principal components ranked before the second-level threshold variable as the second-level principal components.

[0056] For step S500, the calculation method of the second-level weight value is determined by principal component analysis, the weight value of the first principal component is the largest, the weight value of the second principal component is the second largest, and so on.

[0057] It should be noted that, when the second-level threshold variable is set to Q, the first Q first-level principal components are selected as the second-level principal components.

[0058] Step S600: confirming the optimal combination according to the second-level features and the second-level principal components.

[0059] For step S600, step S300 and step S500 are repeatedly executed, and the first-level threshold variable used each time step S300 is executed is different, and the second-level threshold variable used each time step S500 is executed is different, and the value range of the first-level threshold variable is 1 to the total dimension of the first-level feature; the value range of the second-level threshold variable is 1 to the total number of the first-level principal components. From the multiple second-level features and multiple second-level principal components obtained by repeatedly executing steps S300 and S500, the FLDA classifier and the ten-fold cross-validation method are used for verification, and the combination that can bring the best classification effect is selected, that is, the optimal solution corresponding to the feature selection and feature dimensionality reduction of the optimal combination, including K best The second-level features and Q best The second-level principal component.

[0060] FLDA classifier is Fisher linear discriminant analysis (FLDA) classifier.

[0061] Step S700, classifying the optimal combination to obtain a classification result.

[0062] For step S700, K best The second-level features and Q best The optimal composition of the second-level principal components is input into the FLDA classifier for classification to obtain the classification result.

[0063] In the process of solving the FLDA model training, if the number of training samples is less than the dimension of the feature samples, the intra-class divergence matrix will become singular and cannot be inverted, affecting the stability of the model solution. In order to avoid the singularity of the intra-class divergence matrix, the l2 norm constraint is added to the model. The FLDA regularization model is expressed as: Where w is the projection vector, S B is the inter-class scatter matrix, S W is the intra-class scatter matrix, λ is the preset parameter, specifically λ=10 -4 .

[0064] In this embodiment, the EEG signal classification method has the advantages of low computational complexity, simple model and high efficiency. In addition, the EEG signal classification method takes into account the correlation and globality between features, improves the performance of feature filtering, and thus improves the classification accuracy of EEG signal classification.

[0065] The embodiment of the second aspect of the present invention provides an EEG signal classification device. The EEG signal classification device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the EEG signal classification method as described in the embodiment of the first aspect of the present invention when executing the computer program.

[0066] The third aspect of the present invention provides a storage medium in which executable instructions are stored, and when the executable instructions are executed by a processor, the classification method according to the first aspect of the present invention is implemented.

[0067] It will be appreciated by those skilled in the art that all or some of the steps and systems in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0068] The above is only a preferred embodiment of the present invention. The present invention is not limited to the above implementation mode. As long as the technical effect of the present invention is achieved by the same means, it should belong to the protection scope of the present invention.

Claims

1. A method for classifying electroencephalogram signals, characterized in that: include: Acquire multi-channel EEG signals; Extracting features from the EEG signal to obtain a plurality of first-level features; Calculate the weight value of each first-level feature to obtain a corresponding first-level important weight, sort the multiple first-level features in descending order according to the first-level important weights, and select all the first-level features ranked before the first-level threshold variable as second-level features; Performing principal component analysis on the second-level features to obtain first-level principal components; Calculating the importance weight of each first-level principal component to obtain a corresponding second-level importance weight, sorting the plurality of first-level principal components in descending order according to the second-level importance weights, and selecting all the first-level principal components whose rankings are before the second-level threshold variable as the second-level principal components; confirming the optimal combination according to the second-level features and the second-level principal components; The optimal combination is classified to obtain a classification result.

2. The method for classifying EEG signals according to claim 1, characterized in that: The feature extraction of the EEG signal is performed to obtain a plurality of first-level features, including: Filtering the EEG signal to obtain multiple frequency sub-bands; Performing a co-spatial transformation on each of the frequency sub-bands and extracting logarithmic variance features; The logarithmic variance features of each of the frequency sub-bands are cascaded to obtain the first-level features.

3. The method for classifying EEG signals according to claim 1, characterized in that: The step of calculating the important weights includes: The variance of the input data is calculated as an important weight, and the calculation formula of the variance is as follows: In the formula, VAR (j) represents the variance, x (i,j) represents the j-th dimension feature of the i-th input data, represents the average value of the j-th dimension feature, and N is the total number of input data.

4. The method for classifying EEG signals according to claim 1, characterized in that: The step of calculating the important weights includes: The correlation coefficient of the input data is calculated as an important weight, and the calculation formula of the correlation coefficient is as follows: Where PCC (j) represents the correlation coefficient, cov represents the covariance operation, δ represents the standard deviation, y represents the label value of the input data and y∈{−1, 1}.

5. The method for classifying EEG signals according to claim 1, characterized in that: The step of calculating the important weights includes: Assigning an initial weight to each input data in a set of multiple input data; for each input data, determining first neighbor data of the same category as the input data and having a k-nearest neighbor relationship from the set of input data, and calculating a first distance between each first neighbor data and the input data; For each of the input data, determine second neighbor data of a different category from the input data and having a k-nearest neighbor relationship from the set of the input data, and calculate a second distance between each of the second neighbor data and the input data; The initial weight is adjusted according to the magnitude relationship between the first distance and the second distance to obtain a target weight as an important weight.

6. The method for classifying EEG signals according to claim 1, characterized in that: The value range of the first-level threshold variable is 1 to the total dimension of the first-level features; the value range of the second-level threshold variable is 1 to the total number of the first-level principal components.

7. The method for classifying EEG signals according to claim 1, characterized in that: The confirming the optimal combination according to the second-level features and the second-level principal components includes: confirming the optimal combination from the second-level features and the second-level principal components through an FLDA classifier and ten-fold cross validation.

8. The method for classifying EEG signals according to claim 7, characterized in that: An l2 norm constraint is added to the FLDA classifier for regularization.

9. An electroencephalogram signal classification 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 method for classifying electroencephalogram signals according to any one of claims 1 to 8 is implemented.

10. A storage medium, characterized in that The storage medium stores executable instructions, and when the executable instructions are executed by the processor, the EEG signal classification method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • EMD and CSP fusion power spectral density electroencephalogram feature extraction method

    CN108888264A

  • Auditory attention state awakening degree identification method and device and storage medium

    CN109740544A