Epilepsy & Behavior 45 (2015) 8–14

Contents lists available at ScienceDirect

Epilepsy & Behavior journal homepage: www.elsevier.com/locate/yebeh

Automatic seizure detection using Stockwell transform and boosting algorithm for long-term EEG Aiyu Yan a,b, Weidong Zhou a,b,⁎, Qi Yuan a,b, Shasha Yuan a,b, Qi Wu c, Xiuhe Zhao c, Jiwen Wang c a b c

School of Information Science and Engineering, Shandong University, Jinan 250100, China Suzhou Institute of Shandong University, Suzhou 215123, China Qilu Hospital, Shandong University, Jinan 250100, China

a r t i c l e

i n f o

Article history: Received 27 October 2014 Revised 24 January 2015 Accepted 9 February 2015 Available online xxxx Keywords: Electroencephalogram (EEG) Stockwell transform Seizure detection Power spectral density Boosting algorithm

a b s t r a c t Automatic detection of seizures has vital significance for epileptic diagnosis and can efficiently reduce the workload of the medical staff. In this study, a novel seizure detection method based on Stockwell transform is proposed for intracranial long-term EEG data. The Stockwell transform is employed to obtain the time–frequency representation of the EEG signals, and then the power spectral density is calculated in the time–frequency plane to characterize the behavior of EEG recordings. After that, a classifier based on gradient boosting algorithm is used to make the classification. Finally, the postprocessing is utilized on the outputs of the classifier to obtain more stable and accurate detection results, which includes Kalman filter, threshold judgment, and collar technique. The performance of this method is assessed on the publicly available EEG database which contains approximately 533 h of intracranial EEG recordings. The experimental results indicate that the proposed method can achieve a satisfactory sensitivity of 94.26%, a specificity of 96.34%, as well as a very short delay time of 0.56 s. © 2015 Elsevier Inc. All rights reserved.

1. Introduction Epilepsy is a chronic disorder characterized by the recurrence of sudden brain function disturbances [1]. Seizures arise from hypersynchronous neuronal networks [2] and may be accompanied by alterations of consciousness, sensation, cognition, and movement [3]. Electroencephalogram (EEG) reflects the electrical activity of the brain and contains a mass of physiological and pathological information [4]. Electroencephalogram plays an important role in the diagnosis of epilepsy, such as determining the epileptogenic zone for presurgical evaluations. At present, EEG recordings are visually checked by trained neurologists, and checking the recordings is a time-consuming task because of the massive amounts of EEG data [5,6]. Therefore, automatic seizure detection is valuable for aiding neurologists to inspect EEG recordings and could also provide solutions for closed-loop seizure control with electrical stimulation. Research on automatic seizure detection has been developed for several years. The first widely applicable technique of seizure detection was developed by Gotman in 1982 [7]. Later, this method was improved and applied to an extensive evaluation by Gotman [8] and Qu [9]. This technique has been comprehensively used in clinical application. Murro and King developed an automated seizure detection system

⁎ Corresponding author at: School of Information Science and Engineering, Shandong University, 27 Shanda Road, Jinan, China. Tel.: +86 531 88361551. E-mail address: [email protected] (W. Zhou).

http://dx.doi.org/10.1016/j.yebeh.2015.02.012 1525-5050/© 2015 Elsevier Inc. All rights reserved.

based on discriminant analysis of the EEG signal recorded from intracranial electrodes [10]. Gabor et al. proposed using wavelet transform to construct a filter to extract features of samples to train a neural network for classification [11]. Many techniques, such as time–frequency methods [12–14], artificial neural network methods [15–17], and machine learning methods [18,19], have also been proposed and applied for seizure detection. Since the EEG signal is nonstationary by its nature and has timevarying frequency content, the time–frequency analysis methods, such as short-time Fourier transform (STFT), wavelet transform (WT), and Wigner–Ville Distribution (WVD), have become powerful tools for analyzing EEG recordings. The short-time Fourier transform uses a fixed and moving window function to conduct Fourier transform on EEG signals [20,21]. However, the fixed time window causes a fixed time– frequency resolution, which is a limitation of STFT. Wavelet transform can decompose a signal into an infinite series of wavelet functions and has the characteristics of multiresolution analysis with high frequency resolution at low frequencies and high time resolution at high frequencies [22,23]. This provides us with a more precise assessment on the distribution of signal energy at different time and frequency scales [24]. Though the wavelet transform solves the limitations of the STFT, the relationship between local frequencies is missed at the same time. The Wigner–Ville Distribution is a special type of quasiprobability distribution introduced by Eugene Wigner in 1932 [25]. The WVD has a very good resolution but suffers from the presence of interference terms related to the nonlinear character of the transformation [26]. In this study, Stockwell transform (ST), a combination of STFT and WT, was employed

A. Yan et al. / Epilepsy & Behavior 45 (2015) 8–14

to obtain the EEG features in a time–frequency domain. Although there have been some studies using ST tools to analyze EEG signals, this is the first time they have been applied to automatic seizure detection [27,28]. Stockwell transform is a linear transform known for its local spectral phase properties. After the decomposition of EEG signals using Stockwell transform, the time–frequency plane is divided into 12 parts, and the power spectral density of each part is calculated as a feature to characterize the behavior of EEG signals. Artificial neural network (ANN) and support vector machine (SVM) have been used as classifiers for seizure detection. Artificial neural network is a self-adaptive and self-learning pattern classification method [29]. Support vector machine was first proposed by Cortes and Vapnik in 1995. It has many unique advantages in solving small samples and in nonlinear and high dimensional pattern recognition [30]. However, its arithmetic speed will be very slow if its sample size enlarges. Boosting approach is a kind of machine learning method and can establish a strong classifier from many weak classifiers [31–33]. Gradient boosting algorithm can build linear classification rules with only a small number of operations and significantly improves the computing speed, and it is employed to train the classifier for seizure detection in this work [34]. Moreover, Kalman filtering and collar technique are used as postprocessing in this system to further improve the performance of seizure detection. This paper is organized as follows. In Section 2, the EEG database used in this work is given, and the proposed seizure detection method is described in detail containing Stockwell transform, feature extraction, boosting classifier, and postprocessing. Results are shown in Section 3. A discussion of the results follows in Section 4. Finally, Section 5 concludes our work.

9

2.1.2. Testing data We used the rest of EEG data as the testing data for each patient. In order to test the false detection rate, approximately 24 h of interictal EEG recordings of each patient were also used in our experiment. In total, 23.65 h of EEG data containing 809 seizure epochs were chosen as the training dataset, and 49 h of EEG data containing 895 seizure epochs and 533.4 h of nonseizure comprised the testing dataset. The details of training data and testing data are summarized in Table 1. 2.2. Stockwell transform As EEG signals are nonstationary and as different spectra contain corresponding pathological information, analyzing the spectrum of normal and abnormal EEG signals is useful for epileptic seizure detection. The conventionally used time–frequency analysis approaches for EEG signals include short-time Fourier transform (STFT) and wavelet transform (WT). Stockwell transform is a time–frequency decomposition method that is gaining in popularity. Wavelet transform explores the local amplitude or power spectrum, while Stockwell transform synchronously probes these two aspects [36]. Actually, Stockwell transform can be considered as the development of continuous wavelet transform [37,38]. Because the continuous wavelet transform loses the phases information of signals, it is necessary to improve the CWT by including a phase factor. The Stockwell transform Sx(τ, f) of EEG signals x(t) is defined as follows: þ Z∞

Wx ðτ; dÞ ¼

xðt Þwðt−τ; dÞdt −∞ i2π f τ

Sx ðτ; f Þ ¼ e

ð1Þ

Wx ðτ; dÞ

2. Methods 2.1. EEG database The long-term intracranial EEG (IEEE) database used in this study comes from the Epilepsy Center of the University Hospital of Freiburg, Germany [35]. It contains intracranial EEGs from 21 patients with medically intractable epilepsy with 87 seizures. All the seizure onset and offset times were labeled by experienced EEG experts according to intracranial EEG recordings. In the 21 patients, there are eleven patients whose epileptic foci are located on neocortical brain structures, eight patients with a focus in the hippocampus, and the remaining two patients with seizures arising from both areas. The EEG recordings were collected by a Neurofile NT digital video-EEG system, whose sampling rate was 256 Hz with a 16-bit A/D converter. In order to gain high signal-to-noise ratio and fewer artifacts, intracranial grid, strip, and depth electrodes were used. For each of the 21 patients, there are two datasets called “ictal” and “interictal”, respectively. The former dataset contains 2–5 h of EEG signals including seizure events. The latter dataset contains approximately 24 h of nonseizure EEG signals. Six EEG contacts were selected by epileptologists, three (channels 1, 2, and 3) in the region of the seizure focus, and the other three (channels 4, 5, and 6) away from the seizure focus. In this study, we chose the EEG data from the focal areas, which contain more pathological information. 2.1.1. Training data In this work, the raw long-term EEG data were segmented into 4-second epochs, with each epoch containing 1024 points. For each patient, we chose EEG signals containing seizure events and utilized the parts of seizures labeled by EEG experts as the training data. In addition, one-hour nonseizure data were also selected to train the classifier. All the seizure and nonseizure epochs in the training database were chosen randomly from the seizure/nonseizure parts identified by the EEG experts.

where Wx(τ, d) is the wavelet transform of signal x(t) and the mother wavelet w(t, f) is chosen as follows: j f j −t2 f 2 −i2π f t wðt; f Þ ¼ pffiffiffiffiffiffi e 2 e 2π

ð2Þ

where factor d is the inverse of frequency f. By applying Eq. (2) to Eq. (1), we obtain the Stockwell transform Sx(τ, f) of signal x(t) shown as follows:

jf j Sx ðτ; f Þ ¼ pffiffiffiffiffiffi 2π

þ∞ Z



e

−ðτ−t Þ2 f 2 2

−2πift

e

xðt Þdt; τ; f ∈ R:

ð3Þ

−∞

The width of the Gaussian window in Eq. (3) is determined by the inverse of frequency f. The Gaussian window is wider at lower frequencies and narrower at higher frequencies. Hence, the window provides good frequency resolutions for low frequencies while providing good time resolutions for high frequencies. The Stockwell transform combines the advantages of STFT and WT, which makes it the ideal approach for analyzing EEG signals. Two epochs of normal and abnormal EEG signals and their Stockwell transform are shown in Figs. 1 and 2. Table 1 Collection of training data and testing data. Epochs

Nonseizures

Seizures

Total

Time (h)

Training Testing

20,480 523,264

809 895

21,289 524,159

23.65 582.40

10

A. Yan et al. / Epilepsy & Behavior 45 (2015) 8–14

Amplitude

(a) 4000 2000 0 -2000 -4000

(b)

0

0.5

1

1.5

2 Time/s

2.5

3

3.5

4

100 400

Frequency/Hz

80

300

60 40

200

20

100 0

0.5

1

1.5

2 Time/s

2.5

3

3.5

Fig. 1. The original signals of nonseizure data (a) and its Stockwell transform (b).

2.3. Feature extraction of EEG data One commonly used feature of EEG signals is the power spectral density. The power spectral density of a nonstationary signal based on S transform is defined as

seizures. We divide the timeline into 3 parts and the frequency line into 4 parts based on the δ wave (0.4–4 Hz), θ wave (4–8 Hz), α wave (8–12 Hz), and β wave (12–30 Hz) of EEG components, as shown in Fig. 3. 2.4. Gradient boosting algorithm

n o 2 SP x ðτ; f Þ ¼ E jSx ðτ; f Þj

ð4Þ

where Sx(τ, f) denotes the coefficients of S transform in the time– frequency plane. We can obtain a time–frequency distribution of one EEG epoch using the S transform. Since the frequency range of seizures mainly focuses on 3–30 Hz, the spectrum from 1 to 30 Hz is chosen to be analyzed. This range contains most of the information content of

Amplitude

(a)

4

1

Frequency/Hz

x 10

0.5 0 -0.5 -1

(b)

Gradient boosting is a kind of boosting algorithm. The main idea is to build a model based on a loss function. The loss function describes the degree of reliability of the model. The greater the loss function is, the more likely the model will become inaccurate. The best way to improve the model is to let the loss function decline at its gradient direction [34]. In this work, the gradient boosting algorithm is used to train the classifier. We denote the segmented EEG training data by W = {wi ∈ Rk, i =

0

0.5

1

1.5

2 Time/s

2.5

3

3.5

4

100

2000

80

1500

60 1000

40

500

20 0

0.5

1

1.5

2 Time/s

2.5

3

3.5

Fig. 2. The original signals of seizure data (a) and its Stockwell transform (b).

A. Yan et al. / Epilepsy & Behavior 45 (2015) 8–14

11

2.5. Postprocessing In this work, the seizure EEG segments are labeled as 1, while the nonseizure EEG segments are denoted by 0. However, the outputs of the boosting classifier are not equal to class labels, but rather a continuous decision variable. The variable always fluctuates around the class labels. In this study, Kalman filtering is applied to smooth the outputs of the boosting classifier. If yk denotes the raw continuous decision variable from the boosting classifier, a state space model of the Kalman filter [39,40] is defined as 8

Automatic seizure detection using Stockwell transform and boosting algorithm for long-term EEG.

Automatic detection of seizures has vital significance for epileptic diagnosis and can efficiently reduce the workload of the medical staff. In this s...
557KB Sizes 3 Downloads 8 Views