Amal S. Abdulhussien, Ahmad T. AbdulSaddaa, Kamran Iqbal. Automatic seizure detection with different time delays using SDFT and time-domain feature extraction[J]. The Journal of Biomedical Research, 2022, 36(1): 48-57. DOI: 10.7555/JBR.36.20210124
Citation:
Amal S. Abdulhussien, Ahmad T. AbdulSaddaa, Kamran Iqbal. Automatic seizure detection with different time delays using SDFT and time-domain feature extraction[J]. The Journal of Biomedical Research, 2022, 36(1): 48-57. DOI: 10.7555/JBR.36.20210124
Amal S. Abdulhussien, Ahmad T. AbdulSaddaa, Kamran Iqbal. Automatic seizure detection with different time delays using SDFT and time-domain feature extraction[J]. The Journal of Biomedical Research, 2022, 36(1): 48-57. DOI: 10.7555/JBR.36.20210124
Citation:
Amal S. Abdulhussien, Ahmad T. AbdulSaddaa, Kamran Iqbal. Automatic seizure detection with different time delays using SDFT and time-domain feature extraction[J]. The Journal of Biomedical Research, 2022, 36(1): 48-57. DOI: 10.7555/JBR.36.20210124
Automatic seizure detection is important for fast detection of the seizure because the way that the expert denotes and searches for seizure in the long signal takes time. The most common way to detect seizures automatically is to use an electroencephalogram (EEG). Many studies have used feature extraction that needs time for calculation. In this study, sliding discrete Fourier transform (SDFT) was applied for conversion to a frequency domain without using a window, which was compared with using window for feature selection. SDFT was calculated for each time series sample directly without any delay by using a simple infinite impulse response (IIR) structure. The EEG database of Bonn University was used to test the proposed method, and two cases were defined to examine a two-classifier feedforward neural network and an adaptive network-based fuzzy inference system. Results revealed that the maximum accuracies were 93% without delay and 99.8% with a one-second delay. This delay accrued because the average was taken for the results with a one-second window.
Epilepsy is a dangerous disease that may affect humans of all ages. Approximately two million people are diagnosed with epilepsy every year worldwide[1]. Several automatic approaches have been proposed for the diagnosis of epileptic disorder[2–3]. Most automatic seizure detection methods involve feature extraction from electroencephalogram (EEG) signals[4–5] and intracranial electroencephalography (iEEG)[6–7]. Many types of features are used; for instance, statistical values are extracted from the time domain of EEG signals[8]. Other studies have performed Fourier spectral analysis to derive EEG signals[9]. A typical short-time Fourier transform (STFT) method has been developed; in STFT, a window can change in time to measure the spectral density of EEG signals[10–11]. For EEG signal processing, wavelet transform approaches for time-frequency estimation is typically desirable. For example, the discrete wavelet transform (DWT) technique is a classical method of time-frequency analysis similar to short-time Fourier transform, and it has been used to derive features from EEG signals[12–13]. Faust et al[14] applied the DWT-based EEG de-noising method and feature extraction to identify seizures and diagnose epilepsy. They revealed that the wavelet approach is an efficient method for automatic diagnosis of epilepsy by using EEG signals. Recent studies have focused on developing real-time automated seizure detection[15–20]. Many studies have used features that need time delay for feature extraction. In this study, sliding discrete Fourier transform (SDFT) is used to convert signals to a frequency domain without any delay because this method does not need a window for conversion; it can be implemented by infinite impulse response (IIR), which is a simple component, two adders and one multiplication[21]. The output rate of SDFT is equal to the input rate, where SDFT is calculated for each input sample with simple components. Feed-forward neural network (FFNN) and adaptive network-based fuzzy inference system (ANFIS) are used as classifiers. The result shows that this method has good accuracy without delay for classification, and the accuracy is higher with a one-second delay. This study is important for an application that needs fast seizure detection.
In the present report, the new approach fast and simple component method (SDFT) used to convert the iEEG time-domain signals to frequency domain as a feature used with the time-domain features extraction for seizure detection and compare the accuracy achieved for different time delays.
Materials and methods
The automatic seizure detection system has two main steps for feature extraction to enable faster and effective seizure detection and flows by the classifiers. The data sets used in this study are described in the following section.
Data sets
Five data sets (A, B, C, D, and E) were used in this study. They were downloaded from the website of the School of Information and Computer Sciences University of California, Irvine, and the original signals were taken from the University Hospital of Bonn and had been used by many researchers[22–23]. Each data set consisted of 100 signals; each signal was divided into 23 chunks, so the total number of chunks was 11 500. Each chunk contained 179 values, and 178 was the value of EEG signal, so the data sets had 2 047 000 values; the last one (179) was devoted to the chunk type. Data sets A and B were measured from the surface of the scalp when the healthy persons had their eyes open (A) or closed (B). C, D, and E were measured through an inter-racial electrode for actual and interracial elliptic activities: C was recorded based on the EEG activity from a healthy brain area, D was obtained from the area where the tumor was located, and E was determined based on seizure activities[24]. The details about the data are presented in Table 1.
In this study, SDFT was used for feature extraction to convert signals to a frequency domain (Fig. 1A) via a two-time resolution. No window for the classifier output was set, so this case had no delay, and postprocessing was not required. In the second resolution, a one-second window was set as the duration to calculate the average of one second of the classifier output as postprocessing. Another scheme involved SDFT and six time-domain extracted features (variance, number of local maxima and local minimum, and first and second derivatives with zero crossing), which were used as the input to the classifier (Fig. 1B). Two classifiers were used in this study. The FFNN with Levenberg-Marquardt optimization was utilized as the first and second classifiers by using ANFIS.
Figure
1.
Two systems implemented in this study.
A: SDFT used for feature extraction. B: Six time-domain features extracted from the time series of electroencephalogram signal used with SDFT as feature extraction. SDFT: sliding discrete Fourier transform; FFNN: feed-forward neural network; ANFIS: adaptive network-based fuzzy inference system.
The training data set for the neural network included the first 5750 chunks from the data set, and the remaining data set comprised the last 5750 chunks used to test the system and each chunk contained 178 values. Two cases were investigated to classify A, which was a normal signal with patients who had their eyes opened, and E, which was a seizure signal. The second case was classified between seizure signal E and the other signals (A, B, C, and D, Table 2).
Table
2.
Two cases used in this study
Case
Description
No. of values
A-E
Detecting seizure from seizure signals and normal signals with open eyes
SDFT, introduced Jacobsen and Lyons, is a DSP method that requires fewer computations for real-time spectral analysis; the results are presented in a sample-by-sample way, that is, the spectral bin output rate is equal to the input data rate[21]. In the SDFT scenario, the transform is computed on a fixed-length window of the signal. For example, in a complex input signal x (n), n=0, 1, 2..., which is divided into the overlapping windows of size M. Let k be the frequency-domain index in the range of 0≤k<M. Then, at the time index n, the kth bin of an M-point DFT is computed as follows[25]:
Xn(k)=∑M−1m=1x(ˆn+m)W−kmM,
(1)
where ˆn=n−M+1 and W−kmM=e−j2pi/M.
Equation 1 can be rewritten according to the circular shift property as follows:
Xn(k)=W−kmM[Xn−1(k)+x(n)−x(n−M)],
(2)
where Wk+MM=WkM.
In equation 2, SDFT are calculated depending on the input sample and the previous value of the output from the SDFT and the previous value of time series. This technique can be built by using a IIR filter with M sample delay for the forward output and one sample delay for the output, as shown in Fig. 2.
Figure
2.
The structure of the infinite impulse response filter used for calculating SDFT from the EEG signals.
In this study, some features were extracted from the time domain (Fig. 3). The extracted features were as follows: variance, first and second derivatives for the signal, zero-crossing for first and section derivatives and the number of local minimum and local maximum. This feature was calculated with a one-second window (178 samples per window).
Figure
3.
Time-domain feature extraction from the time-series signal with a one-second window.
Two classifiers were used in this study. The neural network (feedforward net) with Levenberg-Marquardt optimization was used as a first classifier and the second classifier was adaptive network-based fuzzy inference system ANFIS.
Neural network
The neural network (feedforward net) was used as a classifier with 20 nodes as a hidden layer (Fig. 4). In feedforward, each output from node j in the hidden layer was a function of sums by multiplying its input signals with weight[8].
Figure
4.
Structure of a feedforward net (i.e., neural network) used as a classifier with SDFT and six features extracted from the time domain.
Levenberg-Marquardt optimization method was used when it required minimization of non-linear function in the training schemes. The result from the system was presented in two values: zero for normal state and one for seizure state. The methods were built by using MATLAB R2012b.
Adaptive network-based fuzzy inference system
ANFIS is a network with five layers of a feedforward neural network possessing a supervised learning capability (Fig. 5). ANFIS depended on fuzzy if-then rules to generate the stipulated input-output pairs[26]. This study used FIS generated by training 100 epochs. In this study, one input was employed to ANFIS when the first method was used (Fig. 1A), and seven inputs were employed when the second method was used (Fig. 1B).
Figure
5.
ANFIS model structure when SDFT and six features extracted from the time-series are input to ANFIS.
Three statistical parameters, namely, classification accuracy, sensitivity, and specificity, were calculated to measure the performance of the methods. These parameters are defined as follows:
One of the most experimental applications of the proposed systems is shown in Fig. 6. The schematic diagram showed the main step to connect the simulation model with the Internet of Things (IoT) hardware design. The integrity of both the simulation and the hardware would create a computer monitoring health system giving the initial indication of the patient's abnormal state.
Figure
6.
The proposed automatic epileptic seizure detection and alert systems.
The flowchart to program the simulation program is shown in Fig. 7, which illustrates the main steps to do the programming. First, the training and testing of the target output should be prepared and the SDFT window parameters should be calculated. Then the test phase would be carried out to figure out the results.
Figure
7.
The flow chart of seizure detection from Bonn data set when using delay feature extraction.
In this case, 2141 seconds (381 098 samples) and 2459 seconds (437 702 samples) were selected for the training and testing stages. The training and testing samples were selected randomly from the data set. When FFNN was used as a classifier, the training signal was converted to the frequency domain through the SDFT method. Fig. 8 shows the time series value and the SDFT of this signal. The results from the SDFT were applied as an input to the neural network to train FFNN. In the testing phase, the test signals were also converted to the frequency domain via SDFT. The neural network was used for classification (Fig. 1A).
Figure
8.
Output through SDFT for the first 10 000 samples used in the test case, and the square region means seizure case.
A: Time domain. B: Frequency domain. SDFT: sliding discrete Fourier transform.
The training and testing phases repeated ten times for different training and testing samples which were randomly selected. The results from each training and testing data set are shown in Table 3. In this case, the average accuracy was about 92.5% with a variance of 0.0578 when without a window, and the accuracy was about 99.6747% when windows with one-second duration were used for the output to calculate the average.
Table
3.
A-E cases when feed-forward neural network with different 50% training and 50% testing samples selected randomly from data set
The values of M, the delay for the sample input to the IIR, were chosen for the SDFT computation step and the accuracy was calculated for each M value. In Fig. 9, when M is 35, the largest accuracy is obtained.
Figure
9.
A-E case classification accuracies when SDFT is applied to EEG signals before FFNN with different values of M, the forward delay in the IIR filter.
SDFT: sliding discrete Fourier transform; EEG: electroencephalogram; FFNN: feed-forward neural network; M: the forward delay in the IIR filter; IIR: infinite impulse response.
In the last method, an additional feature was extracted from EEG time-domain signals as additional information about seizure that was used as input to FFNN (Fig. 1B). The results from all the methods that were applied to A-E case are explained in Table 4. This result had a one-second time delay for seizure detection because the average one second of the classifier output was compared with the threshold value. For zero-delay seizure detection, the first method was used (Fig. 1A). The last method involved a one-second delay because it involved feature extraction with a one-second window (Fig. 1B). The comparison showed that the first method with one-second delay was more accurate than the method without a window. When the other six-time series feature extraction was used with SDFT, the accuracy slightly changed. Another classifier, ANFIS, was also applied, using the same methods (Fig. 1). The results of using ANFIS are explained in Table 4, and the rules used in ANFIS are shown in Table 5. When SDFT was used, the accuracy with one-second delay was 99.634%. When feature extraction from the time domain with SDFT was used, the accuracy was increased to 99.797%. SDFT improved the accuracy by using FFNN or ANFIS as a classifier with a one-second delay and could detect the seizure immediately.
Table
4.
A-E cases when FFNN and ANFIS used with one and zero second delay for feature calculation
Table
5.
Rules applied to cases in which ANFIS was used as a classifier
Methods
Rules
SDFT
1. If (in1 is in1cluster1) then (out1 is out1cluster1) (1) 2. If (in1 is in1cluster2) then (out1 is out1cluster2) (1)
SDFT with 6-time series features
1. If (in1 is in1cluster1) and (in2 is in2cluster1) and (in3 is in3cluster1) and (in4 is in4cluster1) and (in5 is in5cluster1) and (in6 is in6cluster1) and (in7 is in7cluster1) then (out1 is out1cluster1) (1) 2. If (in1 is in1cluster2) and (in2 is in2cluster2) and (in3 is in3cluster2) and (in4 is in4cluster2) and (in5 is in5cluster2) and (in6 is in6cluster2) and (in7 is in7cluster2) then (out1 is out1cluster2) (1)
In this case, 5750 seconds (1 023 500 samples for the training) and 5750 seconds (1 023 500 samples for the testing) were selected randomly for each experiment. When SDFT was used (Fig. 1A) and M (the forward delay in the IIR filter value) had been changed many times (Fig. 10). The maximum accuracy was 96.9833% when M was equal to 29. The same strategies were used in cases A-E and used with cases ABCD-E, where two methods were used. In this case, the EEG was converted to the frequency domain by using SDFT. Then, FFNN was used as a classifier. The results from ten experiments are shown in Table 6.
Figure
10.
ABCD-E classification accuracy when SDFT is applied to EEG signals before NN with different values of M, the forward delay in the IIR filter.
SDFT: sliding discrete Fourier transform; EEG: electroencephalogram; NN: neural network; M: the forward delay in the IIR filter; IIR: infinite impulse response.
Another method was used to extract six features from time-series signals (Fig. 1B). The results from all the methods are explained in Table 7. The results showed that the accuracies were 96.9833% and 96.9667% when they were used SDFT with FFNN and ANFIS respectively with one-second resolution. The accuracy was increased to 98.45% when the features extracted from the time domain were used with SDFT as input to FFNN. When ANFIS was used, the SDFT result was 96.9667%, which was increased to 98.37% when SDFT and the six time-series features were used. For the instantaneous seizure detection in E from other states (ABCD), the accuracy was higher than 93% for both classifiers. In Table 7, the one-second delay accrued because the length of the window had a one-second duration of the outputs of the classifiers and compared it with the threshold. The variance, zero crossings and number of local max and local min of features used in the third method were also calculated with the one-second duration.
Table
7.
Results calculated for ABCD-E cases when FFNN and neural fuzzy were used with one and zero second delay for feature calculation
In this study, a new method for real-time epileptic seizure detection through EEG signals was proposed via SDFT, a procedure of feature extraction with two types used as machine learning as a classifier neural network (feedforward net) with Levenberg-Marquardt optimization and ANFIS. The accuracies of the proposed algorithm were 99.67% and 99.63% for the data set for cases A-E. When FFNN and SDFT were used with a one-second delay, the delay for post-processing, the accuracies were 92.6628% and 92.6569% with nearly zero seconds for classification by the two classifiers. These results indicate that the accuracy increases by about 7% when this method used a one-second delay for seizure detection. For the ABCD-E case, when FFNN was used, the accuracy was about 96.98%. When ANFIS was used with a one-second delay, the accuracy was 96.9667%. For FFNN and ANFIS with a zero-second delay, the accuracy was 93.12%, which was increased by about 4% when the method had a one-second delay. In general, SDFT has a good accuracy of more than 90% with a zero-second delay. This work also shows that the accuracy was increased to 99.8373% with FFNN when the proposed method was compared with that of other features extracted from the time domain with a one-second delay.
Our results were compared with previous findings by using the same data set as shown in Table 8. The accuracy obtained in our work was higher with a one-second delay.
Future studies should increase the accuracy with a zero-second delay by using another feature extraction with a simple component, other classification methods, or optimized methods with FFNN classifiers to obtain an accuracy of more than 99% with a delay of about 0.5 seconds or less.
Al-Sharhan S, Bimba A. Adaptive multi-parent crossover GA for feature optimization in epileptic seizure identification[J]. Appl Soft Comput, 2019, 75: 575–587. doi: 10.1016/j.asoc.2018.11.012
[2]
Xie L, Deng Z, Xu P, et al. Generalized hidden-mapping transductive transfer learning for recognition of epileptic electroencephalogram signals[J]. IEEE Trans Cybernet, 2019, 49(6): 2200–2214. doi: 10.1109/TCYB.2018.2821764
[3]
Amin HU, Yusoff MZ, Ahmad RF. A novel approach based on wavelet analysis and arithmetic coding for automated detection and diagnosis of epileptic seizure in EEG signals using machine learning techniques[J]. Biomed Signal Process Control, 2020, 56: 101707. doi: 10.1016/j.bspc.2019.101707
[4]
Yang C, Deng Z, Choi KS, et al. Takagi-Sugeno-Kang transfer learning fuzzy logic system for the adaptive recognition of epileptic electroencephalogram signals[J]. IEEE Trans Fuzzy Syst, 2016, 24(5): 1079–1094. doi: 10.1109/TFUZZ.2015.2501438
[5]
Temko A, Thomas E, Marnane W, et al. EEG-based neonatal seizure detection with Support Vector Machines[J]. Clin Neurophysiol, 2011, 122(3): 464–473. doi: 10.1016/j.clinph.2010.06.034
[6]
Zhou W, Liu Y, Yuan Q, et al. Epileptic seizure detection using lacunarity and Bayesian linear discriminant analysis in intracranial EEG[J]. IEEE Trans Biomed Eng, 2013, 60(12): 3375–3381. doi: 10.1109/TBME.2013.2254486
[7]
De Cooman T, Varon C, Hunyadi B, et al. Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG[J]. Int J Neural Syst, 2017, 27(7): 1750022. doi: 10.1142/S0129065717500228
[8]
Guo L, Rivero D, Dorado J, et al. Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks[J]. J Neurosci Methods, 2010, 191(1): 101–109. doi: 10.1016/j.jneumeth.2010.05.020
[9]
Pachori RB, Patidar S. Epileptic seizure classification in EEG signals using second-order difference plot of intrinsic mode functions[J]. Comput Methods Programs Biomed, 2014, 113(2): 494–502. doi: 10.1016/j.cmpb.2013.11.014
[10]
Tzallas AT, Tsipouras MG, Fotiadis DI. Epileptic seizure detection in EEGs using time-frequency analysis[J]. IEEE Trans Inform Technol Biomed, 2009, 13(5): 703–710. doi: 10.1109/TITB.2009.2017939
[11]
Fu K, Qu J, Chai Y, et al. Classification of seizure based on the time-frequency image of EEG signals using HHT and SVM[J]. Biomed Signal Process Control, 2014, 13: 15–22. doi: 10.1016/j.bspc.2014.03.007
[12]
Alickovic E, Kevric J, Subasi A. Performance evaluation of empirical mode decomposition, discrete wavelet transform, and wavelet packed decomposition for automated epileptic seizure detection and prediction[J]. Biomed Signal Process Control, 2018, 39: 94–102. doi: 10.1016/j.bspc.2017.07.022
[13]
Das AB, Bhuiyan MIH, Alam SMS. Classification of EEG signals using normal inverse Gaussian parameters in the dual-tree complex wavelet transform domain for seizure detection[J]. Signal Image Video Process, 2016, 10(2): 259–266. doi: 10.1007/s11760-014-0736-2
[14]
Faust O, Acharya UR, Adeli H, et al. Wavelet-based EEG processing for computer-aided seizure detection and epilepsy diagnosis[J]. Seizure, 2015, 26: 56–64. doi: 10.1016/j.seizure.2015.01.012
[15]
Bomela W, Wang S, Chou CA, et al. Real-time inference and detection of disruptive EEG networks for epileptic seizures[J]. Sci Rep, 2020, 10(1): 8653. doi: 10.1038/s41598-020-65401-6
[16]
Hanosh O, Ansari R, Younis K, et al. Real-time epileptic seizure detection during sleep using passive infrared sensors[J]. IEEE Sens J, 2019, 19(15): 6467–6476. doi: 10.1109/JSEN.2019.2907664
[17]
Archana MS, Ammu K, Bhuvaneshwari S, et al. Real-time IoT framework for epileptic seizures detection and alert system[J]. Int J Res Advent Technol, 2019, 7(3): 1615–1616. doi: 10.32622/ijrat.732019134
[18]
Tian X, Deng Z, Ying W, et al. Deep multi-view feature learning for EEG-based epileptic seizure detection[J]. IEEE Trans Neural Syst Rehabil Eng, 2019, 27(10): 1962–1972. doi: 10.1109/TNSRE.2019.2940485
[19]
Achilles F, Tombari F, Belagiannis V, et al. Convolutional neural networks for real-time epileptic seizure detection[J]. Comput Methods Biomech Biomed Eng Imaging Vis, 2018, 6(3): 264–269. doi: 10.1080/21681163.2016.1141062
[20]
Abdellatif AA, Mohamed A, Chiasserini CF. Automated class-based compression for real-time epileptic seizure detection[C]//2018 Wireless Telecommunications Symposium (WTS). Phoenix, AZ, USA: IEEE, 2018.
[21]
Jacobsen E, Lyons R. The sliding DFT[J]. IEEE Signal Process Mag, 2003, 20(2): 74–80. doi: 10.1109/MSP.2003.1184347
[22]
Murugavel ASM, Ramakrishnan S. Hierarchical multi-class SVM with ELM kernel for epileptic EEG signal classification[J]. Med Biol Eng Comput, 2016, 54(1): 149–161. doi: 10.1007/s11517-015-1351-2
[23]
Dattaprasad T, Veena D, Rajashri K. An optimized design of seizure detection system using joint feature extraction of multichannel EEG signals[J]. J Biomed Res, 2020, 34(3): 191. doi: 10.7555/JBR.33.20190019
[24]
Andrzejak RG, Lehnertz K, Mormann F, et al. Indications of nonlinear deterministic and finite-dimensional structures in time series of brain electrical activity: dependence on recording region and brain state[J]. Phys Rev E, 2001, 64(6): 061907. doi: 10.1103/PhysRevE.64.061907
[25]
Park CS. Fast, accurate, and guaranteed stable sliding discrete Fourier transform [sp tips&tricks][J]. IEEE Signal Process Mag, 2015, 32(4): 145–156. doi: 10.1109/MSP.2015.2412144
Narang A, Batra B, Ahuja A, et al. Classification of EEG signals for epileptic seizures using Levenberg-Marquardt algorithm based Multilayer Perceptron Neural Network[J]. J Intellig Fuzzy Syst, 2018, 34(3): 1669–1677. doi: 10.3233/JIFS-169460
[28]
Hassan AR, Haque MA. Epilepsy and seizure detection using statistical features in the complete ensemble empirical mode decomposition domain[C]//TENCON 2015–2015 IEEE Region 10 Conference. Macao, China: IEEE, 2015.
Hassan AR, Subasi A. Automatic identification of epileptic seizures from EEG signals using linear programming boosting[J]. Comput Methods Prog Biomed, 2016, 136: 65–77. doi: 10.1016/j.cmpb.2016.08.013
[31]
Hassan AR, Siuly S, Zhang Y. Epileptic seizure detection in EEG signals using tunable-Q factor wavelet transform and bootstrap aggregating[J]. Comput Methods Progr Biomed, 2016, 137: 247–259. doi: 10.1016/j.cmpb.2016.09.008
[32]
Deng Z, Xu P, Xie L, et al. Transductive joint-knowledge-transfer TSK FS for recognition of epileptic EEG signals[J]. IEEE Trans Neural Syst Rehabil Eng, 2018, 26(8): 1481–1494. doi: 10.1109/TNSRE.2018.2850308
[33]
Hassan AR, Subasi A, Zhang Y. Epilepsy seizure detection using complete ensemble empirical mode decomposition with adaptive noise[J]. Knowledge-Based Syst, 2020, 191: 105333. doi: 10.1016/j.knosys.2019.105333
[34]
Tuncer T, Dogan S, Akbal E. A novel local senary pattern based epilepsy diagnosis system using EEG signals[J]. Australas Phys Eng Sci Med, 2019, 42(4): 939–948. doi: 10.1007/s13246-019-00794-x