A method for predicting epileptic seizures based on transfer entropy brain network analysis

By establishing a brain network based on metastatic entropy and combining graph theory analysis, network features are extracted and classification is used using support vector machine models, the problem of low accuracy in epilepsy prediction in the existing technology is solved, and efficient epilepsy prediction and brain network analysis are achieved.

CN116439727BActive Publication Date: 2025-07-01DONGHUA UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310499744.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2025-07-01
Estimated Expiration
2043-05-06

AI Technical Summary

Technical Problem

The prior art is difficult to effectively utilize the information flow relationship in the brain network in epilepsy prediction, resulting in a low prediction accuracy.

Method used

By using transfer entropy as a connection indicator, a causal brain network is established, and network features are extracted in combination with graph theory analysis methods, and a support vector machine model is used for classification to achieve the prediction of epilepsy.

Benefits of technology

It improves the accuracy of epilepsy prediction, reaching an average of 93.62%, and can analyze the changes in brain networks and the relationship between information flow in a deeper way, helping doctors take preventive measures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116439727B_ABST
    Figure CN116439727B_ABST
Patent Text Reader

Abstract

The present invention provides a method for predicting epileptic seizures based on transfer entropy brain network analysis. In order to analyze the connection strength, information flow direction, and non-linear relationship between brain regions of a patient, transfer entropy is used as a connection index between the electroencephalogram (EEG) channel signals of the patient to establish a brain network. In order to better analyze the organizational structure of the brain network, graph theory analysis methods are combined to analyze the brain network of the patient at different times. Transfer entropy can reflect the connection pattern between the EEG signals of each region in the patient's brain network. It is also a model-free and non-linear directed connection index, which has the ability to sensitively detect correlations of different orders and can calculate non-linear interactions, enabling transfer entropy to more comprehensively reveal the relationship between signals. The brain network is constructed based on the calculation of transfer entropy between channels in the present invention, which can not only obtain good prediction performance, but also be used to analyze the changes in the brain network and the information flow relationship between nodes to deeply understand the epileptic seizure process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to machine learning classification technology based on electroencephalogram (EEG) signal processing, and particularly to a method for establishing a brain network based on transfer entropy and combining graph theory for feature analysis to achieve epilepsy seizure prediction. Background Art

[0002] Epilepsy is a common neurological disorder, with over 50 million people suffering from it globally and over 10 million epilepsy patients in China. During an epileptic seizure, the electrical activity of the brain is disrupted, leading to functional and communication disorders between brain regions and causing a series of symptoms. Epileptic seizures are sudden and recurrent, which can severely affect the normal activities and lives of patients, such as sudden loss of consciousness, falls, drowning, or car accidents after movement disorders. Therefore, the effective alleviation and treatment of epileptic seizures have attracted extensive attention.

[0003] Epilepsy prediction is crucial for improving the lives of patients. EEG signals are the most commonly used medium for predicting epileptic seizures because scalp electroencephalogram has the advantages of convenient acquisition, low cost, high time resolution, etc., and can record the brain electrical activities of epilepsy patients. Machine learning algorithms are the main methods for epilepsy prediction and can be used to identify specific patterns in electroencephalograms. Currently, algorithms such as support vector machines and neural networks have been used to develop many promising prediction models. Therefore, developing an efficient method for predicting epileptic seizures by combining machine learning is an urgent problem to be solved currently. The success of epilepsy seizure prediction will enable doctors or patients themselves to take appropriate measures to prevent or reduce the harm of epileptic seizures.

[0004] The main goal of epilepsy prediction research is to improve the classification accuracy of the model by selecting appropriate EEG features and excellent classification models. Feature extraction is the most basic and crucial step in the classification process of epilepsy EEG signals. Currently, most studies are based on single-channel EEG signal analysis to extract features for epilepsy prediction. However, in fact, the brain is a large integrated network where various regions interact with each other. The spatial brain network connected by the interaction between brain channel signals contains important information, and there is a strong connection between the epileptic seizure process and the evolution of brain network organization. Therefore, it is necessary to use appropriate metrics to establish the brain network of patients for analysis and feature extraction. Different from the connection metrics that have been used for epilepsy brain network analysis, transfer entropy is a model-free and non-linear directed connection metric. It has the ability to sensitively detect correlations of different orders and can calculate non-linear interactions. These characteristics enable it to more comprehensively reveal the relationships between signals.

[0005] In summary, the present invention combines EEG and machine learning technologies to achieve seizure prediction, with the focus on using transfer entropy to establish a cause-effect brain network. The realization of seizure prediction aims to classify EEG signals in the pre-ictal and inter-ictal periods, so as to be able to identify whether the EEG signal has entered the pre-ictal period from the inter-ictal period during the daily monitoring of epilepsy patients and issue a warning in a timely manner. Therefore, we use the EEG segments in these two periods to construct transfer entropy brain networks respectively. Then, the graph theory analysis method is used to analyze the brain network, and the relevant network metrics are used as features and trained and classified on a Support Vector Machine (SVM) model to identify the pre-ictal period to achieve seizure prediction. Summary of the Invention

[0006] The object of the present invention is to establish an epilepsy brain network with information flow for patients, analyze the brain network in different periods in combination with graph theory, use the extracted network features to achieve seizure prediction, be able to obtain good prediction performance while analyzing the differences in the brain network of patients in different states, so that doctors can adopt some epilepsy-suppressing drugs or some other measures for patients to prevent or reduce the severity of epileptic seizures.

[0007] A method for predicting epileptic seizures based on the analysis of transfer entropy brain networks, comprising the following steps:

[0008] Step S1: Preprocessing and segmentation of data; since the scalp EEG acquisition process will be affected by external noise, artifacts and power frequency interference, it is necessary to filter the original EEG to achieve denoising; an infinite impulse response filter is used for band-pass filtering of 0.5 - 60 Hz and notch filtering of 50 Hz.

[0009] Step S2: Construction of transfer entropy brain networks; for multi-channel EEG data in the dataset, transfer entropy is used to describe the connection strength, information flow direction and non-linear relationship between the channel signals of epilepsy patients; the HERMES toolbox in MATLAB is used to calculate the transfer entropy between the channel signals. When the calculated transfer entropy value is 0, it means that there is no causal relationship between these two channel signals; the above method is used to calculate the causal connection relationship between the EEG channel signals to obtain a connection matrix to establish an epilepsy brain network.

[0010] Step S3: Determine the threshold to convert the transfer entropy connection matrix into a sparse adjacency matrix; To obtain the adjacency matrix of the brain transfer entropy matrix, a certain threshold is set for the transfer entropy connection matrix; If the element in the matrix is greater than the set threshold, it is considered that there is a connection relationship between the corresponding two-channel signals. At this time, the weight of the edge between the nodes corresponding to these two channels is the transfer entropy value between them; If the element in the matrix is less than the set threshold, it is considered that there is no connection relationship, and the value of the edge weight is 0; After threshold processing, a sparse weighted directed network will be obtained.

[0011] Step S4: Combine graph theory for analysis and extract network features.

[0012] Step S5: Use a machine learning classifier to classify the network features to achieve epilepsy prediction; Based on the patient's EEG data, it is divided into 5-second sliding time windows, and a transfer entropy brain network is established within each time window; Extract the network features in Step S4 to form a feature vector for each time window; For each patient, in all of their pre-ictal and inter-ictal data, extract the feature vectors of all time windows to form a feature dataset, and divide it into a training set and a test set; Select a support vector machine as the classifier and use the training set to train the classifier model; Input the test set into the trained classifier model to obtain the classification results; Use five-fold cross-validation to train and test the support vector machine classifier.

[0013] Preferably, for the preprocessing and segmentation of the data in Step S1 of the present invention, the CHB-MIT epilepsy EEG dataset is used for testing. Since scalp EEG acquisition is affected by external noise and artifacts, an infinite impulse response filter is used for a 0.5 - 60 Hz band-pass filter to filter out electrooculogram artifacts and out-of-band noise, and notch filtering is implemented under 50 Hz power frequency interference.

[0014] Segment the patient's data. Set the pre-ictal time of the patient, that is, the interval between epilepsy prediction and the actual epilepsy seizure is 10 to 30 minutes, and intercept a 5-minute time period before the selected interval. This time period is the epilepsy prediction period, and features are extracted in this period and the prediction performance is evaluated based on the results of this period; For each patient, use all the pre-ictal data segments selected, and intercept the inter-ictal data in a 1:1 ratio of pre-ictal to inter-ictal as the patient's EEG dataset.

[0015] Preferably, in Step S2 of the present invention, a brain network for epilepsy patients in different periods is constructed based on transfer entropy; Use the HERMES toolbox in MATLAB to calculate the transfer entropy between channel signals. When the calculated transfer entropy value is 0, it means that there is no causal relationship between these two-channel signals; Obtain the connection matrix to establish the epilepsy brain network.

[0016] Preferably, in step S3 of the present invention, a threshold is determined to convert the transfer entropy connection matrix into a sparse adjacency matrix; in order to obtain the adjacency matrix of the effective connection of the brain, a certain threshold is set for the transfer entropy connection matrix; if the element in the matrix is greater than the set threshold, it is considered that there is a connection relationship between the corresponding two-channel signals. At this time, the weight of the edge between the nodes corresponding to these two channels is the transfer entropy value between them; if the element in the matrix is less than the set threshold, it is considered that there is no connection relationship, and the value of the edge weight is 0. After threshold processing, a weighted directed network will be obtained.

[0017] In order to determine a specific threshold for each patient, the initial threshold is set to 0 and the threshold is gradually increased in steps of 0.01 until a threshold is found that just makes the graph connected, that is, the algebraic connectivity of the graph is just a positive number at this time. This threshold is the threshold determined for the patient, and this threshold calculation process is carried out during the interictal period of each patient, and the threshold calculated from the interictal period is used as the patient's threshold.

[0018] Preferably, in step S4 of the present invention, graph theory is combined for analysis to extract network features; the network features include local parameters such as node degree, clustering coefficient, local efficiency, etc. and global parameters such as network density, characteristic path length, and global efficiency.

[0019] Preferably, in step S5 of the present invention, a machine learning classifier is used to classify the network features to achieve epilepsy prediction.

[0020] The index for evaluating the prediction result is the accuracy rate, and the calculation formula is as follows:

[0021]

[0022] Where TP is the pre-ictal period correctly classified; TN is the inter-ictal period correctly classified; FP is the inter-ictal period misclassified as the pre-ictal period, and FN is the pre-ictal period misclassified as the inter-ictal period.

[0023] The present invention provides a method for predicting epileptic seizures based on transfer entropy to establish brain network analysis. In order to analyze the connection strength, information flow direction, and non-linear relationship between brain regions of patients, the present invention uses transfer entropy as a connection index between electroencephalogram channel signals of patients to establish a brain network; in order to better analyze the organizational structure of the brain network, the present invention combines graph theory analysis methods to analyze the brain network of patients in different periods.

[0024] The present invention provides a method for predicting epileptic seizures based on transfer entropy brain network analysis. The method constructs a brain network using transfer entropy metrics, combines graph theory parameter metrics for analysis, and constructs a feature dataset for model training and testing, achieving an average prediction accuracy of 93.62%. Compared with existing epilepsy prediction methods that analyze single-channel features, the present invention constructs a brain network based on the calculation of transfer entropy between channels, which can not only obtain good prediction performance but also be used to analyze the changes in the brain network and the information flow relationship between nodes to deeply understand the epileptic seizure process. Compared with other epilepsy prediction methods based on brain networks, transfer entropy can not only reflect the connection pattern between EEG signals in different regions of the patient's brain network, but also is a model-free and non-linear directed connection metric. It has the ability to sensitively detect correlations of different orders and can calculate non-linear interactions. These characteristics enable transfer entropy to more comprehensively reveal the relationship between signals. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is the flowchart of the implementation of the present invention;

[0026] Figure 2 is a comparison diagram of transfer entropy matrix values of segments in the pre-seizure and interictal periods of a certain patient;

[0027] Figure 3 is a schematic diagram of the differences in network properties in the pre-seizure and interictal periods of a certain patient. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0028] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the appended claims of this application.

[0029] As Figure 1 shown, a method for predicting epileptic seizures based on transfer entropy brain network analysis includes the following steps:

[0030] Step S1: Preprocessing and staging of data. Since the scalp EEG acquisition process is affected by external noise, artifacts, and power frequency interference, it is necessary to filter the original EEG to achieve noise reduction. The present invention uses an infinite impulse response filter for band-pass filtering of 0.5 - 60 Hz and notch filtering of 50 Hz. In addition, it is necessary to divide the original continuous EEG data into periods, such as pre-seizure and interictal data required for epilepsy prediction.

[0031] Step S2: Construction of the transfer entropy brain network. For the multi-channel EEG data in the dataset, the present invention proposes to use transfer entropy to describe the connection strength, information flow direction, and non-linear relationship between the channel signals of epilepsy patients. The present invention uses the HERMES toolbox in MATLAB to calculate the transfer entropy between the channel signals. When the calculated transfer entropy value is 0, it indicates that there is no causal relationship between these two channel signals. The causal connection relationship between the EEG channel signals is calculated using the above method flow to obtain a connection matrix to establish an epilepsy brain network. The above method can be calculated in the full frequency band or in different EEG frequency bands, and a transfer entropy brain network is established during the pre-ictal and inter-ictal periods of the patient.

[0032] Step S3: Determine the threshold to convert the transfer entropy connection matrix into a sparse adjacency matrix. To obtain the adjacency matrix of the brain transfer entropy matrix, the present invention sets a certain threshold for the transfer entropy connection matrix. If the element in the matrix is greater than the set threshold, it is considered that there is a connection relationship between the corresponding two channel signals. At this time, the weight of the edge between the nodes corresponding to these two channels is their transfer entropy value; if the element in the matrix is less than the set threshold, it is considered that there is no connection relationship, and the value of the edge weight is 0. After threshold processing, a sparse weighted directed network will be obtained. To simultaneously meet the two conditions that there are no isolated nodes in the brain network and it is more conducive to analysis to sparsify the brain network, the present invention determines the threshold based on the algebraic connectivity method of the graph.

[0033] Step S4: Combine graph theory for analysis and extract network features. Graph theory provides a quantitative analysis method for complex brain networks. These network characteristics may reflect potential pathological abnormalities. When graph theory analysis is applied to systems neuroscience, it can provide a richer understanding of brain function. The present invention uses six common network metrics to analyze the transfer entropy brain network of epilepsy patients at different times.

[0034] Step S5: Use a machine learning classifier to classify the network features to achieve epilepsy prediction. Specifically, based on the EEG data of the patient, the present invention divides it into 5-second sliding time windows and establishes a transfer entropy brain network within each time window. Then, the six network features mentioned in step 4 are extracted to form a feature vector for each time window. For each patient, among all the pre-ictal and inter-ictal data, the feature vectors of all time windows are extracted to form a feature dataset, which is divided into a training set and a test set. We choose a support vector machine as the classifier and use the training set to train the classifier model. Subsequently, we input the test set into the trained classifier model to obtain the classification result. To evaluate the effectiveness of the method of the present invention, we use five-fold cross-validation to train and test the support vector machine classifier.

[0035] Example 1:

[0036] Step S1: Preprocessing and segmentation of data. In this embodiment, the CHB-MIT epilepsy EEG dataset is used for testing. Since scalp EEG acquisition is affected by external noise and artifacts, an infinite impulse response filter is used for a 0.5 - 60 Hz band-pass filter to remove electrooculogram artifacts and out-of-band noise, and notch filtering is implemented under 50 Hz power frequency interference. Since the fundamental goal of realizing epilepsy prediction is to achieve the classification between the pre-seizure period and the interictal period, it is necessary to segment the patient's data. In the present invention, the pre-seizure time of the patient is set, that is, the interval between the predicted epilepsy seizure and the actual epilepsy seizure is 10 to 30 minutes, and a 5-minute time period is intercepted before the selected interval time. This time period is the epilepsy prediction period, and features are extracted during this period and the prediction performance is evaluated based on the results during this period. For each patient, we use all the pre-seizure data segments selected by him / her, and intercept the interictal data according to the ratio of pre-seizure to interictal of 1:1 as the patient's EEG dataset.

[0037] Step S2: Constructing the brain network of epilepsy patients at different times based on transfer entropy. For the multi-channel EEG data in the dataset, the present invention proposes to use transfer entropy to describe the connection strength, information flow direction, and non-linear relationship between the channel signals of epilepsy patients. The calculation method of transfer entropy is as follows:

[0038] Schreiber proposed that if two time series x(t) and y(t) can be approximated by a Markov process, then a causal relationship metric can be used to calculate the deviation from the following Markov condition:

[0039]

[0040] where and are the m-th and n-th order memories of the Markov processes in the time series x(t) and y(t) respectively. The right side of the above formula is the probability of its value calculated by considering the first N steps of the history of y(t), while the left side is the estimation of this probability when considering the history of x(t) and y(t).

[0041] When the transition probability of y (i.e., the dynamics) is independent of the past of x, that is, when there is no causal relationship between x and y, the above equation is fully satisfied. However, to calculate the causal relationship between x and y, Schreiber uses the Kullback-Leibler divergence between two probability distributions to define the transfer entropy from x to y. Based on the above definition, we can calculate the transfer entropy of the time series x t to y t by the following formula:

[0042]

[0043] where \(t\) is the time index of the discrete values in the sequence, \(u\) represents the prediction time, and \(\tau\) is a discrete value time interval. and are the \(d\) y and \(d\) x dimensional delay embedding vectors of \(x(t)\) and \(y(t)\) respectively, details are as follows:

[0044]

[0045]

[0046] where \(d\) and \(\tau\) represent the embedding dimension and the delay time respectively.

[0047] The above is the calculation method and related formulas of transfer entropy. The present invention uses the HERMES toolbox in MATLAB to calculate the transfer entropy between channel signals. When the calculated transfer entropy value is 0, it indicates that there is no causal relationship between these two channel signals. Using the above method flow to calculate the causal connection relationship between EEG channel signals, a connection matrix is obtained to establish an epilepsy brain network. The above method can be calculated in the full frequency band or in different EEG frequency bands. In this embodiment, the experiment is mainly carried out in the full frequency band. The transfer entropy brain network is calculated in the pre-ictal and inter-ictal time periods of patient 1, and the results are shown in Figure 2 . From Figure 2 it can be seen that there are relatively significant differences in the transfer entropy brain network matrices between the pre-ictal and inter-ictal periods of this patient.

[0048] Step S3 determines a threshold to convert the transfer entropy connection matrix into a sparse adjacency matrix. In order to obtain the adjacency matrix of the brain's causal connection, the present invention sets a certain threshold for the transfer entropy connection matrix. If the element in the matrix is greater than the set threshold, it is considered that there is a connection relationship between the corresponding two channel signals. At this time, the weight of the edge between the nodes corresponding to these two channels is their transfer entropy value; if the element in the matrix is less than the set threshold, it is considered that there is no connection relationship, and the value of the edge weight is 0. After threshold processing, a weighted directed network will be obtained. In order to simultaneously meet the two conditions that there are no isolated nodes in the brain network and the brain network is sparser and more conducive to analysis, the present invention determines the threshold based on the algebraic connectivity method of the graph. There is research showing that when and only when there is a path between any node pairs in the graph, that is, the graph is connected, the algebraic connectivity of the graph is a positive number. The algebraic connectivity value of the graph is the second smallest eigenvalue of the Laplacian matrix of the graph, and the Laplacian matrix \(L\) of the graph is defined as the difference between the weighted degree matrix and the adjacency matrix of the graph:

[0049] \(L = D - W\)

[0050] Where D is a diagonal matrix, which means the weighted degree matrix of the graph. The elements on its main diagonal are the weighted degrees of each node, and the elements in other positions are all 0, which is expressed as follows:

[0051]

[0052] For a directed graph, the weighted degree of node i is the sum of the weights of all outgoing edges related to this node, that is, the sum of the elements in the i-th row of the adjacency matrix W.

[0053] In order to determine a specific threshold for each patient, the present invention sets the initial threshold to 0 and gradually increases the threshold in steps of 0.01 until a threshold is found that can just make the graph connected, that is, the algebraic connectivity of the graph is just a positive number at this time. This threshold is the threshold determined for the patient. This threshold calculation process is carried out during the interictal period of each patient, and the threshold calculated from the interictal period is used as the patient's threshold.

[0054] Step S4 is analyzed in combination with graph theory to extract network features. Graph theory provides a quantitative analysis method for complex brain networks. These network characteristics may reflect potential pathological abnormalities. When graph theory analysis is applied to systems neuroscience, it can provide a richer understanding of brain function. Commonly used network parameters can be roughly divided into local parameters (such as node degree, clustering coefficient, local efficiency, etc.) and global parameters (such as network density, characteristic path length, global efficiency, etc.). The present invention uses these network characteristics for analysis. In this embodiment, the differences in the above six characteristics of a certain patient during the pre-ictal period and the inter-ictal period are analyzed, and the results are as Figure 3 shown. From Figure 3 it can be seen that there are differences to varying degrees among the six graph theory characteristics of the patient's brain network during the pre-ictal period and the inter-ictal period, and the differences in the two parameters of network density and degree are relatively significant.

[0055] Step S5 uses a machine learning classifier to classify network features to achieve epilepsy prediction. Since the conditions of each patient are different, the start time and degree of abnormality of the corresponding EEG signals are also different. The solution of the present invention is implemented for specific patients, that is, a patient-specific method. Specifically, based on the EEG data of the patient, the present invention divides it into 5-second sliding time windows, and a transfer entropy brain network is established within each time window. Then, the six network features mentioned in step 4 are extracted to form a feature vector for each time window. For each patient, among all the pre-ictal and inter-ictal data, the feature vectors of all time windows are extracted to form a feature data set, which is divided into a training set and a test set. We select a support vector machine as the classifier and use the training set to train the classifier model. Subsequently, we input the test set into the trained classifier model to obtain the classification result. In order to evaluate the effectiveness of the method of the present invention, we use five-fold cross-validation to train and test the support vector machine classifier.

[0056] Further, the evaluation index for the prediction result is the accuracy rate, and the calculation formula is as follows:

[0057]

[0058] Where TP is the pre-attack period correctly classified, TN is the inter-attack period correctly classified. FP is the inter-attack period misclassified as the pre-attack period, and FN is the pre-attack period misclassified as the inter-attack period.

[0059] Patient number Prediction time (min) Accuracy rate 1 30 99.58% 2 30 99.17% 3 30 95.83% 4 30 85.67% 5 10 93.81% 6 30 99.67% 7 30 86.25% 8 30 92.36% 9 30 79.44% 10 30 87.50% 11 30 93.89% 12 30 94.72% 13 10 99.44% 14 30 98.06% 15 30 98.89% Average 27.3 93.62%

[0060] The above table shows the prediction time and prediction performance of the method of the present invention for the patients used in this embodiment.

Claims

1. A method for predicting epileptic seizures based on transfer entropy brain network analysis, characterized in that It includes the following steps: Step S1: Preprocessing and segmentation of data; denoising the original EEG by filtering; Band-pass filtering from 0.5 - 60 Hz and notch filtering at 50 Hz were performed using an infinite impulse response filter; Step S2: Construction of the transfer entropy brain network; for multi-channel EEG data in the dataset, transfer entropy was used to describe the connection strength, information flow direction, and non-linear relationship between the channel signals of epileptic patients; the transfer entropy between channel signals was calculated using the HERMES toolbox in MATLAB; the causal connection relationship between EEG channel signals was calculated to obtain a connection matrix to establish an epileptic brain network; The calculation method of transfer entropy is as follows: If two time series x(t) and y(t) are approximated by a Markov process, then a causal relationship metric is used to calculate the deviation from the following Markov condition: where and are the m-th and n-th order memories of the Markov processes in the time series x(t) and y(t), respectively; the right side of the above equation is the probability of its value calculated under the history of the first N steps of the given y(t), while the left side is to estimate this probability when considering the histories of x(t) and y(t); When the transition probability of y is independent of the past of x, i.e., when there is no causal relationship between x and y, the above equation is fully satisfied; the time series x is calculated by the following formula t from x t to y The transfer entropy of where t is the time index of the discrete values in the sequence, u represents the prediction time, and is a discrete value time interval; and are the d y and d x dimensional delay embedding vectors of x(t) and y(t), respectively where d and τ represent the embedding dimension and delay time respectively; Step S3: Determine the threshold to convert the transfer entropy connection matrix into a sparse adjacency matrix; To obtain the adjacency matrix of the brain transfer entropy matrix, a certain threshold was set for the transfer entropy connection matrix; if the element in the matrix is greater than the set threshold, it is considered that there is a connection relationship between the corresponding two channel signals, and at this time, the weight of the edge between the nodes corresponding to these two channels is their transfer entropy value; if the element in the matrix is less than the set threshold, it is considered that there is no connection relationship, and the value of the edge weight is 0; after threshold processing, a sparse weighted directed network will be obtained; Step S4: Combine graph theory for analysis and extract network features; Step S5: Use a machine learning classifier to classify the network features to achieve epilepsy prediction; the EEG data of the patient was divided into 5-second sliding time windows, and a transfer entropy brain network was established within each time window; the network features in Step S4 were extracted to form a feature vector for each time window; in all pre-ictal and inter-ictal data of each patient, the feature vectors of all time windows were formed into a feature dataset, and the feature dataset was divided into a training set and a test set; a support vector machine was selected as the classifier, and the training set was used to train the classifier model; the test set was input into the trained classifier model to obtain the classification result; Five-fold cross-validation was used to train and test the support vector machine classifier.

2. The epilepsy seizure prediction method based on transfer entropy brain network analysis according to claim 1, wherein For the preprocessing and segmentation of the data in the above Step S1, the CHB-MIT epileptic EEG dataset was used for testing. A band-pass filter from 0.5 - 60 Hz was used with an infinite impulse response filter to filter out electrooculogram artifacts and out-of-band noise, and notch filtering was implemented under 50 Hz power frequency interference; Segment the patient's data, set the pre-ictal time of the patient, that is, the interval between the predicted seizure and the actual seizure is 10 to 30 minutes, and intercept a 5-minute time period before the selected interval. This time period is the epilepsy prediction period. Extract features under this epilepsy prediction period and evaluate the prediction performance with the results under this time period; for each patient, use all the selected pre-ictal data segments and intercept the inter-ictal data according to the ratio of pre-ictal to inter-ictal of 1:1 as the patient's EEG dataset.

3. The epilepsy seizure prediction method based on transfer entropy brain network analysis according to claim 2, wherein The above step S3 determines the threshold to convert the transfer entropy connection matrix into a sparse adjacency matrix; in order to obtain the adjacency matrix of the brain's effective connectivity, set a threshold for the transfer entropy connection matrix; if the element in the matrix is greater than the set threshold, it is considered that there is a connection relationship between the corresponding two-channel signals. At this time, the weight of the edge between the nodes corresponding to these two channels is their transfer entropy value; if the element in the matrix is less than the set threshold, it is considered that there is no connection relationship, and the value of the edge weight is 0. After threshold processing, a weighted directed network will be obtained; Determine a specific threshold for each patient, set the initial threshold to 0, and gradually increase the threshold in steps of 0.01 until a threshold is found that can just make the graph connected, that is, the algebraic connectivity of the graph is just a positive number at this time. This threshold is the threshold determined for the patient. This threshold calculation process is carried out during the inter-ictal period of each patient, and the threshold calculated from the inter-ictal period is used as the patient's threshold.

4. The epilepsy seizure prediction method based on transfer entropy brain network analysis according to claim 3, wherein The above step S4 combines graph theory for analysis and extracts network features; the network features include the node degree, clustering coefficient, local efficiency of local parameters, and network density, characteristic path length, global efficiency of global parameters.

5. The epilepsy seizure prediction method based on transfer entropy brain network analysis according to claim 4, wherein The above step S5 uses a machine learning classifier to classify the network features to achieve epilepsy prediction; The index for evaluating the prediction result is the accuracy rate, and the calculation formula is as follows: Where TP is the pre-ictal period correctly classified; TN is the inter-ictal period correctly classified; FP is the inter-ictal period misclassified as the pre-ictal period, and FN is the pre-ictal period misclassified as the inter-ictal period.