An epilepsy prediction system and method based on high-order feature weighted deep forest
By using the advanced feature-weighted deep forest method in epilepsy prediction, the entropy characteristics of EEG signals are extracted and weighted, and the shortcomings of feature extraction and comprehensive analysis in the prior art are solved, and the accuracy and robustness of epilepsy prediction are achieved.
Patent Information
- Application Number
- CN202411071320.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-08-06
AI Technical Summary
When processing complex EEG signals, it is difficult for the prior art to extract effective features and conduct comprehensive analysis, resulting in insufficient accuracy of epilepsy prediction.
A method based on high-order feature weighted deep forest is adopted, and an entropy feature extraction and weighting process is used to construct a high-order feature matrix, and epilepsy prediction is performed using a deep forest model.
It improves the accuracy and robustness of epilepsy prediction, and can effectively predict whether epilepsy will occur in a short period of time, which has high application value.
Smart Images

Figure CN118948216B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of epilepsy risk prediction, and specifically relates to an epilepsy prediction method and system based on high-order feature weighted deep forest. Background Art
[0002] In recent years, with the rapid development of medical technology and computer science, epilepsy prediction technology has attracted more and more attention. Epilepsy is a common neurological disease characterized by recurrent seizures caused by abnormal brain discharges. Although the causes of epilepsy are complex and diverse, effective prediction of epileptic seizures can significantly improve the quality of life of patients and reduce the harm caused by seizures. At present, research on epilepsy prediction mainly focuses on the analysis of electroencephalogram (EEG) signals, because EEG signals can directly reflect the electrical activity of the brain and often show abnormal changes before an epileptic seizure.
[0003] Traditional epilepsy prediction methods are mostly based on single feature extraction and simple classification algorithms. These methods often have poor effects when processing complex EEG signals and are difficult to meet the needs of practical applications. Therefore, how to extract effective features from complex EEG signals and combine multiple features for comprehensive analysis to improve the accuracy of epilepsy prediction, and use advanced machine learning algorithms for intelligent epilepsy prediction, has become a hot topic and difficulty in current research. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of the present invention is to provide an epilepsy prediction method based on high-order feature weighted deep forest to solve the technical problem of epileptic seizure detection and identification based on EEG signals.
[0005] In the first aspect, the present invention proposes an epilepsy prediction system based on a high-order feature weighted deep forest, the epilepsy prediction system includes an EEG signal acquisition module, a signal preprocessing model, an entropy feature extraction module and an epilepsy prediction module; the EEG signal acquisition module is used to collect the EEG signals of the subject and obtain the EEG signals of the subject in different time periods; the signal preprocessing module is used to preprocess the EEG signals of the subject; the entropy feature extraction module performs entropy feature extraction on the EEG signals output by the signal preprocessing module to obtain an initial feature matrix; the initial feature matrix is subjected to secondary entropy feature extraction, the initial feature matrix is weighted by the extracted secondary entropy features, a high-order feature matrix is obtained, and the feature samples of the subject are obtained according to the high-order feature matrix. The epilepsy prediction module is used to receive the feature samples of the subject and predict the probability of epilepsy in the subject.
[0006] In a second aspect, the present invention proposes an epilepsy prediction method based on a high-order feature weighted deep forest, the epilepsy prediction method comprising the following steps:
[0007] Step 1: Obtain the epilepsy patient dataset and construct an initial matrix based on the channels and sampling points of the dataset.
[0008] Step 2: Extract multiple entropy features from the initial matrix to construct an initial feature matrix; extract secondary entropy features from the initial feature matrix, use the extracted secondary entropy features as weights to weight the initial feature matrix, and obtain a high-order feature matrix. Reorganize the high-order feature matrix to obtain feature samples.
[0009] Step 3: Use the high-order feature weighted deep forest model as the epilepsy prediction model, and use the weighted entropy feature as the input of the deep forest model.
[0010] Step 4: Use the feature samples obtained in step 2 to train the epilepsy prediction model.
[0011] Step 5: Use the trained deep forest model to predict the subjects and obtain the prediction results.
[0012] Preferably, in the step 2, the number of entropy features extracted is 3 to 5.
[0013] Preferably, in step 2, the types of entropy features extracted are: sample entropy, approximate entropy, fuzzy entropy and permutation entropy.
[0014] Preferably, in step 2, the process of obtaining feature samples by secondary entropy feature extraction is as follows:
[0015] The sampling points in each channel of the initial matrix are divided into multiple windows using the sliding window method, and the entropy features of each window are extracted to obtain the initial feature matrix. The entropy features extracted from each window in the initial feature matrix are transposed, and the secondary entropy features are extracted from the entropy features in all channels corresponding to each window, and the extracted secondary entropy features are weighted to the initial feature matrix to obtain a high-order feature matrix; the entropy features in each window of the high-order feature matrix are transposed to obtain a reorganized feature matrix; the reorganized feature matrix is labeled and transposed with seizure = 1 and no seizure = 0, and finally a labeled feature matrix is obtained, with all channels corresponding to each window as a feature sample.
[0016] Preferably, in step three, two types of random forests are used in each cascade layer, and the strategies for splitting features of tree nodes of the two random forests are: (a) rounding the logarithm of the total number of features; and (b) rounding the square root of the total number of features.
[0017] Preferably, the number of the two types of random forests in the cascade layer is two.
[0018] Preferably, in step three, the deep forest model uses the C4.5 algorithm as the decision tree in the random forest.
[0019] Preferably, in step 4, out-of-bag samples are used to estimate generalization accuracy during training. The generated final decision tree is pruned.
[0020] In a third aspect, the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the memory stores the computer program; and the processor executes the aforementioned epilepsy prediction method based on high-order feature weighted deep forest.
[0021] In a fourth aspect, the present invention provides a readable storage medium storing a computer program; when the computer program is executed by a processor, it is used to implement the aforementioned epilepsy prediction method based on high-order feature weighted deep forest.
[0022] The present invention has the following beneficial effects:
[0023] 1. The present invention extracts multiple groups of entropy features from EEG signals, performs secondary extraction on the extracted entropy features, normalizes them, and uses them as weights to weight and improve the original feature matrix, thereby improving the extraction of data features in the data and making the final prediction result more accurate.
[0024] 2. The epilepsy prediction method based on high-order feature weighted deep forest of the present invention can effectively improve the accuracy of epilepsy warning. In most cases, it can accurately predict whether epilepsy will occur in a short period of time. The model has strong robustness and has high application value in the field of epilepsy prediction and warning. At the same time, the present invention adopts a "white box" recognition method, and its internal structure is easy to interpret and has high transparency. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flow chart of the present invention.
[0026] Figure 2 This is a high-order feature weighted deep forest model diagram of the present invention.
[0027] Figure 3 This is a line graph of the four indicators predicted by the present invention for different patient samples.
[0028] Figure 4 Line graphs of the four indicators predicted by RF for different patient samples.
[0029] Figure 5 Line graph of four indicators predicted by SVM for different patient samples.
[0030] Figure 6Line chart of four indicators predicted by KNN for different patient samples.
[0031] Figure 7 Line graph showing the accuracy of different models in predicting different patient samples.
[0032] Figure 8 It is a bar chart comparing the average accuracy of different types of input data of the present invention.
[0033] Fig. 9 It is a line comparison chart of the average accuracy using the entropy features before and after weighting as input.
[0034] Fig.10 Column diagram of the confusion matrix of the present invention. DETAILED DESCRIPTION
[0035] The present invention will be further described below in conjunction with the accompanying drawings.
[0036] like Figure 1 As shown, an epilepsy prediction method and system based on high-order feature weighted deep forest includes the following steps:
[0037] Step 1: EEG signal preprocessing
[0038] The American Epilepsy Society Seizure Prediction Challenge dataset (AES SPC), jointly developed by the University of Pennsylvania and the Mayo Clinic, was used. The dataset includes data from one hour before and five minutes during a seizure. This pre-seizure time range ensures that seizures can be predicted in advance and that there is enough warning to use fast-acting drugs. The dataset was divided into a training set and a test set. The training data was organized into ten-minute EEG segments, labeled as "pre-seizure" pre-seizure data segments or "inter-seizure" seizure non-data segments. The dataset contains 15 channels, 3,000,000 continuous sampling points, and an initial matrix of 15×3,000,000 is constructed. The sliding window method was used to divide the 3,000,000 continuous sampling points into 1,000 windows, each containing 3,000 continuous sampling points. The sampling frequency of the intracranial EEG signal was 5,000 Hz, and a bandpass filter with a bandwidth of 0.3 to 45.0 Hz was used for preprocessing.
[0039] Step 2: Feature extraction and weighting of entropy features:
[0040] The sampling points of each window in each channel of the initial matrix are respectively used as the time series X to extract the entropy features, and the extracted entropy features are weighted.
[0041] 2-1. Feature extraction sample entropy (SampEn)
[0042] Sample entropy is more stable in calculation, reducing the influence of sequence length on the entropy value, so it has better unbiasedness. And it is applicable to data with a relatively small sample size after being truncated by a sliding window because it can reduce the offset. Additionally, it has strong anti-interference ability against noise and performs well in noisy data, providing a basis for comparing the results of filtered data with the original data. The method for extracting sample entropy is as follows:
[0043] (1) Reconstruct the m-dimensional vector Y(i) from the time series X, where x(i) is the original signal; i = 1, 2,..., N - m + 1; N is the length of the time series; m is the sample dimension.
[0044] (2) Take the maximum Euclidean distance between Y(i) and Y(j) as the maximum component contribution distance d[Y(i), Y(j)]; where i ≠ j, and the expression for the maximum component contribution distance d[Y(i), Y(j)] is:
[0045] d [ Y ( i ) , Y ( j ) ] = max {| y ( i+k )− y ( j+k )|}
[0046] where k = 0, 1,..., m - 1.
[0047] (3) Obtain the approximate ratio at the i-th sampling point :
[0048] B i m (r)= 1 N-m num{d[Y(i),Y(j)] <r}
[0049] where r is the threshold, r > 0; num{d[Y(i),Y(j)] <r} is the number of d[Y(i), Y(j)] < r.
[0050] (4) For all approximate ratios Find the average to get the approximate ratio :
[0051]
[0052] (5) Add 1 to the dimension m and repeat the above process to obtain the approximate ratio .
[0053] (6) Obtain the sample entropy SampEn(m,r) as:
[0054]
[0055] A window of 0.6 s and a step size of 0.6 s (no overlapping sliding) were used to obtain the sample entropy features of the EEG signal.
[0056] 2-2. Feature Extraction Approximate Entropy (ApEn)
[0057] The calculation process of approximate entropy is relatively simple, which can reduce the computational complexity and code running time. It is very sensitive to changes in timing signals and can capture subtle dynamic changes. However, it has a certain dependence on the initial parameters. Although this is a disadvantage, in some specific applications, by properly adjusting the parameters, the detection ability of specific patterns can be improved. The approximate entropy extraction method is as follows:
[0058] (1) Reconstruct the time series X into an m-dimensional vector Y(i), ; Where x(i) is the original signal; i=1,2,...,N-m+1; N is the length of the time series; m is the sample dimension.
[0059] (2) The maximum Euclidean distance between Y(i) and Y(j) is taken as the maximum component contribution distance d[Y(i),Y(j)]; where i ≠ j, the expression of the maximum component contribution distance d[Y(i),Y(j)] is:
[0060] d [ Y ( i ) , Y ( j ) ] = max {| y ( i+k )− y ( j+k )|}
[0061] Where k=0,1,...,m-1.
[0062] (3) Get the approximate ratio of the i-th sampling point :
[0063] B i m (r)= 1 N−m+1 num{d[Y(i),Y(j)] ≤ r}
[0064] Where r is the threshold, r>0; num{d[Y(i),Y(j)] ≤ r} is the number of d[Y(i),Y(j)]≤r.
[0065] (4) For all approximate proportions After performing logarithmic operations, average the data to obtain the approximate ratio. :
[0066]
[0067] (5) Add 1 to the dimension m and repeat the above process to obtain the approximate ratio .
[0068] (6) Obtain the approximate entropy ApEn(m,r) as:
[0069]
[0070] A window of 0.6 s and a step size of 0.6 s (no overlapping sliding) were used to extract the approximate entropy features of the EEG signal.
[0071] 2-3. Feature Extraction Fuzzy Entropy (FuzzyEn)
[0072] Fuzzy entropy is more stable and reliable when processing high-noise data and is insensitive to data length and noise. It has strong robustness and can more keenly capture subtle changes and complexities in time series. The fuzzy entropy extraction method is as follows:
[0073] (1) Reorganize a time series X of length N into phase space to obtain a time series Y. Y ( i )={[ x(i),x(i+1),...,x(i+m−1)]− x 0 ( i )} ; Where x(i) is the original signal; x0(i) is the mean of m original signals; i=1,2,...,N-m+1; N is the length of the time series; m is the sample dimension.
[0074] (2) The maximum Euclidean distance between Y(i) and Y(j) is taken as the maximum component contribution distance d[Y(i),Y(j)]; where i ≠ j, the expression of the maximum component contribution distance d[Y(i),Y(j)] is:
[0075] d [ Y ( i ) , Y ( j ) ] = max {| y ( i+k )− y ( j+k )|}
[0076] Where k=0,1,...,m-1.
[0077] (3) Introduce fuzzy membership function and use fuzzy function to calculate the similarity between time series :
[0078]
[0079] (4) Obtaining similarity The average :
[0080]
[0081] (5) Obtain the fuzzy entropy FuzzyEn(m,r) of the time series as:
[0082]
[0083] A window of 0.6s and a step size of 0.6s (no overlapping sliding) were used to extract the fuzzy entropy features of the EEG signal, and the concept of fuzzy membership function was also introduced.
[0084] 2-4. Feature Extraction Permutation Entropy (PermEn)
[0085] The calculation process of permutation entropy is very fast and suitable for feature extraction of large-scale data sets. It does not require parameter setting, avoiding the bias introduced by parameter selection. In addition, it can well identify complex patterns and sequence relationships in time series, and has good adaptability to various types of time series. The permutation entropy extraction method is as follows:
[0086] (1) Reconstruct the phase space of a time series X of length N, and obtain the matrix Y as follows:
[0087]
[0088] Where m is the sample dimension; t is the delay time; K is the number of reconstructed components, K=N-(m-1)t; j=1,2,...,K.
[0089] Each row in the matrix Y is a reconstruction component.
[0090] (2) Rearrange each reconstructed component in ascending order to obtain the column index of each element position in the vector to form a set of symbol sequences ;in, .
[0091] (3) Obtain the number of times each symbol sequence appears divided by the total number of times m! different symbol sequences appear as the probability P of the symbol sequence appearing. j = .
[0092] (4) The expression of the permutation entropy of the time series X is:
[0093]
[0094] (5) The maximum value of permutation entropy is ln(m!). Perform normalization processing to obtain the normalized permutation entropy value :
[0095]
[0096] A window of 0.6 s and a step size of 0.6 s (no overlapping sliding) were used to extract the permutation entropy features of the EEG signals.
[0097] 2-5. Extract high-order features and weight the original feature matrix
[0098] By extracting entropy features, each window has four types of entropy features. According to the entropy features extracted from 15 channels and 1000 windows, a 15×4000 initial feature matrix Z is constructed. For each column of the initial feature matrix Z bAfter transposition, secondary entropy features are extracted to obtain the high-order entropy feature weights S of the initial feature matrix multi-channel a , use the high-order entropy feature weights to complete the weighting of the initial feature matrix and obtain the high-order feature matrix :
[0099]
[0100] in, and are the elements in the ath row and bth column in the high-order feature matrix and the initial feature matrix respectively.
[0101] The four types of entropy features in each window of the 15×4000 high-order feature matrix are used as a column to compare the high-order feature matrix The reorganization is performed to obtain a 60×1000 reorganized feature matrix. The reorganized feature matrix is labeled with attack=1 and no attack=0, and then the matrix is transposed. Finally, a 1000×60 labeled feature matrix is obtained, which includes 1000 feature samples.
[0102] Step 3: Build an epilepsy prediction model
[0103] The high-order feature weighted deep forest model is used as the epilepsy prediction model. The deep forest is different from the general random forest, but is an extension of the random forest. The random forest is based on the decision tree and uses the idea of ensemble learning to classify data. The deep forest model is an improved method that uses a cascade structure and combines the characteristics of neural networks to further improve the classification and recognition ability of the random forest. The cascade layer can automatically adjust the optimal number of classification layers. The deep forest automatically optimizes the structure of the deep forest by comparing the classification performance of adjacent layers.
[0104] like Figure 2 As shown in the figure, two types of random forests are used in each cascade layer of the deep forest model, and the number of each type of random forest is two. The strategies for splitting features of tree nodes of the two random forests are: (a) rounding the logarithm of the total number of features; (b) rounding the square root of the total number of features. The deep forest model uses the C4.5 algorithm as the decision tree in the random forest, and the weighted entropy features are used as the original data input into the deep forest model; the output vector of the current cascade layer is used as the enhanced feature, and each cascade layer outputs eight enhanced features; the enhanced features are combined with the original data to form a new data feature as the input of the next layer, and the output vector of each cascade layer is the classification probability vector of each class. The classification probability vector is statistically calculated by the output of each decision tree. The number of layers of the deep forest model is determined by evaluating whether the adjacent layers can improve the performance of the classification model.
[0105] Step 4: Training epilepsy prediction model
[0106] The deep forest model was trained using the feature samples obtained in step 3. The parameters of the multi-feature deep forest model included the number of decision trees, the minimum number of samples for splitting in a node, and the accuracy range of the cascade layer growth. The number of decision trees in each random forest was set to 100, the maximum depth of decision tree growth was set to 14, and the minimum number of samples for splitting in a node was set to 5. During the training process, out-of-bag samples were used to estimate the generalization accuracy. In order to solve the problem of data imbalance, the class weight parameters were balanced in scikit-learn, and finally a separate experiment was conducted for each subject. The final decision tree generated was pruned to reduce the size of the tree structure and alleviate overfitting.
[0107] Step 5: Epilepsy prediction
[0108] The subject's EEG signal is collected and preprocessed, and then the subject's feature sample is obtained through step 2, and the feature sample is input into the trained epilepsy prediction model to predict the probability of epilepsy attack of the subject. The epilepsy prediction result can be used to study the mechanism of epilepsy.
[0109] Step 6: Evaluate the model
[0110] The accuracy (acc), precision (pre), recall (rec), F1 score (F1) and confusion matrix (Conf) were used to evaluate the epilepsy recognition results of the model.
[0111] The expression of epilepsy recognition accuracy is:
[0112]
[0113] Among them, TP is the number of segments correctly detected as epileptic seizures; FP is the number of non-seizure segments incorrectly detected as epileptic seizures, FN is the number of seizure segments incorrectly detected as non-seizures; TN is the number of non-seizure segments correctly detected as non-seizures.
[0114] The expression of epilepsy recognition accuracy is:
[0115]
[0116] The expression of epilepsy recognition recall is:
[0117]
[0118] The expression of the F1 score for epilepsy recognition is:
[0119]
[0120] Definition rules of confusion matrix (Conf):
[0121] Conf Real attack Really no outbreak Predicting Onset TP FN Predicted no attack FP TN
[0122] The data was analyzed using a deep forest to obtain epilepsy prediction classification evaluation indicators under different experimental parameters and different conditions. The present invention designed three experiments to evaluate the accuracy and robustness of the high-order feature weighted deep forest epilepsy prediction model. The first experiment mainly studies the relationship between single and multi-feature recognition methods and recognition accuracy. The second experiment studies the changes in the accuracy of the model in epilepsy prediction classification and several other model evaluation indicators before and after feature extraction. The third experiment studies the changes in model recognition accuracy after secondary feature weighting and without weighting. The classification indicators of the present invention and traditional classifiers including support vector machine (SVM classifier), K nearest neighbor method (KNN) and random forest method (RF) were compared. For the SVM classifier, a linear kernel function was used, and the penalty coefficient was set to 0.8; for the KNN classifier, the K coefficient was set to 5. In RF, the number of decision trees was set to 100, and the ID3 algorithm was used for training. The test results are as follows: Figures 3 to 6 shown.
[0123] from Figure 3 It can be seen that the average accuracy, average precision, average recall and F1 score of the present invention are 99.500%, 99.578%, 99.368% and 99.473% respectively; Figure 4 It can be seen that the average accuracy, average precision, average recall and F1 score of RF are 98.700%, 98.854%, 98.667% and 98.760% respectively; Figure 5 It can be seen that the average accuracy, average precision, average recall and F1 score of SVM are 98.900%, 98.593%, 99.204% and 98.898% respectively; Figure 6 It can be seen that the average accuracy, average precision, average recall and F1 score of KNN are 98.800%, 98.648%, 99.031% and 98.839% respectively.
[0124] Since it is rather complicated to describe four features at the same time, the following evaluation of model performance is mainly described using the most critical accuracy. Figure 7 As shown, the average accuracy of different subjects under the present invention and the three models of RF, SVM and KNN is shown. The average recognition accuracy of the present invention is 0.8% higher than that of RF, 0.6% higher than that of SVM, and 0.7% higher than that of KNN; the other three indicators are higher than those of the other three models. In addition, for the 15th patient sample, the accuracy of the present invention reached the highest 99.975%.
[0125] like Figure 8As shown in the figure, the reliability and effectiveness of the present invention are also evaluated by inputting different types of data (original data, single feature and multi-feature fusion). The results show that the average accuracy of a single feature is 90.983%. Although it is much lower than the average recognition accuracy after feature fusion, its average recognition rate is still higher than other classifiers compared under the same circumstances.
[0126] The present invention also experiments on the original data to determine the effectiveness of the extracted features. Since the original data has not been processed in any way, the features in it are accompanied by many noise signals, which may cause a more serious dimensionality disaster. Considering the balance between computer computing resources and recognition accuracy, the number of decision trees for each RF is set to 40. Since the experiment of the original data occupies a lot of computer computing resources, this embodiment only experiments on 15 subjects such as s1-s15. The experimental results are shown in Figure 2. Figure 8 As shown, the average accuracy is 69.771%.
[0127] In summary, this paper compares the accuracy of different types of data (original data, single feature, and multi-feature fusion) input into the deep forest. Figure 8 It can be seen that the average accuracy of single feature classification without feature fusion processing is 90.983%, the average accuracy of multi-feature fusion classification is 99.500%, and the average accuracy of original data is 69.771%. The results show that the classification accuracy is the lowest when the original features are used as input, followed by single features, and the highest accuracy is the multi-feature fusion deep forest recognition classification. This shows that in the current case study, deep forests can process features more effectively than raw data.
[0128] like Fig. 9 As shown in the figure, this study also studied the changes in the recognition accuracy of the model after the secondary feature weighting and without weighting. The results show that the average classification accuracy after feature weighting is 99.500%, while the average classification accuracy of the model without weighting is 99.417%. It can be found that weighting can improve the accuracy of epilepsy classification, and it can be observed from the figure that the classification accuracy after weighting is higher than that of the model without weighting for almost every sample, which shows that the model has strong universality.
[0129] The confusion matrix of the present invention is presented to show that the model of the present invention has intuitive interpretability. Fig.10As shown in the figure, due to the large number of data sets used, only the segment classification effect of one of the samples is shown. It can be seen that in this sample, there are more segments with epilepsy prediction "will have a short-term seizure" and slightly fewer segments with "will not have a short-term seizure". There are 3 segments with incorrect prediction of "will have a short-term seizure" and 2 segments with incorrect prediction of "will not have a short-term seizure". The comprehensive prediction ability is relatively average and the effect is excellent. It can be seen that the robustness and generalizability of the model are very good.
[0130] It can be seen that the present invention is practiced and described through some examples. It is known to those skilled in the art that these embodiments and features can be appropriately changed or equivalently replaced without departing from the specified scope and spirit of the present invention. In addition, under the teachings of the present invention, these features and embodiments can be appropriately modified to adapt to specific circumstances and corresponding materials so that they do not depart from the scope and spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application belong to the scope protected by the present invention.
Claims
1. An epilepsy prediction system based on high-order feature weighted deep forest, characterized by: It includes EEG signal acquisition module, signal preprocessing model, entropy feature extraction module and epilepsy prediction module; The EEG signal acquisition module is used to collect the EEG signals of the subjects and obtain the EEG signals of the subjects in different time periods; the signal preprocessing module is used to preprocess the EEG signals of the subjects; the entropy feature extraction module is used to extract the entropy features of the EEG signals output by the signal preprocessing module, obtain the initial feature matrix, and perform secondary entropy feature extraction on the initial feature matrix, use the obtained secondary entropy features to weight the initial feature matrix, obtain the high-order feature matrix, and obtain the feature samples of the subjects according to the high-order feature matrix; the epilepsy prediction module is used to receive the feature samples of the subjects and predict the probability of epilepsy in the subjects; The process of obtaining feature samples by the entropy feature extraction module through secondary entropy feature extraction is as follows: The sliding window method is used to divide the sampling points in each channel of the initial matrix into multiple windows, and the entropy features of each window are extracted to obtain the initial feature matrix; the entropy features extracted from each window in the initial feature matrix are transposed, and the secondary entropy features of the entropy features in all channels corresponding to each window are extracted respectively, and the initial feature matrix is weighted by the extracted secondary entropy features to obtain a high-order feature matrix; all the entropy features in each window of the high-order feature matrix are reorganized into a column to obtain a reorganized feature matrix; the reorganized feature matrix is labeled with attack=1 and no attack=0 and transposed, and finally a labeled feature matrix is obtained, with all the channels corresponding to each window as a feature sample.
2. The epilepsy prediction system based on high-order feature weighted deep forest according to claim 1, characterized in that: The types of entropy features extracted by the entropy feature extraction module are: sample entropy, approximate entropy, fuzzy entropy and permutation entropy.
3. An epilepsy prediction method based on high-order feature weighted deep forest, characterized in that: The epilepsy prediction method comprises the following steps: Step 1: Obtain a dataset of epilepsy patients and construct an initial matrix based on the channels and sampling points of the dataset; Step 2: Extract multiple entropy features from the initial matrix to construct an initial feature matrix; extract secondary entropy features from the initial feature matrix, use the extracted secondary entropy features as weights to weight the initial feature matrix, and obtain a high-order feature matrix; reorganize the high-order feature matrix to obtain feature samples; the specific process of obtaining the high-order feature matrix is as follows: The sampling points in each channel of the initial matrix are divided into multiple windows using the sliding window method, and the entropy features of each window are extracted to obtain the initial feature matrix; the entropy features extracted from each window in the initial feature matrix are transposed, and the secondary entropy features of the entropy features in all channels corresponding to each window are extracted respectively, and the extracted secondary entropy features are normalized and used as weights to weight the initial feature matrix to obtain a high-order feature matrix; Step 3: construct an epilepsy prediction model, using the weighted entropy feature as the input of the epilepsy prediction model; Step 4: Use the feature samples obtained in step 2 to train an epilepsy prediction model; Step 5: Use the trained epilepsy prediction model to predict the subjects and obtain prediction results.
4. The epilepsy prediction method based on high-order feature weighted deep forest according to claim 3, characterized in that: In the step three, a high-order feature weighted deep forest model is used as an epilepsy prediction model.
5. The epilepsy prediction method based on high-order feature weighted deep forest according to claim 3, characterized in that: In the step 2, the number of entropy features extracted is 3 to 5.
6. The epilepsy prediction method based on high-order feature weighted deep forest according to claim 4, characterized in that: In the step three, two types of random forests are used in each cascade layer of the deep forest model, and the strategies for splitting features of tree nodes of the two random forests are: (a) rounding the logarithm of the total number of features; (b) rounding the square root of the total number of features; the number of the two types of random forests in each cascade layer is two; the deep forest model uses the C4.5 algorithm as the decision tree in the random forest.
7. The epilepsy prediction method based on high-order feature weighted deep forest according to claim 3, characterized in that: In the step 4, during the training process, out-of-bag samples are used to estimate the generalization accuracy; and the generated final decision tree is pruned.
8. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the memory stores the computer program; and the processor executes the epilepsy prediction method based on high-order feature weighted deep forest as described in claim 3.
9. A readable storage medium, characterized in that: A computer program is stored; when the computer program is executed by a processor, it is used to implement the epilepsy prediction method based on high-order feature weighted deep forest as described in claim 3.
Citation Information
Patent Citations
Wavelet packet characteristic and random forest based predication method for early stage of epilepsy
CN108962391A
Epileptic seizure signal detection method based on optimized multi-dimensional sample entropy
CN111870241A