Automatic seizure detection with different time delays using SDFT and time-domain feature extraction

2022-03-16 06:39AmalAbdulhussienAhmadAbdulSaddaaKamranIqbal
THE JOURNAL OF BIOMEDICAL RESEARCH 2022年1期

Amal S. Abdulhussien, Ahmad T. AbdulSaddaa, Kamran Iqbal

1Communication Technical Engineering College, Al-Furat Al-Awsat Technical University, Al-Najaf 54001, Iraq;

2Department of System Engineering, University of Arkansas at Little Rock, Little Rock, AR 72204, USA.

Abstract 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.

Keywords: EEG, seizure detection, machine learning, sliding discrete Fourier transform

Introduction

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]. Faustet 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 inTable 1.

Feature extraction

In this study, SDFT was used for feature extraction to convert signals to a frequency domain (Fig. 1A)viaa 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.

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 1 Details of the datasets

Fig. 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.

Table 2 Two cases used in this study

Sliding discrete Fourier transform

SDFT, introduced Jacobsen and Lyons, is a DSP method that requires fewer computations for real-time spectral analysis; the results are presented in a sampleby-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 signalx(n),n=0, 1, 2..., which is divided into the overlapping windows of sizeM. Letkbe the frequency-domain index in the range of 0≤k

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 withMsample delay for the forward output and one sample delay for the output, as shown inFig. 2.

Time-domain feature extraction

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 onesecond window (178 samples per window).

Fig. 2 The structure of the infinite impulse response filter used for calculating SDFT from the EEG signals. SDFT: sliding discrete Fourier transform; EEG: electroencephalogram.

Fig. 3 Time-domain feature extraction from the time-series signal with a one-second window.

Classifiers

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 nodejin the hidden layer was a function of sums by multiplying its input signals with weight[8].

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 inputoutput 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).

Prediction of performance indices

Three statistical parameters, namely, classification accuracy, sensitivity, and specificity, were calculated to measure the performance of the methods. These parameters are defined as follows:

Results

One of the most experimental applications of the proposed systems is shown inFig. 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.

The flowchart to program the simulation program is shown inFig. 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.

Recognition of cases A-E

Fig. 4 Structure of a feedforward net (i.e., neural network) used as a classifier with SDFT and six features extracted from the time domain. SDFT: sliding discrete Fourier transform.

Fig. 5 ANFIS model structure when SDFT and six features extracted from the time-series are input to ANFIS. ANFIS: adaptive network-based fuzzy inference system; SDFT: sliding discrete Fourier transform.

Fig. 6 The proposed automatic epileptic seizure detection and alert systems.

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. 8shows 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 domainviaSDFT. The neural network was used for classification(Fig. 1A).

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 inTable 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.

The values ofM, the delay for the sample input to the IIR, were chosen for the SDFT computation step and the accuracy was calculated for eachMvalue. InFig. 9, whenMis 35, the largest accuracy is obtained.

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 inTable 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 onesecond 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 inTable 4, and the rules used in ANFIS are shown inTable 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 onesecond delay and could detect the seizure immediately.

Fig. 7 The flow chart of seizure detection from Bonn data set when using delay feature extraction. SDFT: sliding discrete Fourier transform.

Fig. 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.

Table 3 A-E cases when feed-forward neural network with different 50% training and 50% testing samples selected randomly from data set

Fig. 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.

Recognition of cases ABCD-E

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) andM(the forward delay in the IIR filter value) had been changed many times (Fig. 10). The maximum accuracy was 96.9833% whenMwas 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 inTable 6.

Another method was used to extract six features from time-series signals (Fig. 1B). The results from all the methods are explained inTable 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 usedwith 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. InTable 7, the onesecond 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 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

Fig. 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.

Table 6 ABCD-E cases when feed-forward neural network with different 50% training and 50% testing samples selected randomly from data set

Discussion

In this study, a new method for real-time epileptic seizure detection through EEG signals was proposedviaSDFT, 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 postprocessing, 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 thatthe 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.

Table 7 Results calculated for ABCD-E cases when FFNN and neural fuzzy were used with one and zero second delay for feature calculation

Our results were compared with previous findings by using the same data set as shown inTable 8. Theaccuracy obtained in our work was higher with a onesecond delay.

Table 8 Comparative analysis with previous works

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.