A method for constructing an electroencephalogram (EEG) signal analysis model based on a CSP algorithm and a PSD algorithm, an electroencephalogram (EEG) signal analysis method and a system
By applying an EEG signal analysis model based on CSP algorithm and PSD algorithm in depression diagnosis, the problem of difficulty in accurately distinguishing the EEG signal characteristics of depressed patients and healthy individuals in the prior art is solved, and higher diagnostic efficiency is achieved and therapeutic effects.
Patent Information
- Application Number
- CN202110972061.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-24
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-08-24
AI Technical Summary
The prior art is difficult to accurately distinguish the EEG signal characteristics of depressed patients and healthy individuals in the diagnosis of depression, resulting in low treatment response rates and low diagnostic efficiency.
采用基于CSP算法和PSD算法的脑电信号分析模型,通过提取共空间模式特征和功率谱密度特征,构建有效的脑电信号分析模型,实现抑郁症患者和健康个体的脑电信号区分。
It improves the accuracy of distinguishing EEG signal characteristics between patients with depression and healthy individuals, and enhances the efficiency of clinical diagnosis and treatment effect.
Smart Images

Figure CN113545789B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an electroencephalogram (EEG) signal analysis model construction method based on a CSP algorithm and a PSD algorithm, an electroencephalogram (EEG) signal analysis method and a system, and belongs to the technical field of digital signal processing. Background Art
[0002] Depression, also known as depressive disorder, is clinically manifested as low mood, slow movements, and excessive concentration on oneself. It not only causes mental pain to patients, but also gradually separates individuals from the outside world. With the increasingly accelerated pace of life and increasingly fierce social competition, people are under increasing physical and psychological pressure, and the incidence of various mental disorders represented by depressive disorders is increasing. Mental health problems have become a serious public health and social problem in my country. For the prevention and treatment of a disease, the first thing to do is to make an accurate diagnosis of the disease. Therefore, the diagnosis of depression plays a pivotal role in the comprehensive prevention and treatment of depression, and it is also one of the problems that need to be solved in clinical practice today.
[0003] At present, objective assessment methods for diagnosing depression can be divided into two types according to different assessment indicators: (1) biochemical indicator assessment method; (2) physiological indicator assessment method. To date, there are no specific biochemical examination items for depressive disorders. Therefore, current laboratory tests are mainly used to exclude depression caused by substances and physical diseases. There are two laboratory tests that are of certain significance for detecting depression, including the dexamethasone suppression test and the thyrotropin-releasing hormone suppression test. Physiological indicators EEG signals are considered to be the most reliable indicators for analyzing EEG signals because they directly reflect the relevant activities of the brain and are widely used in various studies on depression.
[0004] EEG signals are important physiological signals that reflect the activity of the cerebral cortex by collecting the potential changes of electrodes placed on the scalp. Due to its significant relationship with brain activity, EEG signals have been evaluated as one of the effective biomarkers for detecting depression. However, currently about 30% of patients do not respond to antidepressants, and only 1 / 3 of the patients who respond achieve clinical remission. Therefore, those skilled in the art should continue to explore the key distinguishing features of EEG signals between patients with depression and healthy people, further improve the accuracy of bioanalysis, and thus improve the clinical treatment effect. Summary of the invention
[0005] The purpose of the present invention is to overcome the deficiencies in the prior art and to provide an EEG signal analysis model construction method, an EEG signal analysis method and a system based on the CSP algorithm and the PSD algorithm, which can construct an EEG signal depression analysis model based on the Common Spatial Pattern algorithm (CSP) and the Power Spectral Density extraction algorithm (PSD); and based on the model, it is possible to effectively distinguish the EEG signal characteristics of depression patients and healthy controls.
[0006] In order to solve the above technical problems, on the one hand, the present invention provides a method for constructing an EEG signal analysis model based on a CSP algorithm and a PSD algorithm, comprising the following steps:
[0007] Acquire multiple EEG signal samples, wherein the EEG signal samples include healthy samples and depression patient samples;
[0008] Preprocessing EEG signals of multiple EEG signal samples and creating a data set;
[0009] Setting a plurality of CSP feature selection parameters, and constructing a plurality of corresponding CSP models, and extracting a plurality of corresponding CSP feature matrices from the data set one by one using the CSP models;
[0010] Setting a plurality of PSD time window values, and constructing a plurality of corresponding PSD models, and extracting a plurality of corresponding PSD feature matrices from the data set one by one using the PSD models;
[0011] The extracted CSP feature matrix and PSD feature matrix are used as the input of the pre-built classifier one by one to obtain the classification results output by the classifier, and the classification accuracy P is calculated according to the classification results;
[0012] Determine the classification accuracy P1, P2 and the preset value p one by one: if P1>p and P2>p, save the corresponding feature selection parameters and their corresponding CSP model and the corresponding time window value and its corresponding PSD model to obtain the EEG signal analysis model based on the CSP algorithm and the PSD algorithm.
[0013] Furthermore, the plurality of EEG signal samples are derived from 129 EEG signals in a resting state in the MODMA public data set of the Ubiquitous Perception and Intelligent System Laboratory of Lanzhou University;
[0014] The obtaining of multiple EEG signal samples comprises the following steps:
[0015] Leads E1 to E129 were recorded using the 10-20 electrode lead positioning standard calibrated by the International Electroencephalography Society, and Cz was set as the reference electrode;
[0016] The sampling frequency for obtaining EEG signal samples was set to 250 Hz, and the lead impedance of each channel was set to 45-55 kΩ;
[0017] The EEG signal samples were acquired using the 128-lead HydroCel Geodesic Sensor Net conductivity cap and Net Station software and saved in .mat format.
[0018] Furthermore, the preprocessing of the EEG signals of the plurality of EEG signal samples and preparing the data set comprises the following steps:
[0019] Traverse the .mat data files in each EEG signal sample file, open the file and read the original recorded data;
[0020] Select 16 leads: Fp1, Fp2, F3, F4, C3, C4, P3, P4, O1, O2, F7, F8, T3, T4, T5 and T6, and remove EGI-129 that does not correspond to the 16 leads;
[0021] Run the FIR filter built into EEGLAB, set the upper limit frequency to 49Hz and the lower limit frequency to 51Hz, and then remove the 50Hz power frequency interference;
[0022] Run the ICA independent component analysis built into EEGLAB to screen and remove eye movement and heartbeat artifacts;
[0023] Each EEG signal sample was trimmed to 40,000 sampling points and converted into a matrix format. The standardized data was renamed and numbered and saved in .data format.
[0024] Further, the extracting of the corresponding multiple CSP feature matrices comprises the following steps:
[0025] Construct a data structure that meets the requirements of the input structure: EEGSignals.x, EEGSignals.y, and EEGSignals.s; where EEGSignals.x is a three-dimensional matrix that stores the sampling data of all leads of multiple standardized samples in the format of [N s ×N c ×N t ], where Ns is the number of sampling points, Nc is the number of sampling leads, and Nt is the number of samples;
[0026] EEGSignals.y is N t A row vector of length, including the label information of each sample;
[0027] EEGSignals.s is the sampling frequency;
[0028] Extract multiple CSP feature matrices;
[0029] Inject feature labels 1: Label the last rows of multiple CSP feature matrices with corresponding 0-1 labels, so that the label values corresponding to each column of feature data of each sample are the same, where 0 indicates no depression features and 1 indicates depression features.
[0030] Furthermore, the multiple CSP feature selection parameters are 2, 3 or 4.
[0031] Further, the extracting of the corresponding multiple PSD feature matrices comprises the following steps:
[0032] Read multiple standardized EEG signals: traverse the .data data file in each standardized sample file, open the file and read multiple standardized data;
[0033] Extract signals by frequency band: Run Butterworth bandpass filter, set the cutoff frequency to 1Hz, 4Hz, 8Hz, 14Hz and 30Hz, and extract the corresponding delta, theta, alpha and beta band signals from multiple standardized data one by one;
[0034] Obtain the PSD feature matrix of each frequency band: For each time window value t, select 250×t sampling points to calculate the PSD features, and combine the calculated feature matrices in the order of delta, theta, alpha, and beta to obtain the PSD feature matrix of each frequency band of one lead in one sample;
[0035] Combine the total PSD feature matrix: Repeat the steps to obtain the PSD feature matrix of each frequency band, calculate all the situations of the 16 leads of each sample in turn, and splice them together in turn to obtain the total PSD feature matrix;
[0036] Inject feature labels 2: Label the last row of the total PSD feature matrix with a corresponding 0-1 label. The label value corresponding to the 16×4 columns of feature data of each sample is the same, where 0 indicates no depression features and 1 indicates depression features.
[0037] Furthermore, the multiple PSD time window values are 0.5s, 1s, 2s, 3s and 4s.
[0038] In a second aspect, the present invention provides an EEG signal analysis method based on a CSP algorithm and a PSD algorithm, characterized in that the method comprises the following steps:
[0039] Obtain EEG signal samples;
[0040] Preprocessing the EEG signal samples and standardizing the EEG signal samples;
[0041] Using the pre-built CSP model, the CSP features of the EEG signal to be analyzed are extracted;
[0042] Using the pre-built PSD model, the PSD features of the EEG signal to be analyzed are extracted;
[0043] The extracted CSP features and PSD features are input into the pre-built classifiers one by one to obtain classification results 1 and classification results 2;
[0044] Judging the EEG signal according to the classification result: if the classification result 1 and the classification result 2 are consistent, then determining whether the EEG signal to be analyzed is an EEG signal representing depression according to the classification result of the classifier; if the classification result 1 and the classification result 2 are inconsistent, then reanalyzing the EEG signal or outputting a doubtful judgment signal;
[0045] The pre-built CSP model and PSD model are pre-built using the EEG signal analysis model based on the CSP algorithm and the PSD algorithm as described in any one of claims 1 to 7.
[0046] In a third aspect, the present invention provides an EEG signal analysis system based on a CSP algorithm and a PSD algorithm, characterized in that it comprises the following modules:
[0047] An acquisition module, used to acquire EEG signal samples;
[0048] A preprocessing module, used for preprocessing EEG signal samples and standardizing the EEG signal samples; a CSP module, used for extracting CSP features of the EEG signal to be analyzed using a pre-built CSP model;
[0049] The PSD module is used to extract the PSD features of the EEG signal to be analyzed using a pre-built PSD model;
[0050] A classification module is used to input the extracted CSP features and PSD features into a pre-built classifier one by one to obtain classification results 1 and classification results 2;
[0051] The judgment module is used to judge the EEG signal according to the classification result: if the classification result 1 and the classification result 2 are consistent, determine whether the EEG signal to be analyzed is an EEG signal representing depression according to the classification result of the classifier; if the classification result 1 and the classification result 2 are inconsistent, re-analyze the EEG signal or output a judgment signal in doubt.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] The present invention inputs the preprocessed EEG signal into the CSP algorithm and the PSD algorithm, and then imports the feature matrix derived by the feature extraction algorithm into multiple classifiers for classification; at the same time, a confusion matrix is drawn according to the classification results and the classification accuracy is calculated, and the feature selection parameters and time window values of the CSP filter in the feature extraction process are optimized and adjusted according to the classification accuracy, and the most suitable feature selection parameters and time window values are screened, so as to obtain the EEG signal characteristics that can effectively distinguish between patients with depression and normal people, and provide technical support for clinical diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 Shown is a flow chart of an embodiment of model construction of the present invention;
[0055] Figure 2 The figure shows a schematic diagram of an EEG signal channel lead in the prior art;
[0056] Figure 3 The figure shows a waveform diagram of an embodiment of an electroencephalogram signal sample after preprocessing of the present invention;
[0057] Figure 4 Shown is a confusion matrix diagram of an embodiment of CSP feature matrix classification of the present invention;
[0058] Figure 5 Shown is a confusion matrix diagram of an embodiment of PSD feature matrix classification of the present invention. DETAILED DESCRIPTION
[0059] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0060] Example 1
[0061] In order to effectively distinguish the EEG signals of patients with depression and healthy controls, Figure 1 As shown, this embodiment provides a method for constructing an EEG signal analysis model based on a CSP algorithm and a PSD algorithm, which is characterized by comprising the following steps:
[0062] Acquire multiple EEG signal samples, wherein the EEG signal samples include healthy samples and depression patient samples;
[0063] Preprocessing EEG signals of multiple EEG signal samples and creating a data set;
[0064] Setting a plurality of CSP feature selection parameters, and constructing a plurality of corresponding CSP models, and extracting a plurality of corresponding CSP feature matrices from the data set one by one using the CSP models;
[0065] Setting a plurality of PSD time window values, and constructing a plurality of corresponding PSD models, and extracting a plurality of corresponding PSD feature matrices from the data set one by one using the PSD models;
[0066] The extracted CSP feature matrix and PSD feature matrix are used as the input of the pre-built classifier one by one to obtain the classification results output by the classifier, and the classification accuracy P is calculated according to the classification results;
[0067] Determine the classification accuracy P1, P2 and the preset value p one by one: if P1>p and P2>p, save the corresponding feature selection parameters and their corresponding CSP model and the corresponding time window value and its corresponding PSD model to obtain the EEG signal analysis model based on the CSP algorithm and the PSD algorithm.
[0068] The present invention uses two feature extraction algorithms, common space pattern (CSP) and power spectral density (PSD), to select appropriate feature extraction parameters to extract features from preprocessed EEG signals, attempting to find a feature space that can effectively distinguish patients with depression from normal people; by constructing multiple classifiers, the CSP feature matrix and the PSD feature matrix are trained and tested for classification, thereby drawing a confusion matrix and calculating the classification accuracy to evaluate the classification effect, and then evaluating whether the misdiagnosis can be tolerated based on the calculated true positive rate and true negative rate, providing technical support for clinical diagnosis.
[0069] Example 2
[0070] Based on Example 1, Figure 1 This embodiment provides a method for obtaining multiple EEG signal samples, a method for preprocessing the EEG signals of multiple EEG signal samples and making a data set, a method for extracting corresponding multiple CSP feature matrices, and a method for extracting corresponding multiple PSD feature matrices.
[0071] 1. Method for obtaining multiple EEG signal samples
[0072] Multiple EEG signal samples are derived from 129 EEG signals in a resting state in the MODMA public data set of the Ubiquitous Perception and Intelligent System Laboratory of Lanzhou University;
[0073] The obtaining of multiple EEG signal samples comprises the following steps:
[0074] Leads E1 to E129 were recorded using the 10-20 electrode lead positioning standard calibrated by the International Electroencephalography Society, and Cz was set as the reference electrode;
[0075] The sampling frequency for obtaining EEG signal samples was set to 250 Hz, and the lead impedance of each channel was set to 45-55 kΩ;
[0076] The EEG signal samples were acquired using the 128-lead HydroCel Geodesic Sensor Net conductivity cap and Net Station software and saved in .mat format.
[0077] In the application, the EEG signals are derived from the resting EEG signals of 29 volunteers, including 18 patients with depression and 11 healthy controls. The patients with depression have been consulted by at least three attending psychiatrists and have not received psychiatric drug treatment in the past two weeks.
[0078] 2. Method for preprocessing EEG signals of multiple EEG signal samples and making a data set
[0079] Preprocessing the EEG signals of multiple EEG signal samples and making a data set includes the following steps:
[0080] Traverse the .mat data files in each EEG signal sample file, open the file and read the original recorded data;
[0081] Select 16 leads: Fp1, Fp2, F3, F4, C3, C4, P3, P4, O1, O2, F7, F8, T3, T4, T5 and T6, and remove EGI-129 that does not correspond to the 16 leads;
[0082] Run the FIR filter built into EEGLAB, set the upper limit frequency to 49Hz and the lower limit frequency to 51Hz, and then remove the 50Hz power frequency interference;
[0083] Run the ICA independent component analysis built into EEGLAB to screen and remove eye movement and heartbeat artifacts;
[0084] Each EEG signal sample was trimmed to 40,000 sampling points and converted into a matrix format. The standardized data was renamed and numbered and saved in .data format.
[0085] In the application, the waveform of the preprocessed EEG signal can not only be linearly corrected, but also the electrooculographic artifacts and some bad conduction components can be removed. Figure 3 This is the EEG signal waveform after being filtered by a notch filter to remove 50Hz power frequency interference and processed by the independent component analysis algorithm.
[0086] 3. Method for extracting corresponding multiple CSP feature matrices
[0087] Extracting the corresponding multiple CSP feature matrices includes the following steps:
[0088] Construct a data structure that meets the requirements of the input structure: EEGSignals.x, EEGSignals.y, and EEGSignals.s; where EEGSignals.x is a three-dimensional matrix that stores the sampling data of all leads of multiple standardized samples in the format of [N s ×N c ×N t ], where Ns is the number of sampling points, Nc is the number of sampling leads, and Nt is the number of samples;
[0089] EEGSignals.y is N t A row vector of length, including the label information of each sample;
[0090] EEGSignals.s is the sampling frequency;
[0091] Extract multiple CSP feature matrices;
[0092] The last rows of multiple CSP feature matrices are labeled with corresponding 0-1 labels, so that the label value corresponding to each column of feature data of each sample is the same, where 0 indicates no depression characteristics and 1 indicates depression characteristics.
[0093] When this embodiment is applied, since the feature vector calculated by the CSP algorithm has more obvious feature differences as it is closer to the edge, the feature selection parameter selection range is set to 2-4; after setting the feature selection parameter to 2, 3 and 4 in turn, it is found that when the feature selection parameter is set to 2, the best classification effect is achieved, then:
[0094] S331 Let X1 and X2 be N×T time-space signal matrices, respectively, where N represents the number of leads and T represents the number of sampling points;
[0095] After S332 normalizes X1 and X2, the covariance matrix is calculated first: Then calculate the mixed space covariance matrix:
[0096] S333 uses principal component analysis to solve the whitening feature matrix:
[0097] Perform eigenvalue decomposition on R: R = UλU T , where U is the eigenvector matrix corresponding to λ, λ is a diagonal matrix, and the diagonal elements are eigenvalues;
[0098] In descending order of eigenvalues, we get the whitened value matrix:
[0099] S334 constructs a suitable spatial filter:
[0100] First, the covariance matrix corresponding to X1 and X2 is transformed into S1 = PR1P T , S2=PR2P T ;
[0101] Next, perform another principal component decomposition:
[0102] Then B1=B2=V, and the sum of the two diagonal matrices is the identity matrix: λ1+λ2=I;
[0103] Then, arrange the eigenvalues of λ1 in descending order, and the opposite order of λ2, then λ1=diag(I1σ M 0),λ2=diag(0σ M I2);
[0104] At this time, the variance of the two signal matrices is optimal, and the corresponding projection matrix W is: W = B T P.
[0105] S335 feature extraction:
[0106] The training matrix X L and X R After filtering by filter W, we can get:
[0107] According to the definition of CSP algorithm, the training set X L and X R The eigenvectors of are:
[0108] For the test set data, the feature extraction process is:
[0109] In this embodiment, when the CSP feature selection parameter is set to 2, a feature vector with a dimension of 4 is constructed to obtain a 29×4 feature matrix. The last column is labeled with 1 or 0 corresponding to the presence or absence of depression. The four classifiers, Linear Discriminant Analysis (LDA), Support Vector Machine (SVM), Logical Regression (LR) and K-Nearest Neior (KNN), can be input for training, learning and classification testing. Figure 4 ,The final classification accuracy rates were 100%, 100%, 96.6% and 96.6% respectively, and the false negative rate of each classifier was lower than the false positive rate.
[0110] 4. Extraction of multiple corresponding PSD feature matrix methods
[0111] Extracting the corresponding multiple PSD feature matrices includes the following steps:
[0112] Traverse the .data file in each standardized sample file, open the file and read multiple standardized data;
[0113] Extract signals by frequency band: Run Butterworth bandpass filter, set the cutoff frequency to 1Hz, 4Hz, 8Hz, 14Hz and 30Hz, and extract the corresponding delta, theta, alpha and beta band signals from multiple standardized data one by one;
[0114] Each time window value t is set, 250×t sampling points are selected to calculate the PSD features, and the calculated feature matrices are combined in the order of delta, theta, alpha and beta to obtain the PSD feature matrix of each frequency band of one lead in a sample;
[0115] Repeat the steps to obtain the PSD feature matrix of each frequency band, calculate all the situations of the 16 leads of each sample in turn, and splice them together in turn to obtain the total PSD feature matrix;
[0116] The last row of the total PSD feature matrix is labeled with a corresponding 0-1 label, and the label value corresponding to the 16×4 columns of feature data of each sample is the same, where 0 indicates no depression characteristics and 1 indicates depression characteristics.
[0117] The PSD time window values are determined to be 0.5s, 1s, 2s, 3s, and 4s.
[0118] When this embodiment is applied, the selection of the time window value directly affects the size of the PSD feature matrix. Considering that the sampling frequency of the data set is 250Hz, the time window value selection range is set to 0.5-4s. After trying to set the time window value to 0.5s, 1s, 2s, 3s and 4s in turn, it is found that when the time window value is 0.5s, the PSD feature matrix is too large, which is not conducive to data processing efficiency. When the time window value is greater than or equal to 2s, changing the feature selection parameters has little effect on the final classification effect. It is preferred to set the time window value to 1s, then:
[0119] S461 performs discrete Fourier transform on a sequence signal x(t) of length N:
[0120] S462 calculates the power spectral density (PSD):
[0121] In this embodiment, the time window value is set to 1s, and a feature vector with a dimension of 320 is constructed to obtain a feature matrix of 160×320. The last row is labeled with 1 and 0 corresponding to depression. The four classifiers of SVM, LR, LDA and KNN can be input for training, learning and classification testing. Figure 5 ,The final classification accuracy rates were 92.8%, 97.2%, 96.6% and 90.3% respectively, and the false negative rate of each classifier was lower than the false positive rate.
[0122] The present invention obtains original experimental data by using the depression public dataset of the Ubiquitous Perception and Intelligent System Laboratory of Lanzhou University, thereby improving the credibility of the method; by using the EEGLAB toolbox for signal preprocessing and noise reduction, using the CSP algorithm and the PSD algorithm to construct feature matrices respectively, using four feature classification algorithms, namely SVM, LR, LDA and KNN, to classify the feature matrices, and drawing the confusion matrix and calculating the classification accuracy to evaluate the final classification effect, thereby improving the accuracy and credibility of the model.
[0123] Example 3
[0124] Based on Embodiment 1 or 2, this embodiment provides an EEG signal analysis method based on a CSP algorithm and a PSD algorithm, comprising the following steps:
[0125] Obtain EEG signal samples;
[0126] Preprocessing the EEG signal samples and standardizing the EEG signal samples;
[0127] Using the pre-built CSP model, the CSP features of the EEG signal to be analyzed are extracted;
[0128] Using the pre-built PSD model, the PSD features of the EEG signal to be analyzed are extracted;
[0129] The extracted CSP features and PSD features are input into the pre-built classifiers one by one to obtain classification results 1 and classification results 2;
[0130] Judging the EEG signal according to the classification result: if the classification result 1 and the classification result 2 are consistent, then determining whether the EEG signal to be analyzed is an EEG signal representing depression according to the classification result of the classifier; if the classification result 1 and the classification result 2 are inconsistent, then reanalyzing the EEG signal or outputting a doubtful judgment signal;
[0131] The pre-constructed CSP model and PSD model are pre-constructed using the EEG signal analysis model based on the CSP algorithm and the PSD algorithm constructed in Example 1 or Example 2.
[0132] The present invention is based on the model constructed in Example 1 or Example 2, and analyzes the EEG signals of the subjects through the screened time window value and feature selection parameters and their corresponding model analysis, and determines whether the subject is a depression patient. The analysis method has high accuracy and a low false negative rate (i.e., the proportion of depression patients misdiagnosed as healthy people), which can be used for clinical reference.
[0133] Example 4
[0134] Based on the same inventive concept as Example 3, this example introduces an EEG signal analysis system based on the CSP algorithm and the PSD algorithm, including:
[0135] An acquisition module, used to acquire EEG signal samples;
[0136] A preprocessing module, used for preprocessing EEG signal samples and standardizing the EEG signal samples; a CSP module, used for extracting CSP features of the EEG signal to be analyzed using a pre-built CSP model;
[0137] The PSD module is used to extract the PSD features of the EEG signal to be analyzed using a pre-built PSD model;
[0138] A classification module is used to input the extracted CSP features and PSD features into a pre-built classifier one by one to obtain classification results 1 and classification results 2;
[0139] The judgment module is used to judge the EEG signal according to the classification result: if the classification result 1 and the classification result 2 are consistent, determine whether the EEG signal to be analyzed is an EEG signal representing depression according to the classification result of the classifier; if the classification result 1 and the classification result 2 are inconsistent, re-analyze the EEG signal or output a judgment signal in doubt.
[0140] The specific functional implementation of the above functional modules refers to the relevant content in the method of Example 3.
[0141] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0142] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0143] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0145] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.
Claims
1. A method for constructing an EEG signal analysis model based on a CSP algorithm and a PSD algorithm, characterized in that: The following steps are involved: Acquire multiple EEG signal samples, wherein the EEG signal samples include healthy samples and depression patient samples; Preprocessing EEG signals of multiple EEG signal samples and creating a data set; Setting a plurality of CSP feature selection parameters, and constructing a plurality of corresponding CSP models, and extracting a plurality of corresponding CSP feature matrices from the data set one by one using the CSP models; Setting a plurality of PSD time window values, and constructing a plurality of corresponding PSD models, and extracting a plurality of corresponding PSD feature matrices from the data set one by one using the PSD models; The extracted CSP feature matrix and PSD feature matrix are used as the input of the pre-built classifier one by one to obtain the classification result output by the classifier, and the classification accuracy P is calculated according to the classification result; Determine the size of the classification accuracy P1, P2 and the preset value p one by one: if P1>p and P2>p, save the corresponding feature selection parameters and their corresponding CSP model and the corresponding time window value and its corresponding PSD model, and obtain the EEG signal analysis model based on the CSP algorithm and the PSD algorithm; Among them, the method of preprocessing the EEG signals of multiple EEG signal samples includes running the FIR filter embedded in EEGLAB, setting the upper limit frequency to 49Hz and the lower limit frequency to 51Hz, thereby removing the 50Hz power frequency interference; running the ICA independent component analysis embedded in EEGLAB to screen and remove eye movement and heartbeat artifacts; The pre-built classifiers include linear discriminant analysis, SVM, logistic regression and KNN, and these four classifiers are used to perform training learning and classification testing on the extracted CSP feature matrix and PSD feature matrix respectively; The multiple EEG signal samples are derived from 129 EEG signals in a resting state in the MODMA public data set of the Ubiquitous Perception and Intelligent System Laboratory of Lanzhou University; The obtaining of multiple EEG signal samples comprises the following steps: Leads E1 to E129 were recorded using the 10-20 electrode lead positioning standard calibrated by the International Electroencephalography Society, and Cz was set as the reference electrode; The sampling frequency for obtaining EEG signal samples was set to 250 Hz, and the lead impedance of each channel was set to 45-55 kΩ; Use the 128-lead HydroCel Geodesic SensorNet conductivity cap and Net Station software to obtain EEG signal samples and save them in .mat format; The method of preprocessing the EEG signals of a plurality of EEG signal samples and preparing a data set comprises the following steps: Traverse the .mat data files in each EEG signal sample file, open the file and read the original recorded data; 16 leads were selected: Fp1, Fp2, F3, F4, C3, C4, P3, P4, O1, O2, F7, F8, T3, T4, T5, and T6, and EGI-129 that did not correspond to the 16 leads was removed; Run the FIR filter built into EEGLAB, set the upper limit frequency to 49Hz and the lower limit frequency to 51Hz, and the 50Hz power frequency interference will be removed; Run the ICA independent component analysis built into EEGLAB to screen and remove eye movement and heartbeat artifacts; Each EEG signal sample was trimmed to 40,000 sampling points and converted into a matrix format. The standardized data was renamed and numbered and saved in .data format; The extracting of the corresponding multiple CSP feature matrices comprises the following steps: Construct data structures that meet the requirements of the input structure: EEGSignals.x, EEGSignals.y, and EEGSignals.s; Among them, EEGSignals.x is a three-dimensional matrix that stores the sampling data of all leads of multiple standardized samples in the format of [N s ×N c ×N t ], where Ns is the number of sampling points, Nc is the number of sampling leads, and Nt is the number of samples; EEGSignals.y is N t A row vector of length, including the label information of each sample; EEGSignals.s is the sampling frequency; Extract multiple CSP feature matrices; Inject feature labels 1: Label the last row of multiple CSP feature matrices with corresponding 0-1 labels, so that the label value corresponding to each column of feature data of each sample is the same, where 0 indicates no depression feature and 1 indicates depression feature; The multiple CSP feature selection parameters are 2, 3 or 4; The extracting of the corresponding multiple PSD feature matrices comprises the following steps: Read multiple standardized EEG signals: traverse the .data file in each standardized sample file, open the file and read multiple standardized data; Extract signals by frequency band: Run Butterworth bandpass filter, set the cutoff frequency to 1Hz, 4Hz, 8Hz, 14Hz and 30Hz, and extract the corresponding delta, theta, alpha and beta band signals from multiple standardized data one by one; Obtain the PSD feature matrix of each frequency band: Each time a time window value t is set, 250×t sampling points are selected to calculate the PSD features, and the calculated feature matrices are combined in the order of delta, theta, alpha, and beta to obtain the PSD feature matrix of each frequency band of one lead in one sample; Combine the total PSD feature matrix: Repeat the steps to obtain the PSD feature matrix of each frequency band, calculate all the situations of the 16 leads of each sample in turn, and splice them together in turn to obtain the total PSD feature matrix; Inject feature labels 2: Label the last row of the total PSD feature matrix with a corresponding 0-1 label. The label value corresponding to the 16×4 columns of feature data of each sample is the same, where 0 indicates no depression features and 1 indicates depression features. The multiple PSD time window values are 0.5s, 1s, 2s, 3s and 4s.
2. An EEG signal analysis method using the EEG signal analysis model based on the CSP algorithm and the PSD algorithm as claimed in claim 1, characterized in that: The following steps are involved: Obtain EEG signal samples; Preprocessing the EEG signal samples and standardizing the EEG signal samples; Using the pre-built CSP model, the CSP features of the EEG signal to be analyzed are extracted; Using the pre-built PSD model, the PSD features of the EEG signal to be analyzed are extracted; The extracted CSP features and PSD features are input into the pre-built classifiers one by one to obtain classification results 1 and classification results 2; Judging the EEG signal according to the classification result: if the classification result 1 and the classification result 2 are consistent, determining whether the EEG signal to be analyzed is an EEG signal representing depression according to the classification result of the classifier; If classification result 1 and classification result 2 are inconsistent, the EEG signal is reanalyzed or a doubtful signal is output; Wherein, the pre-constructed CSP model and PSD model are pre-constructed using the EEG signal analysis model based on the CSP algorithm and the PSD algorithm as described in claim 1; The EEG signal analysis system based on CSP algorithm and PSD algorithm includes the following modules: An acquisition module, used to acquire EEG signal samples; A preprocessing module, used for preprocessing the EEG signal samples and standardizing the EEG signal samples; The CSP module is used to extract the CSP features of the EEG signal to be analyzed using a pre-built CSP model; The PSD module is used to extract the PSD features of the EEG signal to be analyzed using a pre-built PSD model; A classification module is used to input the extracted CSP features and PSD features into a pre-built classifier one by one to obtain classification results 1 and classification results 2; A judgment module is used to judge the EEG signal according to the classification result: if the classification result 1 and the classification result 2 are consistent, then determine whether the EEG signal to be analyzed is an EEG signal representing depression according to the classification result of the classifier; if the classification result 1 and the classification result 2 are inconsistent, then re-analyze the EEG signal or output a judgment signal in doubt; The multiple EEG signal samples are derived from 129 EEG signals in a resting state in the MODMA public data set of the Ubiquitous Perception and Intelligent System Laboratory of Lanzhou University; The obtaining of EEG signal samples comprises the following steps: Leads E1 to E129 were recorded using the 10-20 electrode lead positioning standard calibrated by the International Electroencephalography Society, and Cz was set as the reference electrode; The sampling frequency for obtaining EEG signal samples was set to 250 Hz, and the lead impedance of each channel was set to 45-55 kΩ; Use the 128-lead HydroCel Geodesic SensorNet conductivity cap and Net Station software to obtain EEG signal samples and save them in .mat format; The preprocessing of the EEG signal samples and standardization of the EEG signal samples include the following steps: Traverse the .mat data files in each EEG signal sample file, open the file and read the original recorded data; 16 leads were selected: Fp1, Fp2, F3, F4, C3, C4, P3, P4, O1, O2, F7, F8, T3, T4, T5, and T6, and EGI-129 that did not correspond to the 16 leads was removed; Run the FIR filter embedded in EEGLAB, set the upper limit frequency to 49Hz and the lower limit frequency to 51Hz, and then remove the 50Hz power frequency interference; Run the ICA independent component analysis built into EEGLAB to screen and remove eye movement and heartbeat artifacts; Each EEG signal sample was trimmed to 40,000 sampling points and converted into a matrix format. The standardized data was renamed and numbered and saved in .data format; The extraction of CSP features of the EEG signal to be analyzed comprises the following steps: Construct data structures that meet the requirements of the input structure: EEGSignals.x, EEGSignals.y, and EEGSignals.s; Among them, EEGSignals.x is a three-dimensional matrix that stores the sampling data of all leads of multiple standardized samples in the format of [N s ×N c ×N t ], where Ns is the number of sampling points, Nc is the number of sampling leads, and Nt is the number of samples; EEGSignals.y is N t A row vector of length, including the label information of each sample; EEGSignals.s is the sampling frequency; Extract multiple CSP feature matrices; Inject feature labels 1: Label the last row of multiple CSP feature matrices with corresponding 0-1 labels, so that the label value corresponding to each column of feature data of each sample is the same, where 0 indicates no depression feature and 1 indicates depression feature; The multiple CSP feature selection parameters are 2, 3 or 4; The method of extracting the PSD feature of the EEG signal to be analyzed comprises the following steps: Read multiple standardized EEG signals: traverse the .data file in each standardized sample file, open the file and read multiple standardized data; Extract signals by frequency band: Run Butterworth bandpass filter, set the cutoff frequency to 1Hz, 4Hz, 8Hz, 14Hz and 30Hz, and extract the corresponding delta, theta, alpha and beta band signals from multiple standardized data one by one; Obtain the PSD feature matrix of each frequency band: Each time a time window value t is set, 250×t sampling points are selected to calculate the PSD features, and the calculated feature matrices are combined in the order of delta, theta, alpha, and beta to obtain the PSD feature matrix of each frequency band of one lead in one sample; Combine the total PSD feature matrix: Repeat the steps to obtain the PSD feature matrix of each frequency band, calculate all the situations of the 16 leads of each sample in turn, and splice them together in turn to obtain the total PSD feature matrix; Inject feature labels 2: Label the last row of the total PSD feature matrix with a corresponding 0-1 label. The label value corresponding to the 16×4 columns of feature data of each sample is the same, where 0 indicates no depression features and 1 indicates depression features. The multiple PSD time window values are 0.5s, 1s, 2s, 3s and 4s.
Citation Information
Patent Citations
Method for extracting electroencephalogram features of patients suffering from PSD (post-stroke depression)
CN102824171A