Abstract

This paper presents a patient-specific epileptic seizure predication method relying on the common spatial pattern- (CSP-) based feature extraction of scalp electroencephalogram (sEEG) signals. Multichannel EEG signals are traced and segmented into overlapping segments for both preictal and interictal intervals. The features extracted using CSP are used for training a linear discriminant analysis classifier, which is then employed in the testing phase. A leave-one-out cross-validation strategy is adopted in the experiments. The experimental results for seizure prediction obtained from the records of 24 patients from the CHB-MIT database reveal that the proposed predictor can achieve an average sensitivity of 0.89, an average false prediction rate of 0.39, and an average prediction time of 68.71 minutes using a 120-minute prediction horizon.

1. Introduction

Epilepsy is a brain disorder characterized by excessive, infrequent, and synchronous discharge of a large number of neurons [1] and affects 1% of the world’s population [2]. Epileptic seizure can be managed in two-thirds of the patients using prescription drugs, while another 8% can be cured using resected surgery. Seizures of about 25% of patients with epilepsy cannot be managed sufficiently by any available therapy [2, 3]. Therefore, the early anticipation of seizures could be very valuable for those patients, caregivers, or family members to save patients and others from possible hazards [4, 5]. An effective seizure prediction approach would improve the quality of patients’ daily lives. Electroencephalogram (EEG) is the most often used brain disorders’ diagnostic tool, specifically for epilepsy [6]. It is measuring the voltage fluctuations resulting from ionic current within the neurons of the brain through electrodes [7]. There are two types of EEGs: intracranial EEG (iEEG) and scalp EEG (sEEG). In iEEG, electrodes are placed directly on the exposed surface of the brain to record the electrical signals. However, in sEEG, the electrical signals are collected with electrodes placed on the scalp area according to certain placement specifications, such as the International 10-20 System.

Seizure prediction is based on the hypothesis that there exists a transition state (preictal) between the interictal (normal state) and the ictal state (seizure). There are numbers of clinical evidences that support this hypothesis. These evidences include increases in cerebral blood flow [8, 9], cerebral oxygenation [10], cortical excitability [11], highly significant blood-oxygen-level-dependent signal on fMRI studies [12], and variations in heart rate [13, 14]. Accordingly, researchers have invested a great deal of effort over the last decades on attempting to predict epileptic seizures based on iEEG and sEEG signals, where the latter are more convenient to apply clinically. Around forty years ago, Viglione and his colleagues presented the first attempt for seizure prediction [15, 16]. After that, many researchers published their attempts to predict epileptic seizures suing different methods.

Several time-domain techniques have been reported in the literature for seizure prediction [1722, 2224, 2439]. Transform methods [4054], attractor state analysis [55], and neural mass models [56] have been used for EEG seizure prediction. A comprehensive review of the most recently developed seizure prediction methods can be found in [2, 5759].

Common spatial pattern (CSP) is a feature extraction algorithm used in different applications, such as electromyography (EMG) signal separation [60], EEG signal analysis for motor imagery purposes [61, 62], and, more recently, seizure detection [6365]. The objective of this paper is to develop a patient-specific CSP-based seizure prediction algorithm for sEEG signals. The extracted feature using the CSP will be fed to a linear classifier to classify the epoch as either a preictal or interictal segment. Note that the data segment preceding the seizure onset is called the preictal interval and ranges from a few seconds to several hours long [38, 47, 54]. The performance of the proposed predictor is compared with the random and Poisson predictors and with existing sEEG-based prediction methods [17, 18, 28, 41, 45, 47, 48, 54, 55]. The results show that the proposed prediction method could be of potential value for early warnings for epileptic patients and/or their caregivers.

The remainder of the paper is organized as follows. The CSP mathematical formulation is discussed in Section 2. The data collection and seizure prediction approach are presented in Section 3. Section 4 presents the prediction performance metrics. The experimental results and comparisons with other existing seizure prediction algorithms are provided in Section 5. Finally, Section 6 offers concluding remarks.

2. Common Spatial Pattern (CSP)

CSP is a statistical method that was introduced to the field of EEG analysis by Koles et al. [66, 67] and is used to extract spatial filters for discriminating between two classes of EEG signals. In this work, the CSP method is used to distinguish between two classes, preictal and interictal EEG activities, by constructing a projection matrix, , that minimizes the variance for preictal activity and maximizes it for the other class. The following steps describe the mathematical formulation of the CSP approach [66, 67]:(1)Calculate the normalized covariance matrix for each data segment where is the number of channels, is the number of samples, and is the transpose operation.(2)Perform an averaging process on the covariance matrices of each class () to find two discriminated covariance matrices, (preictal state) and (interictal state), and then find the composed covariance matrix :(3)Decompose the composed matrix using singular value decomposition (SVD) to find the Eigenvalue matrix and normalized Eigenvector matrix :(4)Form a new matrix :to obtain the following two matrices: and share common eigenvectors. Hence, the sum of the corresponding Eigenvalues of the two matrices is always 1.(5)Apply the SVD to the matrices and as follows:Note that , where is the identity matrix, , and represent the matrix of eigenvectors and the diagonal matrix of Eigenvalues, respectively. The Eigenvalues are then sorted in descending order; thus, the CSP projection matrix is formulated as .

3. Materials and Methods

3.1. Clinical Data

In this work, long-term continuous multichannel sEEG recordings of 24 patients from a publicly available dataset (Children’s Hospital Boston [CHB-MIT] database [68]), which consists of sEEG recordings from pediatric subjects with intractable seizures, were used. Subjects were monitored for up to several days following withdrawal of antiseizure medication in order to characterize their seizures and assess their candidacy for surgical intervention. This data contains 987.85 hours, with 170 seizures. Each seizure onset is marked by an experienced electroencephalographer and corresponds to the onset of a rhythmic activity that is associated with a clinical seizure [11, 22, 2632]. The data is multichannel in nature, with 23 or 18 channels for each patient obtained by sampling at a rate of 256 Hz. The International 10-20 System of EEG electrode positions and nomenclature was used for these recordings. A summary of this dataset is presented in Table 1. The data is segmented into one-hour-long records. Records that do not contain seizure activity are referred to as nonseizure records, and those that contain one or more seizures are referred to as seizure records.

3.2. Seizure Prediction Approach

The block diagram of the proposed seizure prediction methodology is depicted in Figure 1. It is comprised of two main stages: feature extraction and classification. In the feature extraction stage, the multichannel signal is segmented and the CSP is used to extract the training and testing features. In the classification stage, a trained classifier is used to classify the incoming segment as a preictal or interictal segment.

3.2.1. CSP-Based Features Extraction Stage

First, the multichannel signal was segmented into overlapping epochs of length seconds (this value for was selected based on several trials). A sliding window was used for signal framing with an overlap of seconds between two successive segments. In this work, we extracted preictal training features from data intervals of 3, 5, and 10 minutes. Similar intervals have been considered in [38, 51, 52]. Based on literature, it has been reported that there are electrophysiological changes, which might develop minutes to hours before the actual seizure onset [38, 47, 54]. Therefore, the preictal training data could be selected from any of the following options:(i)Preictal-0: the preictal training interval ends right at the beginning of seizure onset.(ii)Preictal-60: the preictal training interval ends 60 minutes before seizure onset.(iii)Preictal-120: the preictal training interval ends 120 minutes before seizure onset.

Therefore, we used a sliding window of length 3 seconds to extract preictal features from four different preictal training intervals (3, 5, and 10 minutes), each of which could be located at three different distances with respect to seizure onset. Nonseizure hours were used for interictal training data.

The CSP algorithm was applied to each segment of size (number of channels × number of samples) by computing , where is a projection matrix of size . Following the approach of [69], the log of variance of each row of the resulting matrix was taken as a feature.

3.2.2. Classification Stage

In the classification stage, a linear discriminant analysis (LDA) classifier [70] was trained with preictal and interictal feature vectors. We used random undersampling strategy to balance the number of preictal and interictal segments in the training set [71, 72]. In the testing phase, the trained classifier was tasked to classify any incoming epoch as a preictal or interictal state. The classifier results were binary “1” for the preictal state and zero otherwise. A seventh-order median filter was used to smooth the results. The prediction alarm was raised if , where is consecutive “1 s” with a moving window of 1 second, is a patient-dependent threshold, and . The value of is obtained from the training dataset. The alarm is positive if it is within the prediction horizon; otherwise, it is a false alarm. In this study, three different prediction horizons were used: 60, 90, and 120 minutes, which are within the ranges used by other authors [18, 43, 47, 55]. We adopt a postictal interval of 10 minutes as in [43, 54]. Moreover, the alarms in the 10 minutes before or after a missing hour (when the patient’s data is not continuous) are not considered.

4. Performance Evaluation

The proposed predictor performance is evaluated by estimating the sensitivity, specificity, false prediction rate (FPR), and prediction time. In our development, the FPR is computed such that a patient has to wait until the end of prediction horizon to determine if a warning is false. The prediction time is defined as the time from the positive alarm to seizure onset. The sensitivity is the percentage of predicted seizures. A seizure is considered to have been predicted if there is at least one alarm before it within the prediction horizon. For estimating the specificity, we adopted the method of Wang et al. [43, 73], which considers the effect of the prediction horizon on prediction performance. The authors estimated the specificity (spec) by quantifying the portion of time during the normal interval that was not considered to be false waiting time (see (7) below). A normal interval starts from the end of the posthorizon of a seizure and ends at the beginning of the prediction horizon of the next seizure. The false waiting time is the time from a false alarm to the end of its horizon or the end of the current normal interval. A positive or false alarm occurring within another alarm horizon of the same type is considered to be one. where fwt is the length of the false waiting time and is the length of the normal interval. Figure 2 presents an example of estimating the sensitivity and specificity of six continuous hours using a prediction horizon of 60 minutes. The seizure has at least one alarm within the prediction horizon, so the sensitivity is 100%. The hours and hours yield a specificity of 50%.

We evaluate the performance of the proposed predictor with two random predictors: periodic predictor which raises an alarm at a fixed time period and Poisson predictor which gives an alarm according to an exponential distributed random time period with fixed mean . The two parameters and were determined to be the average length of interictal intervals for each patient, as presented in Table 1.

5. Experimental Results and Comparison

This section shows the results of the proposed seizure predictor’s and compares the predictor’s results with those of other sEEG-based algorithms. The proposed predictor was tested on the sEEG recordings of 24 epilepsy patients from the CHB-MIT database with a total of 987.85 hours containing 170 seizures (Table 1) and using three prediction horizons (60, 90, and 120 minutes). We adopted a leave-one-out strategy for evaluating the performance of the proposed approach in terms of each patient’s data. There were rounds for each patient with recordings. In each round, the data were divided into two sets: training segments obtained from recordings and testing segments obtained from the remaining one recordings. That is, we performed runs where in each run a new recording is used for testing and the remaining recordings are used for training. The dataset used for training is divided into 5 folds in the implementation of the leave-one-out cross-validation procedure. The best model parameters obtained from training are then applied to the initially excluded recording for testing. So, all the parameters estimated from the recordings during training remained unchanged during the evaluation on the remaining one recording. Then, the average of the results was computed.

5.1. Results

Tables 2, 3, and 4 present the results of the proposed seizure predictor for the 24 patients with the three horizons (60, 90, and 120 minutes) and preictal-0 with a preictal interval of 3 minutes and compares it against periodic and Poisson random predictors. The proposed predictor achieved a 1.00 prediction rate in most of the patients in all three prediction horizons. It achieved an average sensitivity of 0.89 and average FPR of 0.39 and an average prediction time of 68.71 minutes in the 120-minute horizon.

An example of predictor outcomes is shown in Figure 3, which represents the results of Patient 1 (hours 1–15) with a 60-minute prediction horizon (sliding one second) for preictal-0 and preictal intervals of 5 minutes. The seizure and postseizure are shown as the red area. The green area is the prediction horizon. The yellow area covers the unconsidered interval. The alarms are the magenta lines. The false alarms create false waiting times that are shown as light-blue areas.

For selecting the proper preictal interval length, we investigated four different sizes, 3, 5, and 10 minutes, with all prediction horizons. These intervals are segmented into 3 seconds with an overlap of 2 seconds in the training phase. Table 5 presents the overall average results of the different preictal sizes of the 24 patients with the three horizons. It shows that the best results in all three horizons were achieved when the preictal length was 3 minutes with an average sensitivity of 0.89, average prediction time of 68.71 minutes, and average FPR of 0.39. The FAR with a 10-minute preictal length was the highest while the FAR with a 5-minute preictal length was the lowest.

As stated previously, the preictal interval ranges from a few seconds to several hours preceding the seizure onset. In this work, we studied a selection of preictal intervals immediately preceding (preictal-0), 60 minutes before (preictal-60), and 120 minutes before (preictal-120) onset with an interval of 3 minutes. Table 6 shows that selecting the preictal intervals exactly before the onset (preictal-0) was the most suitable. Preictal-0/-60/-120 achieved average sensitivity of 0.81, 0.87, and 0.89, respectively, with the prediction horizon of 120 minutes. This is intuitively unsurprising, as going back from the seizure onset is most likely to have a smaller seizure activity signature.

5.2. Comparison with Existing sEEG-Based Method

A comparison of our method with previously published sEEG-based seizure prediction methods shows the effectiveness of the proposed method. However, the comparison must be interpreted correctly, as it is based on different datasets and prediction horizons. Table 7 shows a comparison of some of the previously published works with the proposed method. Zandi et al. [17] presented zero-crossing intervals-based seizure prediction algorithm that was tested on sEEG recordings of three patients provided by the EEG Department of Vancouver General Hospital (VGH) with a total of 15.5 hours, including 14 seizures and a prediction horizon of 30 minutes. Using three channels, their method yielded an average sensitivity of 85.71%, average false prediction rate of 0.12/h, and average prediction time of 20.8 minutes. However, when they used five channels, they obtained an average sensitivity of 71.43%, average false prediction rate of 0.06/h, and average prediction time of 18.9 minutes. In [18], Zandi et al. used the sEEG recordings of 20 patients with a total of 561.3 hours, including 86 seizures from two databases (Vancouver General Hospital [VGH] and CHB-MIT [Patients , , and ]). They reported an average sensitivity of 88.34%, average false prediction rate of 0.155/h, and average prediction time of 22.5 minutes with a prediction horizon of 40 minutes. Chiang et al. [41] applied their method to the sEEG recordings of eight patients, seven of which were from the CHB-MIT database (Patients 1, 3, 6, 7, 9, 10, and 22) and one of which was from the National Taiwan University Hospital (NTUH) database, resulting in an average sensitivity of 52.2%. However, the specificity and prediction time were not reported. Bandarabadi et al. [45] presented a spectral-based seizure prediction algorithm for tracking gradual changes preceding seizures and applied their method on sEEG signals of 16 patients (from the European Epilepsy Database) and reported an average sensitivity of 73.98% and average false prediction rate of 0.06/h, but they did not report the prediction time. Myers et al. [47] used the Phase Lock Values as the seizure prediction marker and applied their method to 10 sEEG recordings of patients from CHB-MIT database (Patients 1, 2, 3, 5, 6, 11, 18, 20, 22, and 24) with three seizure events of each patient. They achieved an average sensitivity of 77% and an average false prediction rate of 0.17/h with 60-minute prediction horizon, but they did not report the prediction time. Consul et al. [48] presented a hardware prediction algorithm based on phase difference and applied their method to the first 10 patients of CHB-MIT database with 51 seizure events, resulting in an average sensitivity of 88.2% and a prediction latency between 51 s and 188 minutes, but without reporting the false prediction time. Chu et al. [55] presented a seizure prediction method based on attractor state analysis and applied it to 16 sEEG recordings, 13 of which were from the CHB-MIT database (Patients 1, 3, 5, 6, 8, 10, 12, 13, 14, 15, 18, 20, and 23) and three of which were from the Soul National University Hospital database with 45 testing seizure events. They reported an average sensitivity of 86.67%, an average false prediction rate of 0.367/h, and an average prediction time of 45.3 minutes with a prediction horizon of 86 minutes. Zhu et al. [28] developed a seizure prediction method based on empirical mode decomposition and applied their method to 17 sEEG recordings of patients provided by Epilepsy Center of Xijing Hospital (ECXH) and reported an average sensitivity of 67.4% and average specificity of 78% of eight channels, but they did not report the prediction time. Direito et al. [54] used multiclass support vector machine with multichannel high-dimensional feature sets for epileptic seizure prediction. They evaluated their method on 216 patients (185 sEEG and 31 iEEG) from European Epilepsy Database and reported an average sensitivity of 38.47% and false positive rate of 0.20/h.

6. Conclusion

In this paper, we have presented a patient-specific seizure predictor based on CSP and a linear classifier using three prediction horizons: 60, 90, and 120 minutes. The CSP was used as a feature extractor to find the best discriminative features and reduce the amount of data used for each segment of dimensions (number of channels × number of samples) to a feature vector of size containing the log of variances computed from the rows of the resulting matrix after projection. This data reduction process enabled a linear classifier capable of labeling an incoming segment as either the preictal or interictal state to be built. Three alternatives for the proper selection of the preictal interval location were investigated: preictal-0, preictal-60, and preictal-120. Furthermore, three preictal interval lengths (3, 5, and 10 minutes) were studied. Using sEEG recordings from 24 epileptic patients, the best prediction performance was achieved using preictal-0 with a 3-minute preictal size and the prediction horizon of 120 minutes, in which the average sensitivity was 0.89, average specificity was 0.37, average FPR was 0.39, and average prediction time was 68.71 minutes.

Conflicts of Interest

The authors declare that there are no conflicts of interest.

Acknowledgments

The authors would like to acknowledge the support received from College of Engineering Research Center, King Saud University.