Machine learning based epileptic brain wave feature recognition system

By extracting multiple features from long-term EEG data and constructing an EEG feature atlas with individual differences correction, machine learning is used to identify key features of epileptic seizures, solving the problem of insufficient accuracy in epileptic seizure prediction and achieving more efficient prediction and pre-intervention.

CN122245735APending Publication Date: 2026-06-19TIANJIN MEDICAL UNIVERSITY GENERAL HOSPITAL

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN MEDICAL UNIVERSITY GENERAL HOSPITAL
Filing Date
2026-05-21
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively identify key brainwave features that trigger epileptic seizures, resulting in insufficient accuracy in predicting seizures.

Method used

By extracting various features from long-term EEG data, including time domain, frequency domain, time-frequency domain, spatial features, and high-frequency oscillation features, an EEG feature map is constructed. Based on individual differences, a machine learning model is used to identify key features, quantify the prediction window period and the confidence of the prediction results, and reverse-engineer the final features that lead to epileptic seizures.

Benefits of technology

It improved the accuracy of epileptic seizure prediction, reduced the false alarm rate, and provided medical personnel with a basis for developing pre-intervention plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122245735A_ABST
    Figure CN122245735A_ABST
Patent Text Reader

Abstract

This invention relates to the field of epilepsy monitoring technology, and particularly to a machine learning-based epilepsy EEG feature recognition system, comprising: a preprocessing module configured to acquire and preprocess target long-term EEG data; an atlas construction module configured to extract multiple EEG features from the preprocessed long-term EEG data to construct an EEG feature atlas; a feature extraction module configured to correct the EEG feature atlas based on individual differences of the target patient and extract multiple key features from the corrected EEG atlas; and a feature recognition module configured to predict seizure probability using multiple key features, quantify the prediction window period and the confidence level of the prediction result; and to obtain the final features driving epileptic seizures based on the seizure probability, the prediction window period, and the confidence level of the prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of epilepsy monitoring technology, and in particular to a machine learning-based epilepsy EEG feature recognition system. Background Technology

[0002] Electroencephalogram (EEG) data plays a central role in the prediction, diagnosis, and treatment of epilepsy, and is irreplaceable in epilepsy diagnosis and treatment. During the interictal period (when epileptic patients are not experiencing a seizure), EEG data can often record characteristic abnormal discharges, such as spikes, sharp waves, and spike-and-wave complexes. This is the most direct and objective evidence for diagnosing epilepsy.

[0003] In the diagnosis and rehabilitation monitoring of epilepsy, long-term EEG data is usually analyzed to extract EEG characteristics and models are used to predict whether the patient will have an epileptic seizure in the future, so that medical personnel can intervene in a timely manner.

[0004] Therefore, effectively identifying the key EEG features that trigger epileptic seizures is a prerequisite for accurately predicting seizures. To this end, we propose an epileptic EEG feature identification system. Summary of the Invention

[0005] This invention extracts multiple brainwave features from long-term EEG data, corrects these features based on individual differences, and combines them with predicted seizure probability, predicted window period, and confidence level of the prediction results to screen key features and identify the final features that lead to epileptic seizures.

[0006] The technical solution proposed in this invention is: a machine learning-based epilepsy EEG feature recognition system, comprising: A preprocessing module, configured to acquire target long-range EEG data and perform preprocessing; The atlas construction module is configured to extract multiple brainwave features from preprocessed long-range EEG data and construct an EEG feature atlas. The feature extraction module is configured to correct the EEG feature map based on the individual differences of the target patient and extract multiple key features from the corrected EEG map. The feature recognition module is configured to predict the probability of seizures using multiple key features, quantify the prediction window period and the confidence level of the prediction results, and obtain the final features driving the epileptic seizures based on the seizure probability, the prediction window period and the confidence level of the prediction results.

[0007] Preferably, the step of extracting multiple brainwave features from the preprocessed long-range EEG data and constructing an EEG feature atlas includes: Acquiring preprocessed long-range EEG data ; Will The data is divided into multiple continuous time windows, and within each time window, the time domain features, frequency domain features, time-frequency domain features, spatial features, and high-frequency oscillation features of each channel are extracted. The obtained time-domain features, frequency-domain features, time-frequency domain features, spatial features, and high-frequency oscillation features are used to construct the high-dimensional feature vectors, i.e., feature maps, for the corresponding time windows.

[0008] Preferably, the will The data is divided into multiple continuous time windows. Within each time window, the time-domain features, frequency-domain features, time-frequency-domain features, spatial features, and high-frequency oscillation features of each channel are extracted, including: Extracting temporal features, including: For channels Extracting activity features ,in Indicates the channel within the time window No. The power of the EEG signal at each sampling point Indicates average power. Indicates the number of sampling points within the time window; Extracting migration rate Extraction complexity: ; Extracting frequency domain features includes: Fourier transform is performed on the data within each time window to convert the EEG signal from the time domain to the frequency domain; The entire frequency band of the EEG signal in the frequency domain is divided into multiple clinically standard rhythms, including: First clinical standard rhythm: Frequency band range is: ; Second clinical standard rhythm: Frequency band range is: ; Third clinical standard rhythm: Frequency band range is: ; Fourth clinical standard rhythm: frequency band range is: ; Calculate the absolute power of each clinical standard rhythm within the channel. and relative power ; in, Indicates the number of channels; Indicates channel Internal frequency is The power of the brainwave signal, Indicates the first The highest frequency of a clinical standard rhythm Indicates the first The lowest frequency of a clinically standard rhythm; Calculate spectral entropy ;in, ; Indicates channel The maximum frequency of the internal signal, Indicates channel The minimum frequency of the internal signal.

[0009] Extracting time-frequency features includes: Channels in each time window Wavelet transform was performed on the internal EEG signals to obtain the corresponding time-frequency features. ,in, Indicates the first Time window channel Brainwave signals within, Indicates frequency as The time is Moret wavelet; Time-frequency energy is ; Wavelet entropy calculated based on time-frequency energy : Calculate the frequency at a given time. Time-frequency energy distribution: ,in, Indicates a given time; Given time Wavelet entropy of time Extract spatial features, including: Calculate the phase lock value, which measures the stability of phase synchronization between signals from two brain regions at a specific frequency, including: Within each time window, the instantaneous phase of the EEG signal in each channel is extracted by wavelet transform; For channels and Phase lock value ;in, Indicates channel Internal frequency is The signal at time The instantaneous phase of time; Indicates the first The sampling time of each sampling point; Extracting high-frequency oscillation features, including: The EEG signals in each channel are passed through filters of 80-250Hz and 250-500Hz, and the envelope of the EEG signals in each channel after filtering is calculated. Set an envelope threshold and count the number of events in the filtered EEG where the envelope exceeds the threshold and the duration is between 10 and 100 milliseconds. ; Calculate the high-frequency oscillation characteristics for each time window ;in, Indicates the duration of the time window.

[0010] Preferably, the step of constructing a high-dimensional feature vector, i.e., a feature map, for the corresponding time window using the obtained time-domain features, frequency-domain features, time-frequency-domain features, spatial features, and high-frequency oscillation features includes: Obtain activity characteristics migration rate Absolute power Relative power Spectral entropy Wavelet entropy Phase lock value High-frequency oscillation characteristics ; For the A time window, a channel high-dimensional feature vectors ; use Obtaining feature maps of long-term EEG data ,in, Indicates the number of channels. Indicates the number of time windows.

[0011] Preferably, the method involves correcting the EEG feature map based on the individual differences of the target patient and extracting multiple key features from the corrected EEG map, including: The electroencephalogram (EEG) characteristics of each target patient in a non-ictal state were obtained as an individual baseline; the non-ictal state included the preictal and interictal periods, wherein the preictal period was... , Indicates the current state and time; the interictal period is the time period away from the onset of an attack, including or away from the preictal period; Indicates the width of the forecast window; Obtain EEG characteristics at any given time and calculate the standard score between the individual and the baseline. Correcting EEG feature maps using standard scores; Calculate the effect size of each feature in the corrected EEG atlas during the preic and interictal periods; EEG features with effect sizes greater than the feature retention threshold are retained as key features.

[0012] Preferably, obtaining the electroencephalogram (EEG) characteristics of each target patient in a non-seizure state as an individual baseline includes: Calculate the mean and variance of the EEG characteristics of each target patient in the non-seizure state; The baseline standard score was calculated using the mean and variance of EEG characteristics in the non-ictal state. ; in, Indicates the characteristics of brain waves in the non-ictal state. The mean; Indicates the characteristics of brain waves in the non-ictal state. variance ; ; This represents the set of non-seizure times; This indicates the number of EEG data collections during non-ictal periods; Circadian rhythm correction includes: The diurnal variation of EEG characteristics in the non-seizure state was fitted using a cosine model: ; Constructing the feature objective function The objective function is solved using the least squares method to obtain the parameters. , and ,in, , Represents the fitted parameters, Representation of features The phase angle; Corrected standard scores ,in, Indicates based on Calculate the variance of the fitted features; For dynamically changing baselines, an exponentially weighted algorithm is used to obtain EEG features adapted to dynamic scenarios. Mean and variance: ; Among them, the forgetting factor , Represents the time constant. Indicates the data collection time interval; Obtain adaptive standard score ; Obtain the final standardized score ; , , Represents the standard score weighting coefficient; where: ; ; ; Indicates the last 24 hours variance Indicates the last 24 hours variance Indicates the last 24 hours The variance; Indicates the speed control coefficient; The method of correcting EEG feature maps using standard scores includes: Obtain the final standard score and electroencephalogram (EEG) features; according to ; Obtain corrected EEG features ; A modified brainwave feature atlas is constructed using the modified brainwave features. The calculation of the effect size of each feature in the corrected EEG spectrum during the preic and interictal periods includes: Calculate the mean and standard deviation of the corrected EEG characteristics during the preic and interictal periods; Obtaining effect size ; in, , This represents the mean of the corrected EEG characteristics during the preic and interictal periods; , The variance of the corrected EEG characteristics during the preic and interictal periods is represented. This indicates the number of times data was collected during the pre-seizure phase. Indicates the number of data collections during the interictal period; The retention of EEG features with effect sizes greater than the feature retention threshold as key features includes: Acquire features effect size ; If | Then determine the features If it is a key feature, then it is considered a non-key feature and is removed from the corrected EEG atlas. Key features are used to construct a set of key features of the target patient's EEG.

[0013] Preferably, the method of predicting the probability of onset using multiple key features and quantifying the prediction window period and the confidence level of the prediction results includes: Obtain the key feature set of the target patient's electroencephalogram (EEG) waves; After normalizing the key features within the target patient's EEG key feature set, the data is input into a pre-trained decision tree model, which outputs the predicted probability of the target patient's epileptic seizures within the output window. ; Quantify the confidence level of the prediction results, including: Using the Monte Carlo exit algorithm, run The next forward propagation obtains the uncertainty of the decision tree model. ;in, Indicates the first The predicted probability obtained from the first forward propagation; express The average of the predicted probabilities from each forward propagation; The uncertainty in the output of the quantified decision tree model includes: set up , where the parameters , Indicates concentration parameter; Uncertainty in obtaining the predicted probability output by the decision tree model ; Therefore, the confidence level of the prediction result is ,in, Indicates a non-negative correction term; Assume that the prediction time of epileptic seizures follows a Gaussian distribution, i.e., the prediction time... ,in Indicates the mean over the forecast period. Indicates the variance over the forecast period; The uncertainty of the prediction time, i.e., the confidence level of the prediction window period, is... .

[0014] Preferred options also include: Forecast window period Based on the uncertainty of the prediction time, , , Quantities representing the standard normal distribution; Since the uncertainty in seizure prediction is usually time-dependent and asymmetric, the prediction window is adjusted accordingly to obtain a revised prediction window. , ; in, , Indicates the lower bound expansion coefficient and the upper bound expansion coefficient; Set the prediction window period optimization function: ; The prediction window optimization function is obtained using the weighted Chebyshev algorithm. and .

[0015] Preferably, based on the seizure probability, prediction window period, and confidence level of the prediction results, the final characteristics driving epileptic seizures are obtained, including: Obtain the predicted probability of epileptic seizures in the target patient The revised forecast window period, the confidence level of the forecast result, and the confidence level of the forecast window period; For prediction probability Gradient attribution includes: For the predicted probability, calculate the key features. Contribution ;in, Key features during an attack The average value, key features after gradient processing ; Represents the gradient coefficients. Indicates based on The predictive probability of epileptic seizures; By performing an integral approximation, we obtain ; in, , Indicates the number of integration steps. Indicates the current number of integration steps; Weighted gradient attribution for confidence levels includes: Considering the confidence level of the prediction results, calculate the confidence contribution of each key feature. ; Indicates calculation The variance; For the prediction window, calculate the time-dependent importance of each key feature, including: Calculate the prediction window time decay weight ,in, Time parameters ; Time-dependent importance ; if Then judge Is it greater than the confidence contribution threshold? If not, then remove the key feature; Otherwise, determine whether the time dependency importance is greater than the time dependency importance threshold. If not, remove the key feature; otherwise, retain the corresponding key feature as the final feature. All retained final features are ranked according to their contribution. The brainwaves of the target patient are sorted in descending order to obtain the final feature vector, i.e., the final brainwave feature map. The final EEG feature map is visualized, with color intensity representing the contribution of the final feature and time-dependent importance showing how the contribution changes over time.

[0016] The beneficial effects of this invention are: 1. This invention extracts various types of features from long-term electroencephalogram (EEG) data, including time-domain, frequency-domain, time-frequency-domain, spatial features, and high-frequency oscillation features, to construct a complete EEG feature atlas. The EEG feature atlas is corrected based on individual differences. During the correction process, not only are physiological differences such as circadian rhythms among different patients considered, but dynamic correction also adapts to the dynamic scenarios of patient feature drift, reducing the false alarm rate of subsequent prediction models.

[0017] 2. This invention extracts key features from EEG characteristics corrected for individual differences, and uses these key features to obtain corresponding epileptic seizure prediction probabilities (not as final prediction results). Uncertainty analysis is used to quantify the prediction window period and the confidence level of the prediction results. Attribution analysis is then performed using the prediction probabilities, prediction window period, and confidence level of the prediction results to reverse-engineer the final characteristics leading to epileptic seizures. This not only provides effective data for subsequent predictions but also allows medical personnel to develop pre-intervention plans based on the final characteristics. Attached Figure Description

[0018] Figure 1 This is a block diagram of the epilepsy EEG feature recognition system based on machine learning according to the present invention. Detailed Implementation

[0019] The following description is intended to disclose the present invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious modifications will occur to those skilled in the art. The basic principles of the invention defined in the following description can be applied to other embodiments, modifications, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the invention.

[0020] It is understood that the term "a" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element can be one, while in another embodiment, the number of the element can be multiple, and the term "a" should not be understood as a limitation on the number.

[0021] refer to Figure 1 The technical solution provided by this invention is: a machine learning-based epilepsy EEG feature recognition system, comprising: A preprocessing module, configured to acquire target long-range EEG data and perform preprocessing; The atlas construction module is configured to extract multiple brainwave features from preprocessed long-range EEG data and construct an EEG feature atlas. The feature extraction module is configured to correct the EEG feature map based on the individual differences of the target patient and extract multiple key features from the corrected EEG map. The feature recognition module is configured to predict the seizure probability using multiple key features, quantify the prediction window period and the confidence level of the prediction result, and obtain the final features driving the epileptic seizure based on the seizure probability, the prediction window period, and the confidence level of the prediction result. The functionality of the map construction module is implemented through the following steps: Step 2.1: Acquire preprocessed long-range EEG data ; Step 2.2, The data is divided into multiple continuous time windows. Within each time window, the time domain features, frequency domain features, time-frequency domain features, spatial features, and high-frequency oscillation features of each channel are extracted. Specifically: Step 2.21: Extract time-domain features to capture the amplitude, complexity, and regularity of the signal's changes, because time-domain features directly affect the original voltage time series and reflect the signal's most basic statistical and dynamic characteristics, including: For channels Extracting activity features ,in Indicates the channel within the time window No. The power of the EEG signal at each sampling point Indicates average power. Indicates the number of sampling points within the time window; Extracting migration rate Increased mobility means an increase in high-frequency components. Extraction complexity: ; Complexity describes the degree to which a signal shape deviates from a pure sine wave. The higher the complexity, the more complex and irregular the signal morphology. During epileptic seizures or in the preic phase, the complexity may exhibit characteristic changes.

[0022] Step 2.22: Extract frequency domain features, including: Fourier transform is performed on the data within each time window to convert the EEG signal from the time domain to the frequency domain; The entire frequency band of the EEG signal in the frequency domain is divided into multiple clinically standard rhythms, including: First clinical standard rhythm: frequency band range is ; Second clinical standard rhythm: frequency band range is ; Third clinical standard rhythm: frequency band range is ; Fourth clinical standard rhythm: frequency band range is ; Calculate the absolute power of each clinical standard rhythm within the channel. and relative power ; in, Indicates the number of channels; Indicates channel Internal frequency is The power of the brainwave signal, Indicates the first The highest frequency of a clinical standard rhythm Indicates the first The lowest frequency of a clinical standard rhythm. Relative power reflects the proportion of energy in different brain rhythms. For example, before an attack, there may be an increase in the relative power of the second or third clinical standard rhythm band in the temporal lobe, or an increase in the relative power of the fourth clinical standard rhythm band in the whole brain.

[0023] Calculate spectral entropy ;in, ; Indicates channel The maximum frequency of the internal signal, Indicates channel The minimum frequency of the internal signal. Spectral entropy measures the flatness (disorder) of the frequency distribution; a higher spectral entropy value indicates a more uniform energy distribution across frequencies. A lower value indicates that energy is concentrated at a few frequencies. A decrease in spectral entropy may occur before an epileptic seizure.

[0024] Step 2.23: Extract time-frequency features to track instantaneous frequency changes in signal energy, including: EEG is a stationary signal whose frequency components change rapidly over time. Time-frequency analysis can provide local information on both time and frequency.

[0025] Channels in each time window Wavelet transform was performed on the internal EEG signals to obtain the corresponding time-frequency features. ,in, Indicates the first Time window channel Brainwave signals within, Indicates frequency as The time is Morlet wavelet; Time-frequency energy is ; in time Corresponding frequency The time-frequency energy of brainwave signals.

[0026] Wavelet entropy calculated based on time-frequency energy : Calculate the frequency at a given time. Time-frequency energy distribution: ,in, Indicates a given time; Given time Wavelet entropy of time .

[0027] Wavelet entropy describes the degree of concentration of frequencies at a specific moment. The lower the value, the higher the assimilation of brain activity at each frequency at the corresponding moment. This is an important characteristic before and during an epileptic seizure.

[0028] Extracting spatial features, including: Epilepsy activity typically involves abnormal synchronization and connectivity changes in multiple brain regions, and spatial features need to be extracted from EEG signals from multiple channels.

[0029] Calculate the phase lock value, which measures the stability of phase synchronization between signals from two brain regions at a specific frequency, including: Within each time window, the instantaneous phase of the EEG signal in each channel is extracted by wavelet transform; For channels and Phase lock value ;in, Indicates channel Internal frequency is The signal at time The instantaneous phase of time; Indicates the first The sampling time of each sampling point.

[0030] 1 indicates a constant phase difference, i.e., perfect phase lock; 0 indicates no phase relationship. Before an epileptic focus and surrounding tissues or different brain regions, there may be an abnormally high (hypersynchronous) or low (disconnected) phase lock value.

[0031] Step 2.24: Extract high-frequency oscillation features, including: HFOs (80-500 Hz) are a recognized direct electrophysiological marker of abnormal synchronous discharge of neurons within epileptogenic foci in recent years.

[0032] The EEG signals in each channel are passed through filters of 80-250Hz and 250-500Hz, and the envelope (RMS energy) of the EEG signals in each channel after filtering is calculated.

[0033] Set an envelope threshold and count the number of events in the filtered EEG where the envelope exceeds the threshold and the duration is between 10 and 100 milliseconds. .

[0034] Calculate the high-frequency oscillation characteristics for each time window ;in, Indicates the duration of the time window.

[0035] Step 2.3: Construct a high-dimensional feature vector, i.e., a feature map, for the corresponding time window using the obtained time-domain features, frequency-domain features, time-frequency-domain features, spatial features, and high-frequency oscillation features. This specifically includes the following steps: obtaining activity features. migration rate Absolute power Relative power Spectral entropy Wavelet entropy Phase lock value High-frequency oscillation characteristics .

[0036] For the A time window, a channel high-dimensional feature vectors .

[0037] use Obtaining feature maps of long-term EEG data ,in, Indicates the number of channels. Indicates the number of time windows.

[0038] The feature extraction module achieves its functionality through the following steps: Step 3.1: Obtain the EEG characteristics of each target patient in a non-ictal state as an individual baseline. The non-ictal state includes the preictal and interictal periods, wherein the preictal period is... , Indicates the current state and time; the interictal period is the time period away from the onset of an attack, including or away from the preictal period; This indicates the width of the prediction window. Specifically: Calculate the mean and variance of the EEG characteristics of each target patient in the non-seizure state.

[0039] The baseline standard score was calculated using the mean and variance of EEG characteristics in the non-ictal state. .

[0040] in, Indicates the characteristics of brain waves in the non-ictal state. The mean; Indicates the characteristics of brain waves in the non-ictal state. variance ; ; This represents the set of non-seizure times; This indicates the number of EEG data collections during non-ictal periods.

[0041] Step 3.2: Obtain EEG characteristics at any given time and calculate the standard score (Z-score) between the individual and the baseline. Specifically: Circadian rhythm correction includes: The diurnal variation of EEG characteristics in the non-seizure state was fitted using a cosine model: Fitted EEG characteristics mean ; Constructing the feature objective function The objective function is solved using the least squares method to obtain the parameters. , and ,in, , Represents the fitted parameters, Representation of features The phase angle.

[0042] Corrected standard scores ,in, Indicates based on The calculated variance of the fitted features.

[0043] For dynamically changing baselines, an exponentially weighted algorithm is used to obtain EEG features adapted to dynamic scenarios. Mean and variance: ; Among them, the forgetting factor , This represents the time constant, which is 4-6 hours in this embodiment. Indicates the data collection time interval.

[0044] Obtain adaptive standard score ; Obtain the final standardized score ; , , Represents the standard score weighting coefficient; where: ; ; ; Indicates the last 24 hours variance Indicates the last 24 hours variance Indicates the last 24 hours The variance; This represents the speed control coefficient.

[0045] Step 3.3: Correct the EEG feature map using standard scores, specifically as follows: Obtain the final standard score and electroencephalogram (EEG) features; according to Obtain the corrected EEG characteristics .

[0046] A modified brainwave feature map is constructed using the modified brainwave features.

[0047] Step 3.4: Calculate the effect size of each feature in the corrected EEG spectrum during the preic and interictal periods, specifically: Calculate the mean and standard deviation of the corrected EEG characteristics during the preic and interictal periods; Obtaining effect size ;in, , This represents the mean of the corrected EEG characteristics during the preic and interictal periods; , The variance of the corrected EEG characteristics during the preic and interictal periods is represented. This indicates the number of times data was collected during the pre-seizure phase. This indicates the number of times data was collected during the interictal period.

[0048] Step 3.5: Retain EEG features with effect sizes greater than the feature retention threshold as key features, specifically: Acquire features effect size If | Then determine the features If it is a key feature, then it is a non-key feature and should be removed from the corrected EEG atlas.

[0049] Key features are used to construct a set of key features of the target patient's EEG.

[0050] The feature recognition module achieves its functionality through the following steps: Obtain the key feature set of the target patient's electroencephalogram (EEG) waves; After normalizing the key features within the target patient's EEG key feature set, the data is input into a pre-trained decision tree model, which outputs the predicted probability of the target patient's epileptic seizures within the output window. .

[0051] Quantify the confidence level of the prediction results, including: According to Bayesian deep learning, the uncertainty of prediction results is divided into cognitive uncertainty and random uncertainty. Cognitive uncertainty stems from the uncertainty of model parameters, while random uncertainty stems from the inherent noise and variability of the data.

[0052] In this embodiment, the Monte Carlo Dropout algorithm is used to run... The next forward propagation yields cognitive uncertainty, i.e., the uncertainty of the decision tree model. ;in, Indicates the first The predicted probability obtained from the first forward propagation; express The average of the predicted probabilities from each forward propagation.

[0053] Since the prediction task is a binary classification (i.e., onset or no onset), the Beta distribution is used to quantify the uncertainty of the prediction probability, which is to say, the uncertainty of the decision tree model output, including: set up , where the parameters , Indicates concentration parameter; The uncertainty (random uncertainty) of obtaining the predicted probability output by the decision tree model. ; Therefore, the confidence level of the prediction result is ,in, This indicates a non-negative correction term.

[0054] Assume that the prediction time of epileptic seizures follows a Gaussian distribution, i.e., the prediction time... ,in Indicates the mean over the forecast period. This represents the variance of the prediction time. The uncertainty of the prediction time, i.e., the confidence level of the prediction window, is... .

[0055] In some preferred embodiments, the method further includes: predicting the window period. Based on the uncertainty of the prediction time, , , This indicates the quantile of the standard normal distribution, such as 1.96 corresponding to the 95% confidence level.

[0056] Since the uncertainty in seizure prediction is usually time-dependent and asymmetric, the prediction window is adjusted accordingly to obtain a revised prediction window. , ;in, , This represents the lower bound expansion coefficient and the upper bound expansion coefficient.

[0057] Set the prediction window period optimization function: The prediction window period optimization function is obtained by using the weighted Chebyshev algorithm. and .

[0058] Obtain the predicted probability of epileptic seizures in the target patient The revised forecast window period, the confidence level of the forecast result, and the confidence level of the forecast window period; For prediction probability Gradient attribution includes: For the predicted probability, calculate the key features. Contribution ;in, Key features during an attack The average value, key features after gradient processing ; Represents the gradient coefficients. Indicates based on The predicted probability of epileptic seizures.

[0059] By performing an integral approximation, we obtain .in, , Indicates the number of integration steps. This indicates the current number of integration steps; in this embodiment, the number of integration steps ranges from 20 to 50.

[0060] Weighted gradient attribution for confidence levels includes: Considering the confidence level of the prediction results, calculate the confidence contribution of each key feature. ; Indicates calculation The variance.

[0061] For the prediction window, calculate the time-dependent importance of each key feature, including: Calculate the prediction window time decay weight ,in, Time parameters ; Time-dependent importance .

[0062] if Then judge Is it greater than the confidence contribution threshold? If not, then remove the key feature; Otherwise, determine whether the time dependency importance is greater than the time dependency importance threshold. If not, remove the key feature; otherwise, retain the corresponding key feature as the final feature.

[0063] All retained final features are ranked according to their contribution. The brainwaves of the target patient are sorted in descending order to obtain the final feature vector, i.e., the final brainwave feature map.

[0064] The final EEG feature map is visualized, with color intensity representing the contribution of the final feature and time-dependent importance showing how the contribution changes over time.

[0065] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are merely examples and do not limit the present invention. The purpose of the present invention has been fully and effectively achieved. The functions and structural principles of the present invention have been shown and explained in the embodiments. Without departing from the principles described, the implementation of the present invention may have any changes or modifications.

Claims

1. A machine learning-based EEG feature recognition system for epilepsy, characterized in that, include: A preprocessing module, configured to acquire target long-range EEG data and perform preprocessing; The atlas construction module is configured to extract multiple brainwave features from preprocessed long-range EEG data and construct an EEG feature atlas. The feature extraction module is configured to correct the EEG feature map based on the individual differences of the target patient and extract multiple key features from the corrected EEG map. The feature recognition module is configured to predict the probability of seizures using multiple key features, quantify the prediction window period and the confidence level of the prediction results, and obtain the final features driving the epileptic seizures based on the seizure probability, the prediction window period and the confidence level of the prediction results.

2. The epilepsy EEG feature recognition system based on machine learning according to claim 1, characterized in that, The step of extracting multiple brainwave features from preprocessed long-range EEG data and constructing an EEG feature atlas includes: Acquiring preprocessed long-range EEG data ; Will The data is divided into multiple continuous time windows, and within each time window, the time domain features, frequency domain features, time-frequency domain features, spatial features, and high-frequency oscillation features of each channel are extracted. The obtained time-domain features, frequency-domain features, time-frequency domain features, spatial features, and high-frequency oscillation features are used to construct the high-dimensional feature vectors, i.e., feature maps, for the corresponding time windows.

3. The epilepsy EEG feature recognition system based on machine learning according to claim 2, characterized in that, The The data is divided into multiple continuous time windows. Within each time window, the time-domain features, frequency-domain features, time-frequency-domain features, spatial features, and high-frequency oscillation features of each channel are extracted, including: Extracting temporal features, including: For channels Extracting activity features ,in Indicates the channel within the time window No. The power of the EEG signal at each sampling point Indicates average power. Indicates the number of sampling points within the time window; Extracting migration rate Extraction complexity: ; Extracting frequency domain features includes: Fourier transform is performed on the data within each time window to convert the EEG signal from the time domain to the frequency domain; The entire frequency band of the EEG signal in the frequency domain is divided into multiple clinically standard rhythms, including: First clinical standard rhythm: Frequency band range is: ; Second clinical standard rhythm: Frequency band range is: ; Third clinical standard rhythm: Frequency band range is: ; Fourth clinical standard rhythm: frequency band range is: ; Calculate the absolute power of each clinical standard rhythm within the channel. and relative power ; in, Indicates the number of channels; Indicates channel Internal frequency is The power of the brainwave signal, Indicates the first The highest frequency of a clinical standard rhythm Indicates the first The lowest frequency of a clinically standard rhythm; Calculate spectral entropy ;in, ; Indicates channel The maximum frequency of the internal signal, Indicates channel The minimum frequency of the internal signal; Extracting time-frequency features includes: Channels in each time window Wavelet transform was performed on the internal EEG signals to obtain the corresponding time-frequency features. ,in, Indicates the first Time window channel Brainwave signals within, Indicates frequency as The time is Moret wavelet; Time-frequency energy is ; Wavelet entropy calculated based on time-frequency energy : Calculate the frequency at a given time. Time-frequency energy distribution: ,in, Indicates a given time; Given time Wavelet entropy of time ; Extracting spatial features, including: Calculate the phase lock value, which measures the stability of phase synchronization between signals from two brain regions at a specific frequency, including: Within each time window, the instantaneous phase of the EEG signal in each channel is extracted by wavelet transform; For channels and Phase lock value ;in, Indicates channel Internal frequency is The signal at time The instantaneous phase of time; Indicates the first The sampling time of each sampling point; Extracting high-frequency oscillation features, including: The EEG signals in each channel are passed through filters of 80-250Hz and 250-500Hz, and the envelope of the EEG signals in each channel after filtering is calculated. Set an envelope threshold and count the number of events in the filtered EEG where the envelope exceeds the threshold and the duration is between 10 and 100 milliseconds. ; Calculate the high-frequency oscillation characteristics for each time window ;in, Indicates the duration of the time window.

4. The epilepsy EEG feature recognition system based on machine learning according to claim 3, characterized in that, The high-dimensional feature vector, i.e., the feature map spectrum, constructed using the obtained time-domain features, frequency-domain features, time-frequency-domain features, spatial features, and high-frequency oscillation features for the corresponding time window includes: Obtain activity characteristics migration rate Absolute power Relative power Spectral entropy Wavelet entropy Phase lock value High-frequency oscillation characteristics ; For the A time window, a channel high-dimensional feature vectors ; use Obtaining feature maps of long-term EEG data ,in, Indicates the number of channels. Indicates the number of time windows.

5. The epilepsy EEG feature recognition system based on machine learning according to claim 4, characterized in that, The method involves correcting the EEG feature map based on individual differences of the target patient and extracting several key features from the corrected EEG map, including: The electroencephalogram (EEG) characteristics of each target patient in a non-ictal state were obtained as an individual baseline; the non-ictal state included the preictal and interictal periods, wherein the preictal period was... , Indicates the current state and time; the interictal period is the time period away from the onset of an attack, including or away from the preictal period; Indicates the width of the forecast window; Obtain EEG characteristics at any given time and calculate the standard score between the individual and the baseline. Correcting EEG feature maps using standard scores; Calculate the effect size of each feature in the corrected EEG atlas during the preic and interictal periods; EEG features with effect sizes greater than the feature retention threshold are retained as key features.

6. The epilepsy EEG feature recognition system based on machine learning according to claim 5, characterized in that, The acquisition of the electroencephalogram (EEG) characteristics of each target patient in a non-seizure state, as an individual baseline, includes: Calculate the mean and variance of the EEG characteristics of each target patient in the non-seizure state; The baseline standard score was calculated using the mean and variance of EEG characteristics in the non-ictal state. ; in, Indicates the characteristics of brain waves in the non-ictal state. The mean; Indicates the characteristics of brain waves in the non-ictal state. variance ; ; This represents the set of non-seizure times; This indicates the number of EEG data collections during non-ictal periods; Circadian rhythm correction includes: The diurnal variation of EEG characteristics in the non-seizure state was fitted using a cosine model: ; Constructing the feature objective function The objective function is solved using the least squares method to obtain the parameters. , and ,in, , Represents the fitted parameters, Representation of features The phase angle; Corrected standard scores ,in, Indicates based on Calculate the variance of the fitted features; For dynamically changing baselines, an exponentially weighted algorithm is used to obtain EEG features adapted to dynamic scenarios. Mean and variance: ; Among them, the forgetting factor , Represents the time constant. Indicates the data collection time interval; Obtain adaptive standard score ; Obtain the final standardized score ; , , Represents the standard score weighting coefficient; where: ; ; ; Indicates the last 24 hours variance Indicates the last 24 hours variance Indicates the last 24 hours The variance; Indicates the speed control coefficient; The method of correcting EEG feature maps using standard scores includes: Obtain the final standard score and electroencephalogram (EEG) features; according to ; Obtain corrected EEG features ; A modified brainwave feature atlas is constructed using the modified brainwave features. The calculation of the effect size of each feature in the corrected EEG spectrum during the preic and interictal periods includes: Calculate the mean and standard deviation of the corrected EEG characteristics during the preic and interictal periods; Obtaining effect size ; in, , This represents the mean of the corrected EEG characteristics during the preic and interictal periods; , The variance of the corrected EEG characteristics during the preic and interictal periods is represented. This indicates the number of times data was collected during the pre-seizure phase. Indicates the number of data collections during the interictal period; The retention of EEG features with effect sizes greater than the feature retention threshold as key features includes: Acquire features effect size ; If | Then determine the features If it is a key feature, then it is considered a non-key feature and is removed from the corrected EEG atlas. Key features are used to construct a set of key features of the target patient's EEG.

7. The epilepsy EEG feature recognition system based on machine learning according to claim 6, characterized in that, The method of predicting the probability of onset using multiple key features and quantifying the prediction window period and the confidence level of the prediction results includes: Obtain the key feature set of the target patient's electroencephalogram (EEG) waves; After normalizing the key features within the target patient's EEG key feature set, the data is input into a pre-trained decision tree model, which outputs the predicted probability of the target patient's epileptic seizures within the output window. ; Quantify the confidence level of the prediction results, including: Using the Monte Carlo exit algorithm, run The next forward propagation obtains the uncertainty of the decision tree model. ;in, Indicates the first The predicted probability obtained from the first forward propagation; express The average of the predicted probabilities from each forward propagation; The uncertainty in the output of the quantified decision tree model includes: set up , where the parameters , Indicates concentration parameter; Uncertainty in obtaining the predicted probability output by the decision tree model ; Therefore, the confidence level of the prediction result is ,in, Indicates a non-negative correction term; Assume that the prediction time of epileptic seizures follows a Gaussian distribution, i.e., the prediction time... ,in Indicates the mean over the forecast period. Indicates the variance over the forecast period; The uncertainty of the prediction time, i.e., the confidence level of the prediction window period, is... .

8. The epilepsy EEG feature recognition system based on machine learning according to claim 7, characterized in that, Also includes: Forecast window period Based on the uncertainty of the prediction time, , , Quantities representing the standard normal distribution; Since the uncertainty in seizure prediction is usually time-dependent and asymmetric, the prediction window is adjusted accordingly to obtain a revised prediction window. , ; in, , Indicates the lower bound expansion coefficient and the upper bound expansion coefficient; Set the prediction window period optimization function: ; The prediction window optimization function is obtained using the weighted Chebyshev algorithm. and .

9. The epilepsy EEG feature recognition system based on machine learning according to claim 8, characterized in that, Based on the seizure probability, prediction window period, and confidence level of the prediction results, the final characteristics driving epileptic seizures are obtained, including: Obtain the predicted probability of epileptic seizures in the target patient The revised forecast window period, the confidence level of the forecast result, and the confidence level of the forecast window period; For prediction probability Gradient attribution includes: For the predicted probability, calculate the key features. Contribution ;in, Key features during an attack The average value, key features after gradient processing ; Represents the gradient coefficients. Indicates based on The predictive probability of epileptic seizures; By performing an integral approximation, we obtain ; in, , Indicates the number of integration steps. Indicates the current number of integration steps; Weighted gradient attribution for confidence levels includes: Considering the confidence level of the prediction results, calculate the confidence contribution of each key feature. ; Indicates calculation The variance; For the prediction window, calculate the time-dependent importance of each key feature, including: Calculate the prediction window time decay weight ,in, Time parameters ; Time-dependent importance ; if Then judge Is it greater than the confidence contribution threshold? If not, then remove the key feature; Otherwise, determine whether the time dependency importance is greater than the time dependency importance threshold. If not, remove the key feature; otherwise, retain the corresponding key feature as the final feature. All retained final features are ranked according to their contribution. The brainwaves of the target patient are sorted in descending order to obtain the final feature vector, i.e., the final brainwave feature map. The final EEG feature map is visualized, with color intensity representing the contribution of the final feature and time-dependent importance showing how the contribution changes over time.