CN111870241B - Epileptic seizure signal detection method based on optimized multidimensional sample entropy - Google Patents
Epileptic seizure signal detection method based on optimized multidimensional sample entropy Download PDFInfo
- Publication number
- CN111870241B CN111870241B CN202010637325.6A CN202010637325A CN111870241B CN 111870241 B CN111870241 B CN 111870241B CN 202010637325 A CN202010637325 A CN 202010637325A CN 111870241 B CN111870241 B CN 111870241B
- Authority
- CN
- China
- Prior art keywords
- sample entropy
- signal
- calculate
- dimensional sample
- dimensional
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 206010010904 Convulsion Diseases 0.000 title claims abstract description 39
- 206010015037 epilepsy Diseases 0.000 title claims abstract description 31
- 208000028329 epileptic seizure Diseases 0.000 title claims abstract description 16
- 238000001514 detection method Methods 0.000 title claims abstract description 9
- 238000000605 extraction Methods 0.000 claims abstract description 6
- 238000005070 sampling Methods 0.000 claims description 20
- 238000004364 calculation method Methods 0.000 claims description 14
- 239000000284 extract Substances 0.000 claims description 5
- 238000007781 pre-processing Methods 0.000 claims description 5
- 238000000034 method Methods 0.000 abstract description 23
- 238000000537 electroencephalography Methods 0.000 description 30
- 238000004458 analytical method Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 7
- 210000004556 brain Anatomy 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000005312 nonlinear dynamic Methods 0.000 description 3
- 230000006403 short-term memory Effects 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000007635 classification algorithm Methods 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- 230000002123 temporal effect Effects 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 208000012260 Accidental injury Diseases 0.000 description 1
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- 208000014644 Brain disease Diseases 0.000 description 1
- 208000026350 Inborn Genetic disease Diseases 0.000 description 1
- 208000012902 Nervous system disease Diseases 0.000 description 1
- 208000025966 Neurological disease Diseases 0.000 description 1
- 208000003443 Unconsciousness Diseases 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000003925 brain function Effects 0.000 description 1
- 230000001684 chronic effect Effects 0.000 description 1
- 238000003759 clinical diagnosis Methods 0.000 description 1
- 230000036461 convulsion Effects 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 238000003066 decision tree Methods 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 201000010099 disease Diseases 0.000 description 1
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 1
- 229940079593 drug Drugs 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 238000002570 electrooculography Methods 0.000 description 1
- 230000001037 epileptic effect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 208000016361 genetic disease Diseases 0.000 description 1
- 208000014674 injury Diseases 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000002483 medication Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000003449 preventive effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001681 protective effect Effects 0.000 description 1
- 230000000306 recurrent effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000000714 time series forecasting Methods 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/40—Detecting, measuring or recording for evaluating the nervous system
- A61B5/4076—Diagnosing or monitoring particular conditions of the nervous system
- A61B5/4094—Diagnosing or monitoring seizure diseases, e.g. epilepsy
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7203—Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7264—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
- A61B5/7267—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Physics & Mathematics (AREA)
- Molecular Biology (AREA)
- Public Health (AREA)
- Pathology (AREA)
- Physiology (AREA)
- Biomedical Technology (AREA)
- Heart & Thoracic Surgery (AREA)
- Medical Informatics (AREA)
- Signal Processing (AREA)
- Surgery (AREA)
- Animal Behavior & Ethology (AREA)
- General Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Veterinary Medicine (AREA)
- Neurology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Psychiatry (AREA)
- Neurosurgery (AREA)
- Evolutionary Computation (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
Abstract
本发明公开了一种基于优化的多维样本熵的癫痫发作信号检测方法。在这项研究中,本发明采用多维样本熵作为特征来区分癫痫发作状态和正常状态,并对其进行了优化,提高了计算效率。此外,通过结合多维样本熵征提取和Bi‑LSTM,开发了一种新的预测方法来预测癫痫发作。结果表明,该方法取得了良好的表现,可预测5分钟后脑电的多维样本熵,准确率高达80.09%,误报率为0.26/h。本研究的结果表明,所提出的预测方案更适合于实际癫痫发作预测。
The invention discloses an epileptic seizure signal detection method based on optimized multi-dimensional sample entropy. In this study, the present invention uses multi-dimensional sample entropy as a feature to distinguish epileptic seizure states from normal states, and optimizes them to improve computational efficiency. Furthermore, by combining multidimensional sample entropy feature extraction and Bi‑LSTM, a new prediction method is developed to predict epileptic seizures. The results show that the method achieves good performance and can predict the multi-dimensional sample entropy of EEG after 5 minutes with an accuracy rate of 80.09% and a false alarm rate of 0.26/h. The results of this study suggest that the proposed prediction scheme is more suitable for actual seizure prediction.
Description
技术领域technical field
本发明属于信号特征分析领域,涉及一种基于优化的多维样本熵和双向长短时记忆神经网络(Bi-directional Long Short-Term Memory,Bi-LSTM)的癫痫发作信号检测方法。The invention belongs to the field of signal feature analysis, and relates to an epileptic seizure signal detection method based on optimized multi-dimensional sample entropy and bi-directional long short-term memory neural network (Bi-directional Long Short-Term Memory, Bi-LSTM).
背景技术Background technique
癫痫是由于脑神经元超同步化异常放电引起的一种常见的脑部疾病,在神经系统疾病中排名第二,发病率仅次于脑卒中。癫痫发作是一种慢性长期反复性的疾病,具有突发性,在病发期间会造成脑功能暂时丧失。在国外癫痫的患病率约为3‰~10‰。,在我国的患病率有4‰~9‰,到目前为止,全球大约有5千万患者正在经历病痛的折磨。多数癫痫患者在发作时会突然昏倒,全身痉挛,意识丧失。同时由于癫痫发作的猝发性,如果此时病人正从事某种危险操作(如驾驶汽车),则很容易受到意外伤害。若能在癫痫发作前预测到癫痫即将发作,即使是较短的时间,也可使患者或医生能够及时采取必要的预防保护措施,这对病人是十分有利的。癫痫发作预测对癫痫治疗起着重要的作用,因而成为当前癫痫病学研究中的一个热点。Epilepsy is a common brain disease caused by abnormal hypersynchronization of brain neurons discharge, ranking second in neurological diseases, and its incidence is second only to stroke. Epilepsy is a chronic, long-term, recurring disease that is sudden and causes temporary loss of brain function during the seizure. The prevalence of epilepsy in foreign countries is about 3‰ to 10‰. , the prevalence rate in my country is 4‰ to 9‰, so far, about 50 million patients worldwide are suffering from pain. Most people with epilepsy experience sudden collapse, body convulsions, and loss of consciousness during a seizure. At the same time, due to the sudden nature of epileptic seizures, if the patient is engaged in some dangerous operation (such as driving a car) at this time, it is easy to suffer accidental injury. If it is possible to predict the onset of epilepsy before the onset of epilepsy, even for a short period of time, the patient or doctor can take necessary preventive and protective measures in time, which is very beneficial to the patient. Seizure prediction plays an important role in epilepsy treatment, so it has become a hot spot in current epilepsy research.
目前已提出各种技术来解决该问题,其中脑电图(Electroencephalography,EEG)具有多种优势,包括高时间分辨率,低成本,能够长期监测和便携等,已被证明是癫痫发作分析的有效的优选方法之一。Various techniques have been proposed to solve this problem, among which Electroencephalography (EEG) has multiple advantages, including high temporal resolution, low cost, long-term monitoring and portability, etc. It has been proven to be effective for seizure analysis one of the preferred methods.
在过去的几十年中已经提出了许多分析脑电信号的方法,这些方法可以分为两种:线性方法和非线性方法。线性方法包括时域分析,频域分析和时频域分析。时域分析是用于分析癫痫信号的第一种方法。时域分析的优点是时域波形包含了脑电图的所有信息,但是这种方法缺乏客观性,而且误差较大。频域分析克服了时域分析的缺点,但它的前提是平稳的随机信号,而EEG信号是非线性和非平稳的信号,这导致了许多局限性。时频域分析方法包括短时傅立叶变换,小波变换,Hilbert-Huang变换和经验模态分解等,是目前研究脑电信号的最常用方法,并取得了较好的结果。Many methods for analyzing EEG signals have been proposed in the past few decades, and these methods can be divided into two types: linear methods and nonlinear methods. Linear methods include time domain analysis, frequency domain analysis and time-frequency domain analysis. Time domain analysis was the first method used to analyze epilepsy signals. The advantage of time-domain analysis is that the time-domain waveform contains all the information of the EEG, but this method lacks objectivity and has large errors. Frequency domain analysis overcomes the shortcomings of time domain analysis, but it is premised on stationary random signals, while EEG signals are nonlinear and non-stationary, which leads to many limitations. Time-frequency domain analysis methods, including short-time Fourier transform, wavelet transform, Hilbert-Huang transform and empirical mode decomposition, are the most commonly used methods for studying EEG signals, and have achieved good results.
从非线性动力学角度来分析,大量研究表明大脑的活动具有及其复杂的动力学特性,大脑可以看作是一个非线性动力系统。通过提取基于非线性动力学理论的脑电特征来识别癫痫脑电已成为癫痫发作自动检测的前沿动向之一。生物信号很微弱,且往往带有环境中的噪声,而熵方法在生物信号处理具有显著优势。基于熵的方法的另一个优点是,与其他非线性方法相比,它可以通过更少的数据来获得有意义的结果。其中样本熵是基于近似熵研究出来的一种新算法,可以规避近似熵的一些缺陷。不依赖数据长度,一致性更好,对于数据的丢失不敏感,算法更简单。且Mormann等人指出双变量和多变量测量相对于单变量具有更优的性能。From the perspective of nonlinear dynamics, a large number of studies have shown that the activities of the brain have extremely complex dynamic characteristics, and the brain can be regarded as a nonlinear dynamic system. Identifying epileptic EEG by extracting EEG features based on nonlinear dynamics theory has become one of the frontier trends in automatic seizure detection. Biological signals are very weak and often contain noise in the environment, and entropy methods have significant advantages in biological signal processing. Another advantage of the entropy-based method is that it can achieve meaningful results with less data than other nonlinear methods. Among them, sample entropy is a new algorithm based on approximate entropy, which can avoid some defects of approximate entropy. It does not depend on the data length, the consistency is better, it is not sensitive to data loss, and the algorithm is simpler. And Mormann et al. pointed out that bivariate and multivariate measures have better performance than univariate.
癫痫发作信号检测的关键不仅在于特征的提取,还有分类器的选取。支持向量机(Support Vector Machine,SVM),决策树,卷积神经网络(Convolutional NeuralNetworks,CNN)等许多分类算法已被用于对癫痫特征进行分类并取得了良好的效果。长短时记忆神经网(Long Short-Term Memory,LSTM)是一种时间递归神经网络,与其他分类算法不同的是,LSTM既可以用于分类,又可以对时间序列进行预测。其中Bi-LSTM是LSTM的一种变体,由一个前向的和一个后向的LSTM组成,鲁棒性更强。The key to the detection of epileptic seizure signals is not only the extraction of features, but also the selection of classifiers. Many classification algorithms such as Support Vector Machine (SVM), Decision Tree, Convolutional Neural Networks (CNN) have been used to classify epilepsy features and achieved good results. Long Short-Term Memory (LSTM) is a temporal recurrent neural network. Unlike other classification algorithms, LSTM can be used for both classification and prediction of time series. Among them, Bi-LSTM is a variant of LSTM, which consists of a forward and a backward LSTM, which is more robust.
发明内容SUMMARY OF THE INVENTION
基于以上讨论,本发明提出了一种基于优化多维样本熵和Bi-LSTM的癫痫发作信号检测方法,将多个通道的EEG信号联合起来分析并提取特征。然后用Bi-LSTM预测多维样本熵的变化趋势,并对预测的多维样本熵进行分类,以区分癫痫发作期和正常期达到检测癫痫发作信号的目的。Based on the above discussion, the present invention proposes an epileptic seizure signal detection method based on optimized multi-dimensional sample entropy and Bi-LSTM, which combines the EEG signals of multiple channels to analyze and extract features. Then, Bi-LSTM is used to predict the change trend of multi-dimensional sample entropy, and the predicted multi-dimensional sample entropy is classified to distinguish epileptic seizure period and normal period to detect epileptic seizure signals.
为了实现以上目的,本发明方法主要包括以下步骤:In order to achieve the above object, the method of the present invention mainly comprises the following steps:
步骤(1).采集脑电数据及预处理,所有的信号均由国际标准的10-20电极分布系统采样得到。数据预处理包括小波去噪、心电、眼电剔除等。Step (1). Collecting EEG data and preprocessing, all signals are sampled by the international standard 10-20 electrode distribution system. Data preprocessing includes wavelet denoising, electrocardiogram, and electrooculography.
步骤(2).计算优化的多维样本熵。Step (2). Calculate the optimized multi-dimensional sample entropy.
首先要构造多维向量。优化的多维样本熵计算的原始数据为k道EEG信号,每道信号有N个采样点,m为嵌入维。构造的向量中的每个点都是一个k维的向量。每条通道采集的EEG信号有n个采样点,第一道信号的采样点为x11、x12、x13、...、x1n,第二道信号的采样点为x21、x22、x23、...、x2n,以此类推,第k道信号的采样点为xk1、xk2、xk3、...、xkn。提取每道信号第a个采样点,得到一个多维向量Q(a)=(x1a,x2a,x3a,...,xka)。嵌入维取m=2,所以定义点X(a)=[Q(a),Q(a+1)]。The first thing to do is to construct a multidimensional vector. The original data of the optimized multi-dimensional sample entropy calculation are k-channel EEG signals, each signal has N sampling points, and m is the embedding dimension. Each point in the constructed vector is a k-dimensional vector. The EEG signal collected by each channel has n sampling points. The sampling points of the first signal are x 11 , x 12 , x 13 ,..., x 1n , and the sampling points of the second signal are x 21 , x 22 , x 23 , ..., x 2n , and so on, the sampling points of the k-th signal are x k1 , x k2 , x k3 , ..., x kn . Extract the a-th sampling point of each signal to obtain a multi-dimensional vector Q(a)=(x 1a , x 2a , x 3a ,...,x ka ). The embedding dimension takes m=2, so the definition point X(a)=[Q(a), Q(a+1)].
计算Q(a)和Q(a+1)之间的距离D[Q(a),Q(a+1)]。由于Q(a)是一个多维向量,所以本文定义Compute the distance D[Q(a),Q(a+1)] between Q(a) and Q(a+1). Since Q(a) is a multidimensional vector, this paper defines
其中OD为欧氏距离。将计算所得的距离全部存入一个表中,以避免下次循环重复计算。where O D is the Euclidean distance. All the calculated distances are stored in a table to avoid repeated calculation in the next cycle.
m=2时,X(a)=[Q(a),Q(a+1)],X(a+1)=[Q(a+1),Q(a+2)],从表中取D[Q(a),Q(a+1)]和D[Q(a+1),Q(a+2)],取较大者作为X(a)和X(a+1)间的距离。When m=2, X(a)=[Q(a), Q(a+1)], X(a+1)=[Q(a+1), Q(a+2)], from the table Take D[Q(a), Q(a+1)] and D[Q(a+1), Q(a+2)], take the larger one as the difference between X(a) and X(a+1) the distance.
设相似容限R,计算小于R的距离个数x1,Set the similarity tolerance R, calculate the number of distances less than R x 1 ,
计算所有的平均值Calculate the average of all
m=3时,X(a)=[Q(a),Q(a+1),Q(a+2)],X(a+1)=[Q(a+1),Q(a+2),Q(a+3)]从表中取D[Q(a),Q(a+1)]、D[Q(a+1),Q(a+2)]和D[Q(a+2),Q(a+3)],取最大者作为X(a)和X(a+1)间的距离。When m=3, X(a)=[Q(a), Q(a+1), Q(a+2)], X(a+1)=[Q(a+1), Q(a+ 2),Q(a+3)] Take D[Q(a),Q(a+1)], D[Q(a+1),Q(a+2)] and D[Q( a+2), Q(a+3)], take the largest one as the distance between X(a) and X(a+1).
设相似容限R,计算小于R的距离个数x2,Set the similarity tolerance R, calculate the number of distances less than R x 2 ,
计算所有的平均值 calculate all average of
计算优化的多维样本熵SampEn=-ln[Bm+1(R)/Bm(R)]。Calculate the optimized multidimensional sample entropy SampEn=-ln[Bm +1 (R) / Bm(R)].
步骤(3)根据优化的多维样本熵,用Bi-LSTM进行癫痫发作信号检测。将当前时刻之前计算得到的优化多维样本熵作为Bi-LSTM的输入,利用Bi-LSTM预测时间序列的功能,输出预测的接下来的多维样本熵。再通过Bi-LSTM的分类功能把预测的多维样本熵分为两类,即发作期和正常期,以达到癫痫发作信号检测的目的。Step (3) According to the optimized multi-dimensional sample entropy, use Bi-LSTM to detect epileptic seizure signals. The optimized multi-dimensional sample entropy calculated before the current moment is used as the input of Bi-LSTM, and the function of Bi-LSTM to predict time series is used to output the predicted next multi-dimensional sample entropy. Then, the predicted multi-dimensional sample entropy is divided into two categories through the classification function of Bi-LSTM, namely the seizure period and the normal period, so as to achieve the purpose of epileptic seizure signal detection.
本发明相对于现有技术具有如下特点:The present invention has the following characteristics with respect to the prior art:
因为脑电信号是非线性、非平稳的随机信号,所以本发明基于非线性的熵方法来研究患者的EEG特征,结合多道EEG信号提取了多维样本熵的特征。因为当癫痫发作时,不止一个通道的EEG信号会发生变化。多维样本熵可结合所有通道的EEG信号反映癫痫发作前后大脑发生的变化。Because EEG signals are nonlinear and non-stationary random signals, the present invention studies the EEG features of patients based on the nonlinear entropy method, and extracts the features of multi-dimensional sample entropy in combination with multi-channel EEG signals. Because when a seizure occurs, the EEG signal of more than one channel changes. Multidimensional sample entropy can combine EEG signals from all channels to reflect changes in the brain before and after seizures.
由于多维样本熵用到的数据量很大,计算速度很慢,本发明对多维样本熵进行了优化。根据样本熵的定义,在逐点比较期间会重复进行计算,并且在计算样本熵时,第一个模式会不断循环。组合这些循环可避免大量重复计算,提高计算速度。Since the multi-dimensional sample entropy uses a large amount of data and the calculation speed is very slow, the present invention optimizes the multi-dimensional sample entropy. According to the definition of sample entropy, the calculation is repeated during the point-by-point comparison, and the first mode is continuously looped as the sample entropy is calculated. Combining these loops avoids a lot of repeated computations and increases computation speed.
LSTM可以在输入和输出序列之间的映射中利用上下文信息,因此十分适合处理时间序列预测问题。本发明充分利用LSTM的特点,并使用了稳定性更强的变体Bi-LSTM预测多维样本熵的变化趋势,再进行分类检测癫痫发作信号。LSTMs can utilize contextual information in the mapping between input and output sequences, making them ideal for dealing with time series forecasting problems. The invention makes full use of the characteristics of LSTM, and uses a variant Bi-LSTM with stronger stability to predict the change trend of multi-dimensional sample entropy, and then classify and detect epileptic seizure signals.
附图说明Description of drawings
图1为本发明的实施流程图;Fig. 1 is the implementation flow chart of the present invention;
图2为本发明实施例的国际10-20系统EEG电极命名图;Fig. 2 is the nomenclature diagram of the EEG electrode of the international 10-20 system according to the embodiment of the present invention;
图3(a)为本发明实施例癫痫患者脑电信号提取普通样本熵发作前后的折线图;Fig. 3 (a) is the broken-line graph before and after the entropy of common sample is extracted from the EEG signal of epilepsy patient according to the embodiment of the present invention;
图3(b)为本发明实施例癫痫患者脑电信号提取多维样本熵在癫痫发作前后的折线图;Fig. 3(b) is a broken line graph of the multi-dimensional sample entropy extracted from the EEG signal of epilepsy patients before and after epileptic seizure according to the embodiment of the present invention;
图4为本发明实施例多维样本熵和优化的多维样本熵的计算时间与信号长度关系对比图;4 is a comparison diagram of the relationship between calculation time and signal length of multi-dimensional sample entropy and optimized multi-dimensional sample entropy according to an embodiment of the present invention;
图5(a)为本发明通过预测值更新网络状态效果图;Figure 5(a) is an effect diagram of the present invention updating the network state through the predicted value;
图5(b)为本发明通过观测值更新网络状态效果图;Figure 5(b) is an effect diagram of the present invention updating the network state through the observation value;
图6为本发明实施均方根误差(RMSE)与预测时间长度关系图。FIG. 6 is a graph showing the relationship between the root mean square error (RMSE) and the prediction time length in the implementation of the present invention.
具体实施方式Detailed ways
下面结合附图对本发明的实施例作详细说明:本实施例在以本发明技术方案为前提下进行实施,给出了详细的实施方式和具体的操作过程,但本发明的保护范围不限于下述的实施例。Below in conjunction with the accompanying drawings, the embodiments of the present invention are described in detail: the present embodiment is implemented on the premise of the technical solution of the present invention, and provides detailed embodiments and specific operation processes, but the protection scope of the present invention is not limited to the following described embodiment.
如图1所示,本实施例包括如下步骤:As shown in Figure 1, this embodiment includes the following steps:
步骤(1),采集脑电数据。本发明中使用的数据来自麻省理工学院公共数据库。选取13名患者,每位患者采集100个样本,总共1300个样本用于计算样本熵和优化的多维样本熵进行分类,对前60%的样本进行了培训,对最后40%的样本进行了测试。所有数据集采样频率为256Hz,采用16位分辨率。使用了国际10-20系统EEG电极命名法,如图2所示。癫痫患者在实验数据收集过程中没有服用任何药物且没有其他任何家族遗传病史。在大多数实验组中,用于收集EEG信号的通道数为23,而在少数实验中为24或26。为了便于统计数据,本发明选择了23个通道的数据。Step (1), collecting EEG data. The data used in the present invention were obtained from the Massachusetts Institute of Technology public database. 13 patients were selected, 100 samples were collected from each patient, a total of 1300 samples were used to calculate the sample entropy and the optimized multi-dimensional sample entropy for classification, the first 60% of the samples were trained, and the last 40% of the samples were tested . All datasets are sampled at 256Hz with 16-bit resolution. The International 10-20 system of EEG electrode nomenclature was used, as shown in Figure 2. The epilepsy patients were not taking any medications and had no other family history of genetic disease during the experimental data collection. The number of channels used to collect EEG signals was 23 in most experimental groups and 24 or 26 in a few experiments. For the convenience of statistical data, the present invention selects the data of 23 channels.
步骤(2),计算优化的多维样本熵。在EEG信号特征提取上运用多维样本熵的方法,采用23道脑电信号联合计算,每道信号有N个采样点,构成一个23×N的矩阵。由于计算量过大,对其进行优化。首先采用移动窗口的方法,减少数据长度来加快计算,根据现有文献窗口大小定为5秒。其次从样本熵的定义来看,在逐点比较期间存在计算重复,并且在计算样本熵时总是存在循环,这些循环合并,可去掉大量重复计算,提高运行速度。所以优化的多维样本熵计算步骤如下:Step (2), calculate the optimized multi-dimensional sample entropy. In the feature extraction of EEG signal, the method of multi-dimensional sample entropy is used, and 23 EEG signals are used for joint calculation. Each signal has N sampling points, forming a 23×N matrix. Optimize it due to excessive computation. First, the method of moving the window is adopted to reduce the data length to speed up the calculation. According to the existing literature, the window size is set to 5 seconds. Secondly, from the definition of sample entropy, there are calculation repetitions during the point-by-point comparison, and there are always loops when calculating sample entropy. These loops can be combined to remove a large number of repeated calculations and improve the running speed. Therefore, the optimized multi-dimensional sample entropy calculation steps are as follows:
首先要构造多维向量。优化的多维样本熵计算的原始数据为k道EEG信号,每道信号有N个采样点,m为嵌入维。本发明中选择的EEG数据皆为23通道,所以k=23,每条通道采集的EEG信号有n个采样点,第一道信号的采样点为x11、x12、x13、...、x1n,第二道信号的采样点为x21、x22、x23、...、x2n,以此类推,第k道信号的采样点为xk1、xk2、xk3、...、xkn。提取每道信号第a个采样点,得到一个多维向量Q(a)=(x1a,x2a,x3a,...,xka)。嵌入维取m=2,所以定义点X(a)=[Q(a),Q(a+1)]。The first thing to do is to construct a multidimensional vector. The original data of the optimized multi-dimensional sample entropy calculation are k-channel EEG signals, each signal has N sampling points, and m is the embedding dimension. The EEG data selected in the present invention are all 23 channels, so k=23, the EEG signal collected by each channel has n sampling points, and the sampling points of the first signal are x 11 , x 12 , x 13 , ... , x 1n , the sampling points of the second signal are x 21 , x 22 , x 23 , ..., x 2n , and so on, the sampling points of the k-th signal are x k1 , x k2 , x k3 , . .., x kn . Extract the a-th sampling point of each signal to obtain a multi-dimensional vector Q(a)=(x 1a , x 2a , x 3a ,...,x ka ). The embedding dimension takes m=2, so the definition point X(a)=[Q(a), Q(a+1)].
计算Q(a)和Q(a+1)之间的距离D[Q(a),Q(a+1)],由于Q(a)是一个多维向量,所以本文定义Calculate the distance D[Q(a), Q(a+1)] between Q(a) and Q(a+1), since Q(a) is a multidimensional vector, this paper defines
其中OD为欧氏距离。将计算所得的距离全部存入一个表中,以避免下次循环重复计算。where O D is the Euclidean distance. All the calculated distances are stored in a table to avoid repeated calculation in the next cycle.
m=2时,X(a)=[Q(a),Q(a+1)],X(a+1)=[Q(a+1),Q(a+2)],从表中取D[Q(a),Q(a+1)]和D[Q(a+1),Q(a+2)],取较大者作为X(a)和X(a+1)间的距离。When m=2, X(a)=[Q(a), Q(a+1)], X(a+1)=[Q(a+1), Q(a+2)], from the table Take D[Q(a), Q(a+1)] and D[Q(a+1), Q(a+2)], take the larger one as the difference between X(a) and X(a+1) the distance.
设相似容限R,计算小于R的距离个数x1,Set the similarity tolerance R, calculate the number of distances less than R x 1 ,
计算所有的平均值calculate all average of
m=3时,X(a)=[Q(a),Q(a+1),Q(a+2)],X(a+1)=[Q(a+1),Q(a+2),Q(a+3)]从表When m=3, X(a)=[Q(a), Q(a+1), Q(a+2)], X(a+1)=[Q(a+1), Q(a+ 2), Q(a+3)] from the table
中取D[Q(a),Q(a+1)]、D[Q(a+1),Q(a+2)]和D[Q(a+2),Q(a+3)],取最大者作为X(a)和X(a+1)间的距离。Take D[Q(a), Q(a+1)], D[Q(a+1), Q(a+2)] and D[Q(a+2), Q(a+3)] , take the largest one as the distance between X(a) and X(a+1).
设相似容限R,计算小于R的距离个数x2,Set the similarity tolerance R, calculate the number of distances less than R x 2 ,
计算所有的平均值calculate all average of
计算样本熵SampEn=-ln[Bm+1(R)/Bm(R)]。Calculate the sample entropy SampEn=-ln[Bm +1 (R) / Bm(R)].
为了比较样本熵和多维样本熵之间的性能差异,选择了13例患者。在癫痫发作前后,每个患者的样本熵和多维样本熵均以相同的EEG数据间隔进行计算。从图3(a)、(b)可以看出癫痫发作时样本熵的值趋于增加,但是癫痫发作前后的差异仍然不明显;而癫痫发作时多维样本熵值也呈现增加的趋势,并且癫痫发作前后多维样本熵值的差异比样本熵值更明显。如表1所示,多维样本熵的准确性(ACC),召回率,特异性(SPC)和阳性预测值(PPV)均高于样本熵,显示了更优的性能。To compare performance differences between sample entropy and multidimensional sample entropy, 13 patients were selected. Both sample entropy and multidimensional sample entropy for each patient were calculated at the same interval of EEG data before and after seizures. From Figure 3(a), (b), it can be seen that the value of sample entropy tends to increase during epileptic seizures, but the difference before and after seizures is still not obvious; and the multidimensional sample entropy values also show an increasing trend during epileptic seizures, and epilepsy The differences of multidimensional sample entropy values before and after seizure were more obvious than the sample entropy values. As shown in Table 1, the accuracy (ACC), recall, specificity (SPC) and positive predictive value (PPV) of multi-dimensional sample entropy are all higher than sample entropy, showing better performance.
表1样本熵和多维样本熵的性能比较Table 1. Performance comparison of sample entropy and multidimensional sample entropy
为了对比发现优化的多维样本熵在计算效率上的优势,截取了五组采样点为256、512、1024、2048和4096的EEG信号。分别计算每个片段的多维样本熵和优化的多维样本熵,并记录所需的时间。表2列出了计算样本熵和优化的多维样本熵的平均时间。可以看出,优化算法减少了计算时间。图4显示了计算时间随信号长度改变的曲线,随着信号长度的增加,优化的多维样本熵在计算效率方面的优势更加突出,因此也更适合临床诊断。In order to compare the advantages of the optimized multi-dimensional sample entropy in terms of computational efficiency, five sets of EEG signals with sampling points of 256, 512, 1024, 2048 and 4096 were intercepted. Calculate the multidimensional sample entropy and the optimized multidimensional sample entropy for each segment separately, and record the time required. Table 2 lists the average time to compute the sample entropy and the optimized multidimensional sample entropy. It can be seen that the optimization algorithm reduces the computation time. Figure 4 shows the curve of computation time as a function of signal length. With the increase of signal length, the optimized multi-dimensional sample entropy has more prominent advantages in terms of computational efficiency and is therefore more suitable for clinical diagnosis.
表2多维样本熵与优化的多维样本熵之间的计算时间比较Table 2 Computational time comparison between multidimensional sample entropy and optimized multidimensional sample entropy
步骤(3),根据优化的多维样本熵,用Bi-LSTM进行癫痫发作信号检测。将当前时刻之前计算得到的优化多维样本熵作为Bi-LSTM的输入,利用Bi-LSTM预测时间序列的功能,输出预测的接下来的多维样本熵。再通过Bi-LSTM的分类功能把预测的多维样本熵分为两类,即发作期和正常期。Step (3), according to the optimized multi-dimensional sample entropy, use Bi-LSTM to detect epileptic seizure signals. The optimized multi-dimensional sample entropy calculated before the current moment is used as the input of Bi-LSTM, and the function of Bi-LSTM to predict time series is used to output the predicted next multi-dimensional sample entropy. Then, the predicted multi-dimensional sample entropy is divided into two categories through the classification function of Bi-LSTM, namely the seizure period and the normal period.
有两种更新Bi-LSTM网络状态的方法。一个是使用预测值来更新预测的网络状态,并将先前的预测值用作函数的输入;另一个是使用观测值来更新预测的网络状态,并使用上一时刻的观测值来预测下一时刻。用RMSE来计算观察值与真实值之间的偏差,如图5(a)、(b)所示,当使用观察值更新网络状态时,预测结果更准确。所以本发明使用观测值来更新Bi-LSTM网络状态,并使用“Adam”优化器进行了250轮训练。为了防止梯度爆炸,将梯度阈值设置为1。将初始学习率指定为0.05,并在125轮训练后乘以0.2来降低学习率。如果学习率太小,收敛速度将非常慢;如果太大,则损失函数将振荡,甚至偏离最小值。因此,首先设置较大的学习速率,并且当两次迭代之间的变化低于阈值时,学习速率将降低。There are two ways to update the state of the Bi-LSTM network. One is to use the predicted value to update the predicted network state and use the previous predicted value as the input to the function; the other is to use the observed value to update the predicted network state and use the previous moment's observation to predict the next moment. . RMSE is used to calculate the deviation between the observed value and the true value, as shown in Fig. 5(a), (b), when the network state is updated with the observed value, the prediction result is more accurate. So the present invention uses the observations to update the Bi-LSTM network state, and uses the "Adam" optimizer for 250 rounds of training. To prevent exploding gradients, set the gradient threshold to 1. Specify the initial learning rate as 0.05, and reduce the learning rate by multiplying by 0.2 after 125 epochs of training. If the learning rate is too small, the convergence rate will be very slow; if it is too large, the loss function will oscillate and even deviate from the minimum value. Therefore, a large learning rate is set first, and when the change between iterations is below a threshold, the learning rate will decrease.
图6显示了预测时间分别为2分钟、5分钟和10分钟的RMSE,可以看出随着预测时间的增加,RMSE也逐渐增加。这表明预测时间越长,误差越大。由于没有足够的时间来预防或控制癫痫发作,因此在癫痫发作前2分钟(干预时间)内产生的警报可以被忽略。结合多维样本熵和RMSE的值,将本发明的预测时间选择为5分钟。Figure 6 shows the RMSE for the prediction time of 2 minutes, 5 minutes and 10 minutes, and it can be seen that as the prediction time increases, the RMSE also increases gradually. This shows that the longer the prediction time, the larger the error. Since there is not enough time to prevent or control seizures, alerts generated within 2 minutes before the seizure (intervention time) can be ignored. Combined with the values of multidimensional sample entropy and RMSE, the prediction time of the present invention is chosen to be 5 minutes.
在这项研究中,提出了一种新的特征多维样本熵用于区分癫痫发作状态和正常状态,并提出了一种用Bi-LSTM来预测癫痫发作的方法。首先从23道脑电信号中提取了多维样本熵的特征,并对算法进行了优化以提高计算效率。然后用Bi-LSTM预测接下来的多维样本熵。再对预测的多维样本熵进行分类,以确定癫痫是否将要发作。该方法取得了良好的结果,具有较高的准确率和较低的误报率,使医生以及患者有更充分的时间采取应对措施。In this study, a novel feature multidimensional sample entropy is proposed for distinguishing seizure states from normal states, and a method for predicting seizures with Bi-LSTM is proposed. Firstly, the features of multi-dimensional sample entropy are extracted from 23 EEG signals, and the algorithm is optimized to improve computational efficiency. Then use Bi-LSTM to predict the entropy of the next multi-dimensional samples. The predicted multidimensional sample entropy is then classified to determine whether an epilepsy is about to occur. The method achieved good results, with high accuracy and low false positive rate, giving doctors and patients more time to respond.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010637325.6A CN111870241B (en) | 2020-07-03 | 2020-07-03 | Epileptic seizure signal detection method based on optimized multidimensional sample entropy |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010637325.6A CN111870241B (en) | 2020-07-03 | 2020-07-03 | Epileptic seizure signal detection method based on optimized multidimensional sample entropy |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111870241A CN111870241A (en) | 2020-11-03 |
CN111870241B true CN111870241B (en) | 2022-05-17 |
Family
ID=73150007
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010637325.6A Active CN111870241B (en) | 2020-07-03 | 2020-07-03 | Epileptic seizure signal detection method based on optimized multidimensional sample entropy |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111870241B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112613423B (en) * | 2020-12-26 | 2024-06-25 | 北京工业大学 | Epileptic brain electrical signal identification method based on machine learning |
CN113288172A (en) * | 2021-05-24 | 2021-08-24 | 山东师范大学 | Epilepsia electroencephalogram signal identification method and system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102831288A (en) * | 2011-06-17 | 2012-12-19 | 财团法人工业技术研究院 | Physiological parameter index operation system and method |
CN105249962A (en) * | 2015-11-03 | 2016-01-20 | 北京联合大学 | Scalp electroencephalogram (EEG) retrospective epileptic seizure point detection method and system |
CN106156737A (en) * | 2016-07-05 | 2016-11-23 | 北京工业大学 | The computational methods of timed sample sequence entropy based on two-dimensional space and system |
CN110292376A (en) * | 2018-03-22 | 2019-10-01 | 深圳先进技术研究院 | Remove method, apparatus, equipment and the storage medium of eye electricity artefact in EEG signals |
CN110432898A (en) * | 2019-07-04 | 2019-11-12 | 北京大学 | A kind of epileptic attack eeg signal classification system based on Nonlinear Dynamical Characteristics |
CN111122162A (en) * | 2019-12-25 | 2020-05-08 | 杭州电子科技大学 | Industrial system fault detection method based on Euclidean distance multi-scale fuzzy sample entropy |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10368792B2 (en) * | 2015-06-02 | 2019-08-06 | The Charles Stark Draper Laboratory Inc. | Method for detecting deception and predicting interviewer accuracy in investigative interviewing using interviewer, interviewee and dyadic physiological and behavioral measurements |
EP3856016A4 (en) * | 2018-09-24 | 2022-06-15 | Sotera Wireless, Inc. | Method and system for monitoring a patient for atrial fibrillation and/or asystole |
-
2020
- 2020-07-03 CN CN202010637325.6A patent/CN111870241B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102831288A (en) * | 2011-06-17 | 2012-12-19 | 财团法人工业技术研究院 | Physiological parameter index operation system and method |
CN105249962A (en) * | 2015-11-03 | 2016-01-20 | 北京联合大学 | Scalp electroencephalogram (EEG) retrospective epileptic seizure point detection method and system |
CN106156737A (en) * | 2016-07-05 | 2016-11-23 | 北京工业大学 | The computational methods of timed sample sequence entropy based on two-dimensional space and system |
CN110292376A (en) * | 2018-03-22 | 2019-10-01 | 深圳先进技术研究院 | Remove method, apparatus, equipment and the storage medium of eye electricity artefact in EEG signals |
CN110432898A (en) * | 2019-07-04 | 2019-11-12 | 北京大学 | A kind of epileptic attack eeg signal classification system based on Nonlinear Dynamical Characteristics |
CN111122162A (en) * | 2019-12-25 | 2020-05-08 | 杭州电子科技大学 | Industrial system fault detection method based on Euclidean distance multi-scale fuzzy sample entropy |
Non-Patent Citations (3)
Title |
---|
A Long Short-Term Memory deep learning network for the prediction of epileptic seizures using EEG signals;Κostas М. Tsiouris,等;《Computers in Biology and Medicine》;20180516;全文 * |
Automatic epileptic seizure detection in EEGs based on optimized sample entropy and extreme learning machine;Yuedong Song;《Journal of Neuroscience Methods》;20120710;全文 * |
Lower instantaneous entropy of heartbeat dynamics during seizures in untreated temporal lobe epilepsy;Riccardo Barbieri,等;《IEEE》;20160218;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111870241A (en) | 2020-11-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Zhang et al. | Epilepsy prediction through optimized multidimensional sample entropy and Bi-LSTM | |
Zhang et al. | Epileptic seizure detection based on bidirectional gated recurrent unit network | |
Acharya et al. | Automated diagnosis of epileptic EEG using entropies | |
Zandi et al. | Automated real-time epileptic seizure detection in scalp EEG recordings using an algorithm based on wavelet packet transform | |
CN110876626A (en) | Depression detection system based on optimal lead selection of multi-lead electroencephalogram | |
CN110432898A (en) | A kind of epileptic attack eeg signal classification system based on Nonlinear Dynamical Characteristics | |
CN107095669B (en) | A method and system for processing EEG signals of patients with epilepsy | |
KR102141185B1 (en) | A system of detecting epileptic seizure waveform based on coefficient in multi-frequency bands from electroencephalogram signals, using feature extraction method with probabilistic model and machine learning | |
Yu et al. | Epileptic seizure prediction using deep neural networks via transfer learning and multi-feature fusion | |
Li et al. | Patient-specific seizure prediction from electroencephalogram signal via multichannel feedback capsule network | |
CN112641451B (en) | Multi-scale residual error network sleep staging method and system based on single-channel electroencephalogram signal | |
CN111870241B (en) | Epileptic seizure signal detection method based on optimized multidimensional sample entropy | |
CN113974655A (en) | A method for predicting epileptic seizures based on EEG signals | |
CN112043252A (en) | Emotion recognition system and method based on respiratory component in pulse signal | |
CN106236027A (en) | Depressed crowd's decision method that a kind of brain electricity combines with temperature | |
CN115363531A (en) | Epilepsy detection system based on bimodal EEG signal information bottleneck | |
Tang et al. | Epileptic seizure detection based on path signature and Bi-LSTM network with attention mechanism | |
CN112704503B (en) | Electrocardiosignal noise processing method | |
Ji et al. | An intelligent diagnostic method of ECG signal based on Markov transition field and a ResNet | |
CN114081494B (en) | Depression state detecting system based on brain lateral reins signal | |
Göker | Welch spectral analysis and deep learning approach for diagnosing Alzheimer's disease from resting-state EEG recordings | |
Lahiri et al. | Analysis of ECG signal by chaos principle to help automatic diagnosis of myocardial infarction | |
Alrawashdeh et al. | Enhanced epileptic seizure diagnosis using EEG signals with support vector machine and bagging classifiers | |
Waqar et al. | Towards classifying epileptic seizures using entropy variants | |
Song et al. | Epileptic EEG signal analysis and identification based on nonlinear features |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |