Seizure detection system based on eeg feature distribution adaptation transfer learning

By adapting transfer learning to EEG feature distribution and utilizing a random forest classifier and iteratively adjusted weight factors, the problems of insufficient training data and inconsistent distribution in the epilepsy seizure detection system are solved, thus achieving efficient epilepsy seizure detection.

CN114334139BActive Publication Date: 2026-03-17SHANDONG INST OF BUSINESS & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210085498.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-25
Publication Date
2026-03-17
Estimated Expiration
2042-01-25

AI Technical Summary

Technical Problem

Existing epilepsy seizure detection systems struggle to effectively detect seizures due to limited training data and inconsistent data distribution. Furthermore, training deep neural network models is complex and time-consuming.

Method used

By introducing EEG feature distribution adaptation transfer learning, a random forest classifier is trained using source domain data. Combined with the maximum mean difference metric, the marginal and conditional distribution adaptation weights are iteratively adjusted to minimize the feature space transformation matrix. The random forest classifier is then directly trained to detect epileptic seizures in the target domain.

Benefits of technology

It solves the problem of insufficient target patient label data, simplifies the model training process, improves the generalization performance of detection, shortens the training time, and maintains the distribution structure of EEG feature samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114334139B_ABST
    Figure CN114334139B_ABST
Patent Text Reader

Abstract

The application discloses a seizure detection system based on EEG feature distribution adaptation transfer learning, comprising: a data acquisition module, which acquires source domain electroencephalogram data and target domain electroencephalogram data; a data preprocessing module, which performs data segmentation, time-frequency decomposition, feature extraction and feature vector construction on the electroencephalogram data of the source domain and the target domain; a feature transfer learning and electroencephalogram pattern classification module, which iteratively calculates a feature space transformation matrix based on field distribution adaptation to minimize the distribution difference between the electroencephalogram feature samples of the source domain and the target domain; in the feature transfer learning process, the transformed source domain electroencephalogram feature samples are used to train a classifier to realize pattern classification of the target domain samples; the weight factor of the distribution adaptation and the feature space transformation matrix are iteratively updated to realize training of the classifier and pattern classification of the target domain electroencephalogram data and seizure detection. The problem of complex model and time-consuming training of the existing seizure detection technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of epilepsy seizure detection technology, and in particular to an epilepsy seizure detection system based on EEG feature distribution adaptation transfer learning. Background Technology

[0002] The statements in this section merely refer to the background art related to this invention and do not necessarily constitute prior art.

[0003] Epilepsy is a transient central nervous system dysfunction caused by abnormal electrical activity in the brain. Epileptic seizures are sudden and recurrent, severely impacting patients' quality of life. Electroencephalography (EEG) is the most important diagnostic tool for epilepsy. Currently, EEG interpretation is primarily performed by neurologists based on clinical experience. However, the massive amount of EEG data makes this process very time-consuming, and the subjective judgment of medical personnel can also affect the results. Therefore, utilizing computers to automatically analyze brainwave signals and effectively detect epileptic seizures is essential and significantly improves the efficiency of epilepsy diagnosis.

[0004] Most epilepsy seizure detection systems based on machine learning models such as Support Vector Machines (SVM) and various artificial neural networks rely on the assumption that the training and testing datasets follow the same data distribution. However, due to the diversity of epileptic seizure types, even for the same patient, EEG data at different seizure times exhibit different data distributions. Therefore, epilepsy seizure detection models generated based on training data may not achieve ideal detection results on the testing dataset, reducing the generalization performance of the detection system. Furthermore, training deep neural network models requires a large number of labeled training samples, but for most target test patients, labeled data is very limited, especially epileptic seizure data, making it difficult to train a detection model with good performance. To address the issues of limited training data and inconsistent distributions between training and testing data, Wang Shouyan et al. proposed an epilepsy state recognition method in 2020 based on inter-domain joint knowledge transfer and a dilated convolutional neural network classifier. This method achieves cross-domain knowledge transfer by iteratively adjusting the differences in marginal and conditional distributions of EEG features between the source and target domains, and then trains a dilated convolutional neural network as a classifier for epilepsy state recognition in the target domain. This method effectively improves EEG classification performance under conditions of small data volume. However, it does not consider the different importance of the marginal distribution and conditional distribution of EEG features in distribution adaptation transfer learning. Moreover, its transfer learning process and classifier training process are carried out separately, which has certain limitations in terms of model complexity and training time. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides an epilepsy seizure detection system based on EEG feature distribution adaptation transfer learning. By transferring features from the source domain EEG, it solves the problem of limited labeled data from target patients. When performing EEG feature transfer learning based on inter-domain sample distribution adaptation, different weight factors μ are introduced for marginal distribution adaptation and conditional distribution adaptation to address the issue of unequal importance between the two distribution adaptations. Combining the maximum mean difference metric, an iterative method for adjusting the weights of conditional distribution adaptation and marginal distribution adaptation is proposed. Furthermore, during the iteration process, the training of a random forest classifier and the detection of seizures from target patient test data are completed, thus overcoming the problems of complex models and time-consuming training in existing epilepsy seizure detection technologies.

[0006] In a first aspect, the present invention provides an epileptic seizure detection system based on EEG feature distribution adaptation transfer learning;

[0007] An epileptic seizure detection system based on EEG feature distribution adaptation transfer learning includes:

[0008] The data acquisition module is configured to acquire source domain EEG data and target domain EEG data.

[0009] The data preprocessing module is configured to perform data segmentation, time-frequency decomposition, feature extraction, and feature vector construction on both source and target domain EEG data.

[0010] The feature transfer learning and EEG pattern classification module is configured to: iteratively obtain the feature space transformation matrix based on domain distribution adaptation to minimize the distribution difference between source domain and target domain EEG feature samples; during feature transfer learning, use the transformed source domain EEG feature samples to train a random forest classifier to achieve pattern classification of target domain samples; and finally, through iterative updates of the distribution adaptation weight factors and feature space transformation matrix, achieve the training of the random forest classifier and the pattern classification and epileptic seizure detection of target domain EEG data.

[0011] Secondly, the present invention also provides an electronic device, comprising:

[0012] Memory, used for non-transitory storage of computer-readable instructions; and

[0013] Processor, for executing the computer-readable instructions,

[0014] When the computer-readable instructions are executed by the processor, the following steps are performed:

[0015] Acquire source domain EEG data and target domain EEG data;

[0016] For both source and target domain EEG data, data segmentation, time-frequency decomposition, feature extraction, and feature vector construction were performed.

[0017] Based on domain distribution adaptation, the feature space transformation matrix is ​​iteratively obtained to minimize the distribution difference between source domain and target domain EEG feature samples. During feature transfer learning, the transformed source domain EEG feature samples are used to train a random forest classifier to achieve pattern classification of target domain samples. By iteratively updating the weight factors of distribution adaptation and the feature space transformation matrix, the training of the random forest classifier and the pattern classification and epileptic seizure detection of target domain EEG data are finally realized.

[0018] Thirdly, the present invention also provides a storage medium for non-transitory storage of computer-readable instructions, wherein when the non-transitory computer-readable instructions are executed by a computer, the following steps are performed:

[0019] Acquire source domain EEG data and target domain EEG data;

[0020] For both source and target domain EEG data, data segmentation, time-frequency decomposition, feature extraction, and feature vector construction were performed.

[0021] Based on domain distribution adaptation, the feature space transformation matrix is ​​iteratively obtained to minimize the distribution difference between source domain and target domain EEG feature samples. During feature transfer learning, the transformed source domain EEG feature samples are used to train a random forest classifier to achieve pattern classification of target domain samples. By iteratively updating the weight factors of distribution adaptation and the feature space transformation matrix, the training of the random forest classifier and the pattern classification and epileptic seizure detection of target domain EEG data are finally realized.

[0022] Compared with the prior art, the beneficial effects of the present invention are:

[0023] (1) Using labeled data from other patients as source domain data, EEG feature transfer is used for seizure detection in target patient test data, which solves the problem of limited labeled data and imbalance between seizure and non-seizure data in target epilepsy patients, making it difficult to train a detection model with good generalization performance.

[0024] (2) When performing EEG feature transfer based on the domain adaptation method, the importance of edge distribution adaptation and conditional distribution adaptation is weighted to better maintain the distribution structure of EEG feature samples.

[0025] (3) This invention directly utilizes the relative deviation between the conditional distribution MMD distance and the marginal distribution MMD distance to iteratively update the weight factors. It eliminates the need for additional classifier training and surrogate distance updates to the μ weights, reducing computational costs and simplifying the detection model.

[0026] (4) During the process of EEG feature transfer and finding the transformation matrix A that minimizes the distribution difference between domains, the random forest classifier is trained at the same time, which shortens the model training time. Attached Figure Description

[0027] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0028] Figure 1 This is a structural block diagram of an epileptic seizure detection system based on EEG feature distribution adaptation transfer learning, according to Embodiment 1 of the present invention.

[0029] Figure 2 This is a flowchart of the transfer learning and EEG pattern classification module in the epilepsy seizure detection system of Embodiment 1 of the present invention. Detailed Implementation

[0030] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0031] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments of the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. Furthermore, it should be understood that the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0032] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0033] All data acquisition in this embodiment is carried out in accordance with laws and regulations and with user consent, and the data is used legally.

[0034] Example 1

[0035] This embodiment provides an epileptic seizure detection system based on EEG feature distribution adaptation transfer learning;

[0036] like Figure 1 As shown, the epileptic seizure detection system based on EEG feature distribution adaptation transfer learning includes:

[0037] The data acquisition module is configured to acquire source domain EEG data and target domain EEG data.

[0038] The data preprocessing module is configured to perform data segmentation, time-frequency decomposition, feature extraction, and feature vector construction on both source and target domain EEG data.

[0039] The feature transfer learning and EEG pattern classification module is configured to: iteratively obtain the feature space transformation matrix based on domain distribution adaptation to minimize the distribution difference between source domain and target domain EEG feature samples; during feature transfer learning, use the transformed source domain EEG feature samples to train a random forest classifier to achieve pattern classification of target domain samples; and finally, through iterative updates of the distribution adaptation weight factors and feature space transformation matrix, achieve the training of the random forest classifier and the pattern classification and epileptic seizure detection of target domain EEG data.

[0040] Furthermore, the source domain EEG data refers to EEG data from non-target patients that have been labeled with epileptic seizures or non-seizures.

[0041] Furthermore, the target domain EEG data refers to the EEG data of the target patient to be tested.

[0042] Furthermore, the data segmentation specifically includes: using a sliding rectangular window with a width of t seconds to divide the multi-lead EEG data into data segments of length t seconds without overlap. t = 4.

[0043] Furthermore, the time-frequency decomposition refers to using the db4 wavelet basis function to perform three-level wavelet packet decomposition on each segment of the EEG signal.

[0044] Furthermore, the feature extraction refers to: obtaining 8 sub-frequency band nodes through the third-level wavelet packet decomposition, selecting the wavelet packet decomposition coefficients of the first 3 nodes (corresponding to frequency ranges of 0-16Hz, 16-32Hz, and 32-48Hz, respectively), and calculating three features for each selected node; the three features include: sample entropy, mean, and variance. Thus, based on the wavelet packet decomposition coefficients of the 3 nodes, a total of 9 feature values ​​are generated for each segment of the EEG signal.

[0045] Furthermore, the construction of the feature vector specifically refers to: sequentially concatenating the feature values ​​of multi-lead EEG within each t-second time window to form a (N×p)×1-dimensional feature vector, which is a feature sample; N is the number of leads, and p is equal to the number of selected wavelet packet nodes multiplied by 3.

[0046] For example, the feature vector construction specifically refers to: sequentially concatenating the feature values ​​of multi-lead EEG within each 4-second time window to form a (N×9)×1 dimensional feature vector, which is a feature sample; N is the number of leads.

[0047] Furthermore, such as Figure 2 As shown, the feature transfer learning and EEG pattern classification module includes:

[0048] The concatenation unit is configured to concatenate the feature matrix of the source domain and the feature matrix of the target domain to obtain a concatenated feature matrix.

[0049] The first calculation unit is configured to: calculate the maximum mean difference coefficient matrix of the marginal distribution differences based on the spliced ​​feature matrix;

[0050] The second calculation unit is configured to calculate the maximum mean difference coefficient matrix of the conditional distribution differences based on the spliced ​​feature matrix.

[0051] The feature space transformation matrix determination unit is configured to: introduce weighting factors to balance the weights of the maximum mean difference coefficient matrix of marginal distribution differences and the maximum mean difference coefficient matrix of conditional distribution differences during neighborhood distribution adaptation; transform the distribution adaptation transfer learning problem of source domain samples and target domain samples into an optimization problem; transform the optimization problem into a generalized eigenvalue decomposition problem; and obtain the feature space transformation matrix based on the generalized eigenvalue decomposition results.

[0052] The matrix transformation unit is configured to: transform the feature matrix of the source domain using the feature space transformation matrix to obtain the transformed feature matrix of the source domain; and transform the feature matrix of the target domain using the feature space transformation matrix to obtain the transformed feature matrix of the target domain.

[0053] The training unit is configured to train the random forest classifier using the transformed source domain feature matrix and the labels of the source domain samples, thereby obtaining the trained random forest classifier.

[0054] The prediction unit is configured to: use a trained random forest classifier to predict the transformed target domain feature matrix to obtain the label vector of the target domain sample.

[0055] The weight adjustment unit is configured to adjust the weight factors using the concatenated feature matrix, the maximum mean difference coefficient matrix of the marginal distribution differences, the label vector of the current target domain sample, the maximum mean difference coefficient matrix of the conditional distribution differences, and the feature space transformation matrix.

[0056] The output unit is configured to repeat the work from the second computation unit to the weight adjustment unit until the set number of iterations is reached; and output the feature space transformation matrix, the random forest classifier model, and the classification labels of the target domain samples obtained in the last iteration.

[0057] For example, the splicing unit is configured to: splice the feature matrix of the source domain and the feature matrix of the target domain to obtain a spliced ​​feature matrix; specifically including:

[0058] X, the EEG feature matrices of the source and target domains s ∈R (N×9)×n and X t ∈R (N×9)×m Combined into a matrix X∈R (N ×9)×(n+m) Where n and m are the number of samples in the source domain and the target domain, respectively.

[0059] Parameter settings: feature dimension d = 30, regularization parameter λ = 1, number of iterations = 10, initial value of weight μ is 0.5, adjustment coefficient α is 0.01; initialize the class labels of the target domain samples to 0.

[0060] For example, the first calculation unit is configured to: calculate the maximum mean difference coefficient matrix of the edge distribution differences based on the spliced ​​feature matrix; specifically including:

[0061] The maximum mean discrepancy (MMD) is used as a measure of the marginal distribution distance between samples in the source domain and samples in the target domain.

[0062]

[0063] The MMD coefficient matrix M0 of the marginal distribution difference is expressed as:

[0064]

[0065] in, Let represent the 2-norm of the reproducible Hilbert space H; A represents the characteristic space transformation matrix.

[0066] For example, the second calculation unit is configured to: calculate the maximum mean difference coefficient matrix of conditional distribution differences based on the concatenated feature matrix; specifically including:

[0067] Using class conditional probability P(x) t |y t To approximate P(y) t |x t The maximum mean difference is used as a measure of the conditional distribution distance between samples in the source and target domains.

[0068]

[0069] MMD coefficient matrix M of conditional distribution differences c for:

[0070]

[0071] Where, m c and n c , respectively, represent the number of samples of class c in the source domain and the target domain. For samples in the target domain, their class labels are predicted by a random forest classifier.

[0072] For example, the feature space transformation matrix determination unit is configured as follows:

[0073] A factor μ is introduced to balance the weights of the marginal distribution and the conditional distribution during neighborhood distribution fitting, i.e.:

[0074] D(D s D t )≈(1-μ)D(P(X s ),P(X t ))+μD(P(y s |x s ),P(y t |x t (Equation 5)

[0075] Based on Equations (1) and (3), the distribution adaptation transfer learning problem for source and target domain samples is transformed into an optimization problem:

[0076]

[0077] Where λ is the regularization parameter, It is the Frobenius norm, I∈R (n+m)×(n+m) It is the identity matrix, and H is the central matrix. H = I - (1 / n)1, where 1 ∈ R. (n+m)×(n+m) It is a matrix of all 1s.

[0078] If we differentiate the Lagrangian function of equation (6) with respect to A, then the optimization problem shown in equation (6) is transformed into a generalized eigenvalue decomposition problem, that is: solve the eigenvectors corresponding to the first d smallest eigenvalues ​​of the equation shown in equation (7), and use them to construct the transformation matrix A.

[0079]

[0080] For example, the matrix transformation unit is configured to: transform the feature matrix of the source domain using a feature space transformation matrix to obtain a transformed feature matrix of the source domain; and transform the feature matrix of the target domain using a feature space transformation matrix to obtain a transformed feature matrix of the target domain; specifically including:

[0081] Using transformation matrix A, the characteristic matrix X is transformed. s and X t Transform into A respectively T X s and A T X t .

[0082] For example, the training unit is configured to: train a random forest classifier using the transformed source domain feature matrix and the labels of source domain samples, to obtain a trained random forest classifier; specifically including:

[0083] Using A T X s The label Y of the source domain sample s Train a random forest classifier.

[0084] For example, the prediction unit is configured to: use a trained random forest classifier to predict the transformed target domain feature matrix to obtain the label vector of the target domain sample; specifically including:

[0085] The trained random forest classifier is used to process the transformed target domain sample set A. T X t Prediction is performed to obtain the label vector Y of the target domain samples. t .

[0086] For example, the weight adjustment unit is configured to: adjust the weight factors using the concatenated feature matrix, the maximum mean difference coefficient matrix of the marginal distribution differences, the label vector of the current target domain samples, the maximum mean difference coefficient matrix of the conditional distribution differences, and the feature space transformation matrix; specifically including:

[0087] Using X, M0 and the current Y t M c Adjust the μ value along with A. The adjustment method is as follows:

[0088] μ=μ+αΔμ (Equation 8)

[0089]

[0090] Where α is the adjustment coefficient (0 < α < 1), and Δμ is the relative deviation between the conditional distribution MMD distance and the marginal distribution MMD distance.

[0091] This invention extracts three features—sample entropy, variance, and mean—after performing wavelet packet time-frequency decomposition on EEG data. The epilepsy seizure detection system based on EEG feature distribution adaptation and transfer learning provided by this invention can extract other EEG features and perform distribution adaptation and transfer learning.

[0092] The epileptic seizure detection system based on EEG feature distribution adaptation transfer learning provided by this invention uses a random forest classifier to classify EEG patterns and detect epileptic seizures. The random forest classifier can be replaced with other classifier models.

[0093] Example 2

[0094] This embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein, the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory to cause the electronic device to perform the following steps:

[0095] Acquire source domain EEG data and target domain EEG data;

[0096] For both source and target domain EEG data, data segmentation, time-frequency decomposition, feature extraction, and feature vector construction were performed.

[0097] Based on domain distribution adaptation, the feature space transformation matrix is ​​iteratively obtained to minimize the distribution difference between source domain and target domain EEG feature samples. During feature transfer learning, the transformed source domain EEG feature samples are used to train a random forest classifier to achieve pattern classification of target domain samples. By iteratively updating the weight factors of distribution adaptation and the feature space transformation matrix, the training of the random forest classifier and the pattern classification and epileptic seizure detection of target domain EEG data are finally realized.

[0098] Example 3

[0099] This embodiment also provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the following steps:

[0100] Acquire source domain EEG data and target domain EEG data;

[0101] For both source and target domain EEG data, data segmentation, time-frequency decomposition, feature extraction, and feature vector construction were performed.

[0102] Based on domain distribution adaptation, the feature space transformation matrix is ​​iteratively obtained to minimize the distribution difference between source domain and target domain EEG feature samples. During feature transfer learning, the transformed source domain EEG feature samples are used to train a random forest classifier to achieve pattern classification of target domain samples. By iteratively updating the weight factors of distribution adaptation and the feature space transformation matrix, the training of the random forest classifier and the pattern classification and epileptic seizure detection of target domain EEG data are finally realized.

[0103] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A seizure detection system based on EEG feature distribution adaptation transfer learning, characterized in that, Comprise: Data acquisition module: acquire source domain electroencephalogram data and target domain electroencephalogram data; Data preprocessing module: the electroencephalogram data of source domain and target domain are subjected to data segmentation, time-frequency decomposition, feature extraction and feature vector construction; Feature transfer learning and electroencephalogram pattern classification module, comprising: Splicing unit: the feature matrix of the source domain and the feature matrix of the target domain are spliced to obtain a spliced feature matrix; First calculation unit: according to the spliced feature matrix, the maximum mean difference coefficient matrix of the edge distribution difference is calculated; Second calculation unit: according to the spliced feature matrix, the maximum mean difference coefficient matrix of the conditional distribution difference is calculated; Feature space transformation matrix determination unit: introduce weight factor to balance the weight of the maximum mean difference coefficient matrix of the edge distribution difference and the maximum mean difference coefficient matrix of the conditional distribution difference in the field distribution adaptation; the distribution adaptation transfer learning problem of the source domain sample and the target domain sample is converted into an optimization problem; the optimization problem is converted into a generalized eigenvalue decomposition problem; according to the generalized eigenvalue decomposition result, the feature space transformation matrix is obtained; Matrix transformation unit: the feature matrix of the source domain is transformed by using the feature space transformation matrix to obtain the transformed source domain feature matrix; the feature matrix of the target domain is transformed by using the feature space transformation matrix to obtain the transformed target domain feature matrix; Training unit: the transformed source domain feature matrix and the label of the source domain sample are used to train the random forest classifier to obtain the trained random forest classifier; Prediction unit: the transformed target domain feature matrix is predicted by using the trained random forest classifier to obtain the label vector of the target domain sample; Weight adjustment unit: the weight factor is adjusted by using the spliced feature matrix, the maximum mean difference coefficient matrix of the edge distribution difference, the label vector of the current target domain sample, the maximum mean difference coefficient matrix of the conditional distribution difference and the feature space transformation matrix; Output unit: repeat the work of the second calculation unit to the weight adjustment unit until the set number of iterations is reached; the feature space transformation matrix, the random forest classifier model and the classification label of the target domain sample obtained in the last iteration are output.

2. The seizure detection system based on EEG feature distribution adaptation transfer learning as claimed in claim 1, wherein, The source domain electroencephalogram data refers to the electroencephalogram data of non-target patients with labeled epilepsy seizure or non-seizure labels.

3. The seizure detection system based on EEG feature distribution adaptation transfer learning as claimed in claim 1, wherein, The target domain electroencephalogram data refers to the electroencephalogram data to be tested of the target patient.

4. The seizure detection system based on EEG feature distribution adaptation transfer learning as claimed in claim 1, wherein, The data segmentation specifically comprises: using a sliding rectangular window with a width of t seconds to divide the multi-channel EEG into non-overlapping data segments with a length of t seconds.

5. The seizure detection system based on EEG feature distribution adaptation transfer learning as claimed in claim 1, wherein, The time-frequency decomposition refers to selecting db4 wavelet basis function to perform three-layer wavelet packet decomposition on each EEG signal.

6. The seizure detection system based on EEG feature distribution adaptation transfer learning as claimed in claim 5, wherein, The feature extraction refers to: selecting wavelet packet decomposition coefficients of the first several nodes from the third layer wavelet packet decomposition nodes, and calculating three features of each selected node; The three features include sample entropy, mean and variance.

7. The seizure detection system based on EEG feature distribution adaptation transfer learning as claimed in claim 1, wherein said The feature vector construction specifically refers to: the feature values of the multi-lead EEG in each t-second time window are sequentially spliced to form a feature vector with a dimension of (N×T)×1, which is a feature sample; N p N N is the number of leads, p is equal to the number of screened wavelet packet nodes multiplied by 3.​​ 8. An electronic device for seizure detection based on EEG feature distribution adaptation transfer learning, characterized in that, Comprise: Memory for non-transitory storage of computer readable instructions; And Processor for running the computer readable instructions, Wherein, the computer readable instructions are executed by the processor, the following steps are performed: Obtain source domain electroencephalogram data and target domain electroencephalogram data; The electroencephalogram data of the source domain and the target domain are subjected to data segmentation, time-frequency decomposition, feature extraction and feature vector construction; The feature matrix of the source domain and the feature matrix of the target domain are spliced to obtain a spliced feature matrix; According to the spliced feature matrix, the maximum mean difference coefficient matrix of the edge distribution difference is calculated; According to the spliced feature matrix, the maximum mean difference coefficient matrix of the conditional distribution difference is calculated; A weight factor is introduced to balance the weight of the maximum mean difference coefficient matrix of the edge distribution difference and the maximum mean difference coefficient matrix of the conditional distribution difference in the field distribution adaptation; The distribution adaptation transfer learning problem of the source domain sample and the target domain sample is converted into an optimization problem; The optimization problem is converted into a generalized eigenvalue decomposition problem; According to the generalized eigenvalue decomposition result, a feature space transformation matrix is obtained; The feature space transformation matrix is used to transform the feature matrix of the source domain to obtain a transformed source domain feature matrix; The feature space transformation matrix is used to transform the feature matrix of the target domain to obtain a transformed target domain feature matrix; The transformed source domain feature matrix and the label of the source domain sample are used to train a random forest classifier to obtain a trained random forest classifier; The trained random forest classifier is used to predict the transformed target domain feature matrix to obtain a label vector of the target domain sample; The weight factor is adjusted by using the spliced feature matrix, the maximum mean difference coefficient matrix of the edge distribution difference, the label vector of the current target domain sample, the maximum mean difference coefficient matrix of the conditional distribution difference and the feature space transformation matrix; Repeat the work of the second calculation unit to the weight adjustment unit until the set number of iterations is reached; The feature space transformation matrix, the random forest classifier model and the classification label of the target domain sample obtained by the last iteration are output.

9. A storage medium, characterized by a non-transitory The computer readable instructions are stored in the computer, and when the computer readable instructions are executed by the computer, the following steps are performed: Obtain source domain electroencephalogram data and target domain electroencephalogram data; The electroencephalogram data of the source domain and the target domain are subjected to data segmentation, time-frequency decomposition, feature extraction and feature vector construction; The feature matrix of the source domain and the feature matrix of the target domain are spliced to obtain a spliced feature matrix; According to the spliced feature matrix, the maximum mean difference coefficient matrix of the edge distribution difference is calculated; According to the spliced feature matrix, the maximum mean difference coefficient matrix of the conditional distribution difference is calculated; A weight factor is introduced to balance the weight of the maximum mean difference coefficient matrix of the edge distribution difference and the maximum mean difference coefficient matrix of the conditional distribution difference in the field distribution adaptation; The distribution adaptation transfer learning problem of the source domain sample and the target domain sample is converted into an optimization problem; The optimization problem is converted into a generalized eigenvalue decomposition problem; According to the generalized eigenvalue decomposition result, a feature space transformation matrix is obtained; The feature space transformation matrix is used to transform the feature matrix of the source domain to obtain a transformed feature matrix of the source domain; and the feature space transformation matrix is used to transform the feature matrix of the target domain to obtain a transformed feature matrix of the target domain; The transformed feature matrix of the source domain and the label of the source domain sample are used to train the random forest classifier to obtain a trained random forest classifier; The trained random forest classifier is used to predict the transformed feature matrix of the target domain to obtain a label vector of the target domain sample; The spliced feature matrix, the maximum mean difference coefficient matrix of the edge distribution difference, the label vector of the current target domain sample, the maximum mean difference coefficient matrix of the conditional distribution difference, and the feature space transformation matrix are used to adjust the weight factor; The work of the second calculation unit to the weight adjustment unit is repeated until a set number of iterations is reached; and the feature space transformation matrix, the random forest classifier model, and the classification label of the target domain sample obtained in the last iteration are output.

Citation Information

Patent Citations

  • Bearing fault diagnosis method under variable working condition based on mixed entropy and joint distribution adaptation

    CN110849625A

  • Width transfer learning network and rolling bearing fault diagnosis method based on same

    CN110849627A