Skip to main content
Frontiers in Neuroinformatics logoLink to Frontiers in Neuroinformatics
. 2017 Aug 17;11:52. doi: 10.3389/fninf.2017.00052

Early Seizure Detection by Applying Frequency-Based Algorithm Derived from the Principal Component Analysis

Jiseon Lee 1,2,3,†,, Junhee Park 1,†,, Sejung Yang 1, Hani Kim 2,3, Yun Seo Choi 2,3, Hyeon Jin Kim 2,3, Hyang Woon Lee 2,3,*,, Byung-Uk Lee 1,*,
PMCID: PMC5562675  PMID: 28860984

Abstract

The use of automatic electrical stimulation in response to early seizure detection has been introduced as a new treatment for intractable epilepsy. For the effective application of this method as a successful treatment, improving the accuracy of the early seizure detection is crucial. In this paper, we proposed the application of a frequency-based algorithm derived from principal component analysis (PCA), and demonstrated improved efficacy for early seizure detection in a pilocarpine-induced epilepsy rat model. A total of 100 ictal electroencephalographs (EEG) during spontaneous recurrent seizures from 11 epileptic rats were finally included for the analysis. PCA was applied to the covariance matrix of a conventional EEG frequency band signal. Two PCA results were compared: one from the initial segment of seizures (5 sec of seizure onset) and the other from the whole segment of seizures. In order to compare the accuracy, we obtained the specific threshold satisfying the target performance from the training set, and compared the False Positive (FP), False Negative (FN), and Latency (Lat) of the PCA based feature derived from the initial segment of seizures to the other six features in the testing set. The PCA based feature derived from the initial segment of seizures performed significantly better than other features with a 1.40% FP, zero FN, and 0.14 s Lat. These results demonstrated that the proposed frequency-based feature from PCA that captures the characteristics of the initial phase of seizure was effective for early detection of seizures. Experiments with rat ictal EEGs showed an improved early seizure detection rate with PCA applied to the covariance of the initial 5 s segment of visual seizure onset instead of using the whole seizure segment or other conventional frequency bands.

Keywords: electroencephalography, principal component analysis, seizure onset, early seizure detection, frequency-based feature

Introduction

Neuromodulation therapy such as vagus nerve stimulation (VNS), deep brain stimulation (DBS) or responsive neurostimulation (RNS) have recently been applied for patients with intractable epilepsy (Howland, 2014; Lee, 2014). In the closed loop neuromodulation system, which involves combined early seizure detection with automatic cortical stimulation, the accuracy of a seizure detection algorithm is crucial to improve therapeutic efficacy (Liang et al., 2013; Howbert et al., 2014; Moghim and Corne, 2014). Various methods for early seizure detection have been introduced, based on electroencephalographic (EEG) features such as frequency bands or magnitude variation (Guo et al., 2010; Howbert et al., 2014; Moghim and Corne, 2014). Especially, the selection of discriminative features is imperative for improving the accuracy and reliability of a seizure detection algorithm (Liang et al., 2010b).

To select discriminative features for accurate and reliable seizure detection, understanding of characteristics of seizure by phase change is a critical issue on early seizure detection. Epileptic seizure represents discriminative phase alteration over relevant time. In the previous studies, the epileptiform discharges and ictal rhythms were identified and analyzed over several window representatives of relevant time intervals during seizures. For examples, the electrographic seizures were partitioned into phases based on spatio-temporal evolution of ictal EEG phase changes (Niedermeyer and Lopes da Silva, 2005; Chaudhary et al., 2012). In another study, the ictal phases were divided into ictal onset, ictal established and late ictal periods (Thornton et al., 2010). The ictal onset phase was characterized by relatively prominent beta activity apparent. The late ictal phase was characterized by prominent gamma frequency band. In a more recent study, with the concept that the characteristics of epileptiform discharges could be distinguished even within several seconds during a seizure, the seizure dynamics was defined as the pre-seizure, the early seizure, the middle seizure, and the late seizure windows (Martinet et al., 2017).

Principal component analysis (PCA) can find a linear combination of frequency features with the maximum variance (Jolliffe, 1993), and is employed for EEG feature enhancement (Jolliffe, 1993; Liang et al., 2010a; Subasi and Ismail Gursoy, 2010; Yu et al., 2014) or EEG dimensionality reduction (Ghosh-Dastidar et al., 2008; Lekshmi et al., 2014; Siuly and Li, 2015) or de-noising (Kevric and Subasi, 2014). In a previous study (Ghosh-Dastidar et al., 2008), parameters were selected from the five physiological EEG subbands including delta, theta, alpha, beta, and gamma frequency ranges. The EEG subbands were then quantified in the form of the correlation dimension (CD), the largest Lyapunov exponent (LLE), and the standard deviation (STD). The PCA was employed for dimension reduction by transforming 9-dimensional feature spaces into a new feature space which was more amenable to subsequent EEG classification (Ghosh-Dastidar et al., 2008). In another study, the PCA was applied to 16 features (an approximate entropy and the powers of the 15 frequency subbands) and the resultant principle components (PCs) were fed to the classifiers for seizure detection. The PCA based features were regarded as the second feature type and the numbers of the PCs were determined based on the best performance of each classifier (Liang et al., 2010a). The above studies employed the PCA-based time-frequency EEG analysis to detect the seizure onset (Stafstrom, 2011; Perucca et al., 2013), which monitors frequency components of ictal EEGs (Guo et al., 2010; Subasi and Ismail Gursoy, 2010; Howbert et al., 2014). Other study described the effect of PCA as de-noising method in terms of epileptic seizure detection (Kevric and Subasi, 2014). They applied PCA de-noising method to EEG segments prior to Power Spectral Density (PSD) estimation. Although PCA is not a novel method, it is one of the conventional methods that has been widely used and tested to validate the accuracy for seizure detection. Besides, PCA is an easy and fast method that can be an important merit to develop as a real-time analysis method.

In the present study, we used a frequency-based algorithm derived from PCA to extract features of EEG changes during seizures. The main purpose of this study was to extract a representative EEG feature for seizure onset from all frequency bands to improve the performance. In addition, we compared the results between EEG features from early segment of seizure vs. those from the whole seizure segment. These two issues are one of the most important parts in seizure detection regardless classification method are used for this purpose. So, in this study, we wanted to test these fundamental elements related to seizure detection, rather than developing another new analysis technique. For this purpose, it would be better to use a straight forward method rather than a new method that has not been verified yet.

We applied the PCA in terms of the frequency-energy distribution of sub-frequency bands (Figure 1). We compared the energies of various frequency bands and additional features with different weights on these frequency bands depending on how the specific frequency bands change during seizures over time. To this end, we proposed employing a dominant eigenvector with the maximum eigenvalue from the covariance matrix to characterize the ictal EEG changes. In addition, we compared the eigenvectors for the whole segment of seizures and only the initial segment of seizures to capture the characteristics of seizure patterns. Interestingly, we could detect the seizure onset even more accurately by using the covariance of the initial segment of seizures, especially the initial 5 s from the seizure onset when compared with the whole seizure segments. This study contributes to improve the accuracy of early seizure detection algorithm by extracting discriminatory features from the EEG signals during seizures, especially from the initial segment of ictal EEG seizure rather than the whole seizure segments.

Figure 1.

Figure 1

A schematic flowchart shows an overview of the steps involved in developing PCA-based EEG features in each subband energy from ictal EEGs in training set and application for early seizure detection to ictal EEG segments in test set. The top panel shows ictal EEGs trains for 11 pilocarpine-induced epileptic rats. The mid-left plot in the top panel represents seizure signal and the mid-right plot in the same panel represents non-seizure signal. The random samplings for Train and Test sets are displayed by orange and blue line. In step 3 and step 4, ei and ew represent principal component (PC) vector extracted from initial segment of seizures and whole seizures, respectively.

Methods

Animal preparation and seizure recording for analysis

A total of 15 adults (4 weeks old) male Sprague-Dawley rats (Orient: KOATECH, Gyeonggi-do, Korea) weighting 280–300 g were used initially for this study. Before the surgery, all rats were in a controlled environment with a 12-h light-dark cycle and the temperature was set at 22–23°C. The experimental animals could freely access food and water. The rats were anesthetized with a mixture of ketamine (80 mg/kg) and xylane (5.2 mg/kg), and the skull was drilled after a scalp incision with the animal's head placed on a stereotaxic frame for epidural electrode insertion. Two epidural electrodes were placed on the left and right central cortical C3 and C4 regions using One Channel Electrode System with Ground Preclinical Component (PlasticsOne, Inc., Roanoke, VA, USA), respectively (AP = 3, ML = ±3.5). Additional two screw electrodes were fixed to the frontal and parietal bone as the reference and ground, respectively. After surgery, the rats were left to recover for 1 week before the EEG recording, which was carried out in a separate cage. One animal died during the anesthesia and another died after the surgical procedure.

All animals were administered with pilocarpine hydrochloride (300–380 mg/kg i.p., Sigma-Aldrich) for inducing seizure as described previously (Turski et al., 1983; Hamani and Mello, 2002; Kobayashi et al., 2003; Kumar and Buckmaster, 2006; Kwak et al., 2006; Curia et al., 2008). Diazepam was received 8.6 mg/kg (Sigma-Aldrich) depending on the seizure severity after 120 min of initial status epilepticus (SE) to reduce the mortality rate and to minimize suffering from seizure. Additional diazepam was provided 30–40 min later if the SE had not stopped, and the animals were included for long-term recording. Two further animals died during the process of inducing SE and valium injection. Finally, the remaining 11 animals were included for long-term recording. Euthanasia was determined at the end of the EEG recording. After the end of monitoring, we performed euthanasia using a carbon dioxide (CO2) chamber. This study was approved by the Ethical Committee for Animal Investigation of the Ewha Womans University School of Medicine, and the protocol was carried out in accordance with the recommendations of the National Institutes of Health (NIH) Guidelines for the Care and Use of Laboratory animals.

For long-term monitoring, all rats were placed individually in custom-made 15 × 40 × 25 cm Acryl cages. Non-seizure EEG signals for normal conditions were recorded for 2 h before the pilocarpine injection. The EEG amplifier systems contained separate ground and reference inputs using the Grass Telefactor long-term EEG monitoring system (the Grass Technologies Inc., West Warwick, RI, USA). A total of 4 EEG channels were acquired using 16-bit A/D conversion, 200 Hz sampling frequency (fs), 90 dB common mode rejection ratio, and a 0.1–70.0 Hz band pass filter.

All of the 11 surviving animals developed the initial SE and later spontaneous recurrent seizures (SRS), which were monitored for 24 h per day for up to 6 weeks after the pilocarpine injection by using a continuous video-EEG monitoring system (Twin 7.0, Grass-Telefactor, West Warwick, RI, USA). Approximately 1–2 weeks after the initial SE, the rats developed SRS. A total of 100 ictal EEG segments from 11 epileptic rats that survived were chosen for inclusion in this study. First, the entire recordings after the initial 7 days of pilocarpine injection were reviewed to identify ictal EEG segments for SRS by experienced neurologists (HWL, HJK) and neuroscientist (YSC). The onset and offset timing of ictal EEGs during SRS were determined by using traditional visual analysis methods. Criteria for selection included: (i) at least 4 weeks of prolonged EEG recordings with good quality after pilocarpine injection, (ii) prolonged EEG recordings in which one or more seizures were captured, (iii) at least 10 s of total seizure duration for comparison of the initial 5-s seizure segments and the whole seizure segments, and (iv) at least stage 3–5 seizures according to the modified Racine's classification (Racine, 1972). For each animal, up to the first 10 seizures were included initially, and ictal EEG segments that had movement or electrode artifacts were excluded by visual inspection, finally giving a total of 100 ictal EEG segments remained and included for the further analysis. Among the final 100 ictal EEG segments, 50 segments were chosen randomly as training dataset to minimize possible bias during selection, and the remaining 50 segments were used for validation of the proposed PCA method as test dataset. The ictal EEG segment for each seizure was clipped from 60 s before the visual seizure onset until 60 s after the visual seizure offset. The electrode impedance was <10,000 Ω for each electrode.

PCA to extract EEG features for seizure onset detection

Subband partition of EEG

In this research, a total of 100 ictal EEGs were partitioned into 50 training sets and 50 testing sets. After we identified epileptic seizure segments, samples for train and test process were randomly sampled to minimize any bias during selection.

The key steps for the analysis was outlined in Figure 2. The EEG signal was transformed to the frequency domain using the fast Fourier transform (FFT), and was then partitioned into five conventional EEG frequency bands: delta (δ: 1–4 Hz), theta (θ: 4–8 Hz), alpha (α: 8–13 Hz), beta (β: 13–25 Hz), and gamma (γ: 25–55 Hz) ranges. In this research, the delta band excluded 0–1 Hz to avoid offset noise and the gamma band was included up to 55 Hz to eject AC line power frequency noise of 60 Hz (Watrous et al., 2011; Sharif and Jafari, 2017). The time window for FFT analysis was 2 s. We represented time domain EEG data as x(n). Since the magnitude of ictal EEG tends to be inversely proportional to the frequency (Osorio et al., 1998), this tendency was overcome using a simple difference filter as shown in Equation (1), and the signal was then transformed to the frequency domain:

Figure 2.

Figure 2

Plot of an ictal EEG in training set and each subband energy. (A) Plot of the ictal EEG, seizure No. 1 in the training set. The x-axis denotes time (sec), and the y-axis represents the amplitude of the iEEG signal. Onset time is defined as t = 0. (B) Plot of energy distribution of the same seizure in each EEG subband. The y-axis represents the amplitudes of subbands and the x-axis denotes time. The five subbands are derived from one recording channel. The blue line, bold red line, yellow line, bold purple line, and green line indicate the energy of the delta (δ: 1–4 Hz), theta (θ: 4–8 Hz), alpha (α: 8–13 Hz), beta (β: 13–25 Hz), and gamma (γ: 25–55 Hz) frequency bands, respectively. In (B), the short black arrow represents the initial 5 s of seizure (i) and the long black arrow represents the whole segment of the seizure (w). The prominent change of energy in the beta band can be observed in the initial segment of the seizure. In the latter portion of the seizure, the energy of the theta and beta band is dominant. Thus, for early detection of the onset, it is more accurate to use a feature that has more weight on the beta band.

X[k]=n = 0N-1[x(n+1)-x(n)]e-j2πNkn (0kN-1), (1)

where X[k] is the Discrete Fourier Transform of EEG after passing the difference filter, and N is the number of samples in the window, which is fs*2 s = 400. From the transformed EEG X[k], the signal energy of five subbands was obtained as shown in Equation (2):

Xsubband=fb,subbandfe,subband|X[k]|2, subband  {δ, θ, α, β, γ}. (2)

The vector of the five subbands frequency band energies, Xδ, Xθ, Xα, Xβ, and Xγ, at time n was represented as vector Xn:

Xn=[Xδn Xθn Xαn Xβn Xγn]T (1nW). (3)

In Equation (3), W is the number of windows of which the size was 2 s with a 1 s overlap. Each component of Xn represents the energy of each subband during the 2 s window. The original signal and energies of each frequency band in seizure No. 1 are plotted in Figure 2. Immediately after seizure onset, the β band showed an obvious increase followed by the α, δ, θ, and γ band powers. In the mid-to-late seizure, unlike the initial segment, the θ band power revealed a significant increase, followed by the γ, α, and remaining β or δ band powers.

Principal component as a feature vector

The PCA was applied to the covariance matrix of 50 ictal EEG training seizures using the Statistical Toolbox and Signal Processing Toolbox in Matlab 8.2 (MathWorks, Natick, MA, USA). With each threshold obtained from the random sampled training set, we compared the performance of the seven feature vectors on the test seizures for validation of the PCA method: two PCA based features from the initial and the whole segment of seizures as well as the energy from each of the five subbands in the testing set with 50 seizures chosen randomly. The covariance matrix C=1NXnXnT was calculated from the training seizure signal vector, Xn. The covariance matrix is a summation over 50 training seizures. A feature vector, eigenvector e, combined with eigenvalue λ was then obtained from Equation (4):

Ce=λe (4)

The dominant eigenvector with the maximum eigenvalue, ed was selected as a feature for onset detection. The eigenvector from covariance matrix C represented the principal direction of the ictal subband energies. In this experiment, the PCA based feature u for seizure detection was obtained by the dot product of Xn and ed (Equation 5), which was the energy component along the major ictal energy direction ed. Here, the directions of the non-seizure vector differed from those of the first principal component vector of the ictal energy; therefore, the feature signal for the non-seizure was quite small, which reduced FP significantly.

un= ed· Xn (5)

The rhythmic activities of the seizures varied with the progression of time (Stafstrom, 2011; Perucca et al., 2013). Therefore, the initial segment of seizure immediately after the onset revealed a quite different frequency-energy distribution from the latter phase of the seizure. For further analysis in our study, we compared the combined EEG features of frequency-energy between the early seizure vs. the whole seizure segments. Since the goal of our work was the extraction of features for early detection of a seizure, it was essential that the feature could capture those characteristics of the initial segment of seizures that were distinct from the latter phase. We adopted an eigenvector with the maximum eigenvalue of the covariance matrix from the initial segment of training seizures as a feature for onset detection, and verified the effectiveness of the proposed feature using testing seizures. We confirmed the efficacy of the proposed feature from experiments.

We set a feature vector ew to be the feature vector extracted from the whole segment of seizures, and set ei to be the proposed feature using the initial 5 s of seizures in the training set. We compared the angle between the two feature vectors ei and ew as shown in Figure 3; the angle would be zero if the feature vectors had identical characteristics. The angle between the two vectors was derived from a dot product from Equation (6):

Figure 3.

Figure 3

Dominant eigenvectors from the initial segment vs. the whole seizure segment. The dominant eigenvector from the principal component analysis for the initial 5 s after the seizure onset (ei) vs. the whole segment (ew) of seizures. The y-axis represents the normalized values of the dominant eigenvectors and the x-axis denotes the five subbands. The red line is the eigenvector of the initial 5 s and the blue dashed line represents the eigenvector of the whole seizure segment. The beta frequency band is dominant in the initial segment of seizure (red line), while the theta frequency is strong during the whole seizure segment (blue dashed line). The two feature vectors, ei and ew, show quite different tendencies.

ew· ei=||ew|| ||ei||cosθ (6)

As shown in Figure 3, the two feature vectors, ei and ew, showed quite different tendencies; the angle between the two feature vectors was 33.1°. The weight on the theta band was dominant in ew which is from the whole ictal EEG segment, while the weight on the β band was dominant in ei. Dot products calculated from each of these feature vectors became the PCA based feature for seizure detection, ui and uw. With these two PCA based features and the energy of the 5 subbands, we tested whether PCA based features were more effective for early detection of seizures, and especially for the application of the proposed feature, PCA, on the initial segment of seizures: the proposed PCA feature showed better performance than that on the whole segments of seizures.

Estimations of thresholds, false positive, and false negative

We adopted a straightforward thresholding algorithm for an intuitive comparison of various features in onset detection, because the purpose of this work is to select an effective feature for seizure detection instead of implementing a detector. While it was known that employing a sophisticated classifier can enhance the accuracy, a simple thresholding algorithm manifested the comparison of different performances among the features. We used quantitative metrics such as false positive (FP), false negative (FN), and latency (Lat), as statistical measures to test reliability of performance for this kind of EEG analysis method (Singh and Aktas, 2016). Lat was defined as the time delay of the detected onset using a feature from the onset defined by neurologists. Our aim for seizure detection was to apply a therapeutic pulse before a “significant symptom” manifested; therefore, we limited the Lat to 5 s. Thus, a seizure which was not detected within 5 s was classified as FN. FN in this study was the ratio of undetected seizures to the total number of test seizures. FP referred to a portion of misjudged non-seizure signals as seizures. Non-seizure samples with total duration 1.5 h were used to test for the FP. The number of non-seizure windows of which the feature amplitude was greater than a given threshold was counted as FP. FP decreased as the threshold increased. FP is represented by a blue line in Figure 4B.

Figure 4.

Figure 4

Reliability of algorithm based on false positive (FP), false negative (FN) and latency vs. threshold. (A) Threshold range (red arrow) for stable seizure detection on a plot of the features. Onset time is defined as t = 0 s. The y-axis represents the energy of a feature and the x-axis denotes time. (B) Energy threshold range (red arrow) for stable seizure detection in terms of standard accuracy indices: Lat ≤ 2 s, FN = 0 s and FP ≤ 5%. The x-axis represents a threshold that is the same as the energy of the feature in (A). The left y-axis represents the probability of FP: 0.05 is 5% and 1 is 100%. The blue dotted curve shows FP, which decreases with increasing threshold. The right y-axis denotes time in seconds and the green line represents latency. Latency increases with increasing threshold. When the latency is greater than 5 s (green dotted line), it is classified as FN, as shown by the vertical black dashed line. The threshold range for stable seizure detection is shown as the red bidirectional horizontal arrow, which is the range of the feature threshold from EFP = 0.05 to ELat = 2. The wide threshold range means that the feature has a sufficient noise margin, which guarantees reliable onset detection.

The thresholds were determined from median values of thresholds of training seizures. Range (red arrow in Figure 4B) for target performance is as follows: FP was less than 5%, FN is zero, and Lat was less than a specified value of 2 s (Figure 4A). FP decreased with increasing threshold; therefore, the threshold must be high enough to maintain a low FP (5% in our experiment), which was denoted as EFP = 0.05. On the other hand, FN and Lat increased with increasing threshold. Therefore, the threshold should be low to avoid FN. Lat was a crucial measure for onset detection. If Lat was longer than 5 s, it was classified as FN as shown in the lower graph of Figure 4B. The threshold for a specified latency, for example 2 s, was represented as ELat = 2. The arithmetic average of thresholds for EFP = 0.05 and ELat = 2 was a good candidate for threshold for a given training seizure. We then selected the median among the thresholds of the training seizures.

Additional validation for comprehensive data analysis

For further comparison to improve validity, we additionally tested the rate of FP during 5-days of non-seizure data (425,100 s) to verify the proposed method. The non-seizure data included not only interictal spikes, but also moving artifacts of rats and electrical artifacts (Supplementary Figure 1). The non-seizure samples were taken between SRS at least 1 h before and after seizures. In Supplementary Figures 1A,B show interictal spikes, while Supplementary Figures 1C,D represent electrical or moving artifacts. The detected feature is normalized against the corresponding threshold value, therefore, magnitude over 1 means FP. In comparison, the proposed feature with low value less than 1 means minimal FP.

Results

Feature extraction and testing for seizure detection were performed with 100 ictal EEG events: 50 ictal EEGs for training and the remaining 50 for the test. To elucidate whether the size of training dataset had some effects on the proposed algorithm, we compared the PCA features derived from the initial seizure and the whole seizure segments using different training dataset of 10, 20, 30, and 50 ictal EEGs. The average of the PCA-based eigenvectors showed similar characteristics regardless of the sample size; however the standard deviation increased as the sample size decreased. When compared the eigenvectors from the initial seizure vs. the whole seizure segments, the discrepancy of the PCA vectors according to the size of training dataset from the latter was more evident. To be specific, the overall trend of eigenvectors from the initial seizure segments showed similar findings across different numbers of the training dataset, that is, the highest weight was on the beta band followed by the alpha band and the lowest weight was on the delta band. On the other hand, those from the whole seizure segments revealed that the larger numbers of the training dataset, the more evident characteristics of the weight on the five subbands were, especially in the theta and beta bands (Supplementary Figure 2). PCA was applied to the covariance matrix of the training seizures. The covariance matrix was constructed from the initial segment of seizures and then from the whole segments for comparison. From each of the two covariance matrices, we obtained two PCA based feature vectors, ei and ew. The two PCA results were used as the feature vector in the testing set. The seven features, including ui and uw, were compared from two perspectives: (i) the standard accuracy index (FP, FN, and Lat) and (ii) the threshold range for stable seizure detection.

Standard accuracy indices: FP, FN, and Lat vs. thresholds

The standard accuracy indices were investigated for each feature at the median threshold (Th1) obtained from the training set. In addition to the threshold, we measured the performance indices after changing the threshold to 0.2, 0.5, 0.8, 1.2, 1.5, and 2 times the median value. The results for the standard accuracy indices are shown in Figure 5. The horizontal axes showed the threshold change and the vertical axes showed FP (%), FN (%), and Lat (sec). The threshold values are normalized to 1 in the plot. We observed that the higher threshold results in the lower FP as shown in Figure 5A. The proposed feature ui showed the lowest FP of all threshold ranges, followed by the other PCA based feature, uw: FP of ui is 1.4% and FP of uw is 2.9%. The theta band feature showed the worst performance with 41.7% FP at the median threshold.

Figure 5.

Figure 5

Performances of seven EEG features vs. threshold levels. The normalized median threshold (Th1) and scaled thresholds at 0.2, 0.5, 0.8, 1.2, 1.5, and 2 times of the normalized median value are compared for seizure detection. The sky-blue plus sign-pointed line, orange circle-pointed line, yellow star-pointed line, purple dot-pointed line, green cross-pointed line, bold blue square-pointed line, and bold red diamond-pointed line indicate the delta (δ), theta (θ), alpha (α), beta (β), gamma (γ) band features, the PCA based feature from the initial segment of the seizure segment (ui), and the other PCA based feature from the whole seizure (uw), respectively. (A) Plot of FP at the scaled Th1. The Th1 is derived from the training set. The y-axis represents FP from a test set and the x-axis represents the different scales of the Th1. (B) Plot of FN vs. the threshold. The y-axis represents the FN in percentage, and the x-axis represents the threshold. (C) Plot of Lat vs. threshold change.

The FN increased with increasing threshold (Figure 5B). The FN was zero, regardless of the threshold change from 0.2 to 1.2 for four features: θ, β, ui, and uw. However, when the threshold was increased by 1.5 times, FN of the other features increased further than the proposed PCA feature, ui. The δ and γ band features showed worse performance within the given range of threshold change. The expected tendency of the higher Lat with higher threshold was observed in Figure 5C. For the normalized range from 0.2 to 1.2, the Lat of ui showed the smallest latency time. For example, at the threshold 1, Lat of ui was 0.14 s, followed by Lat of Xα of 0.26 s. In contrast, the θ and γ band features showed longer latency than the other subband features, which is similar to the tendency of FN.

Threshold range for stable seizure detection

From these standard accuracy indices, we can determine the range of threshold values. The range of threshold values is also crucial for the stable operation of seizure detecting devices (Shoeb and Guttag, 2009). Thus, we estimated the range of threshold values for each feature in all test seizures and then determined the ranking of widths. Figure 6 shows the average ranking of all test seizures for each feature. The PCA based feature, ui, was ranked highest with 1.88 ± 0.84 among the seven features, followed by another PCA based feature, uw, with 2.46 ± 1.40. The θ band feature, Xδ, was ranked lowest with 5.5 ± 1.17 and the γ band feature, Xγ, ranked sixth with 5.1 ± 1.84. Overall, the worse performance in the θ and γ band features has a similar tendency to the result of 3.1 as shown in Figure 5. Moreover, we counted the number of first ranks for each feature as shown in Figure 7. In Figure 7, the x-axis shows the seven features and the y-axis shows the number of the first rank.

Figure 6.

Figure 6

Average of the rank for stable seizure detection in a testing set. The y-axis represents the average of the ranks and the x-axis denotes the seven features. The average is calculated from the 50 testing seizures and the standard deviation is represented by a black line. The principal component from the initial segment of seizures, ui, performs the best rank among all the seven features with relatively low false posivie (FP) and latency (Lat).

Figure 7.

Figure 7

Number of first ranking in 50 testing seizures. The y-axis represents the number of first rankings among the 50 testing seizures and the x-axis denotes the seven features. Similar to the result of the average of the rank in Figure 6, the principal component from the initial segment of seizures, ui, performs the best ranking among all the seven features with relatively low FP and Lat.

Consequently, ui had the greatest number of first rankings with 21 among 50 test seizures. The uw followed ui and the rest of the features had fewer than 3 times for the first rank. From the result, the two PCA based features showed a more flexible threshold range than the other features; especially, the PCA based feature derived from the initial segment of seizures, ui, showed the highest stability. In conclusion, with these two experiment results, we confirmed that ui revealed the best performance among all the seven features with relatively low FP and Lat, which will guarantee safe operation margins in early detection of onset.

Examples of non-seizure segments detected as false positives

Supplementary Figure 1 shows examples of artifacts; interictal spikes (A,B), electrical artifacts (C) and moving artifacts (D). The detected feature has been normalized against the corresponding threshold value, therefore, magnitude over 1 means false positive. The proposed feature, ui maintains low value less than 1, which means FP was minimal. The proposed PCA feature during interictal spikes, electrical and moving artifacts shows low magnitude less than 1 for most of the time.

Low FP results for artifacts also support the superiority of the proposed feature in comparison with other features. Supplementary Table 1 shows the rates of FP for the additional data for 5 days including non-seizure data including artifacts in the initial and the whole seizure segments. The rate of FP for the proposed feature, ui, was quite low and comparable between the initial and the whole seizure segments.

Discussion

In the present study, we investigated the performance of seizure features for early detection. The main findings of this study were: (i) the PCA based feature based on weighted average of five EEG frequency bands was better in detecting the seizure onset than the individual frequency band, (ii) the PCA feature from the initial segment of seizures showed higher accuracy than that from the whole segment of seizures. Feature extraction by PCA algorithm and the features extracted from five EEG frequency bands have been used in previous researches. However, the main purpose of this study was to investigate characteristics and usefulness of the features extracted from the initial part of the seizures for early seizure detection compared with those from the whole seizures. Our findings indicated that PCA is useful for extracting the feature of seizures and PCA from the initial segment of ictal EEG could detect a seizure more accurately than the principal component from the whole seizure segments. The FP of the proposed method was 1.4%, while the second best was 2.88% using PCA of the whole seizure segments. Lat was 0.14 s, and the second-best performance was 0.26 s using the alpha channel.

In previous studies, PCA was applied to the whole segment (Srinivasan et al., 2005; Kevric and Subasi, 2014) or dimensionality reduction (Polat and Güneş, 2008; Subasi and Ismail Gursoy, 2010; Yu et al., 2014). In a study (Ghaffari and Ebrahimi Orimi, 2014), wavelet packet transform (WPT) was used in each of the frequency bands, while the energy and entropy functions were composed of the wavelet coefficients and used as feature vectors. After feature selection, 15 energy and entropy features were selected as the final features for seizure detection. However, with the wavelet-analysis, the infinite number of wavelets and the width of the scaling function should be circumvented (Valens, 1999).

From our results, we verified that the PCA based feature vector extracted from the initial 5 s since the seizure onset outperformed the frequency subband as well as the PCA based feature vector extracted from the whole segment of seizures. The two feature vectors for the initial seizure (ei) and the whole seizure (ew) segments, showed different characteristics in terms of energies in different frequency bands. The weight on the theta band was dominant in ew, while the weight on the β band was dominant in ei. In fact, the strong weight on the β band in ei is more comparable to the previous findings (Chaudhary et al., 2012). Thus, the initial segment of seizures seems to be good for extracting characteristic features during seizures, which can be advantageous for real-time EEG recording for early seizure detection. One possible explanation for the difference in the frequency band energy distribution of the initial segment of seizures from the latter part of the seizures was rhythmic build-up and/or propagation of seizure activities. Other studies also demonstrated that various EEG indices showing EEG rhythms and functional networks revealed different patterns at the seizure onset, during seizure propagation, and at seizure termination (Kramer et al., 2010, 2012; Kramer and Cash, 2012). The initial segment of seizures revealed prominent and robust changes, and these characteristics could be encoded in the PCA. Therefore, the proposed feature could detect the seizure onset with higher accuracy while maintaining low latency. Thus, once the seizure detection algorithm with our PCA based feature was embedded in a medical device such as a real-time seizure detector, we could anticipate improvement of therapeutic efficacy with better performance. The proposed algorithm requires a pre-computation of eigenvectors from training seizures. This eigenvector has five weighting factors for the corresponding subbands, and the feature for seizure detection is a weighted average of five subbands of the EEG signal. Therefore, the overhead for feature calculation is five multiplications and four additions, which are negligible compared to the subband division of the EEG signal. In this study, we additionally selected 5 days of non-seizure EEG signals including interictal spikes and electrical artifacts (425,100 s) to verify the proposed method. Results of the FP from these artifact samples further validated that the proposed feature showed a reliable FP rate comparable between in the initial and the whole seizure segments.

Future works include focusing on applying the feature to more elaborate classifiers. The proposed PCA feature could be applied to other methods such as Support Vector Machine (SVM) for robust and precise detection of seizure onset. A patient-specific SVM can improve the performance of neuro-stimulators (Shoeb and Guttag, 2009) and another study compared the performance of three SVM types: weighted SVM, one-class SVM, and support vector data description (SVDD) for seizure detection in an animal model of chronic epilepsy (Nandan et al., 2010). Therefore, with the proposed feature and patient-specific classifier such as SVM, we can anticipate the improved performance in early seizure detection. Moreover, this feature could be used for a closed-loop system with a therapeutic pulse, because of the robust and accurate detection of the seizure onset.

In summary, we observed that the PCA based features applying different weights for various frequency bands, especially from the initial segment within 5 s after the seizure onset were effective for early seizure detection for ictal EEG events of spontaneous seizures in the Pilocarpine-induced rat epilepsy model. This research can contribute to real-time seizure detection, in which the EEG characteristics are analyzed in clinical settings where the timing of seizure detection is crucial for aborting the seizure activities. The presented PCA feature derived from the initial segment of seizures is simple and fast in the calculation point of view, which can be adaptable to the future clinical application of real-time EEG monitoring for early seizure detection. Therefore, the detection electronic circuitry can be designed to consume less power for seizure feature estimation. Our findings could enable us to develop a robust and accurate algorithm for automatic and real-time early seizure detection in future studies. With this approach, advanced closed loop neuro-stimulation methods for patients with drug-resistant intractable epilepsy can be implemented with further validation.

Author contributions

JL, JP, HWL, and BUL interpreted data, conceptualized and designed the study. HK and YC acquired the raw data. JL, JP, SY, YC, and HJK analyzed the data. JL and JP drafted, and HWL and BUL revised the work with important intellectual content.

Conflict of interest statement

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Footnotes

Funding. This work was supported by the Ewha Global Top 5 Grant 2013 (HWL, BUL) and RP-Grant 2014 (JP) of Ewha Womans University (http://www.ewha.ac.kr), and grants of the Korea Health Technology R&D Project through the Korea Health Industry Development Institute (KHIDI) (www.khidi.or.kr), funded by the Ministry of Health and Welfare (http://www.mohw.go.kr) (HI14C1989 to HWL), and the Basic Science Research Program through the National Research Foundation of Korea (NRF) (http://www.nrf.re.kr) funded by the Ministry of Education, Science and Technology (http://www.msip.go.kr) (2012-R1A1A3013525 to SY and 2014-R1A2A1A11052103 to HWL).

Supplementary material

The Supplementary Material for this article can be found online at: http://journal.frontiersin.org/article/10.3389/fninf.2017.00052/full#supplementary-material

References

  1. Chaudhary U. J., Carmichael D. W., Rodionov R., Thornton R. C., Bartlett P., Vulliemoz S., et al. (2012). Mapping preictal and ictal haemodynamic networks using video-electroencephalography and functional imaging. Brain 135(Pt 12), 3645–3663. 10.1093/brain/aws302 [DOI] [PubMed] [Google Scholar]
  2. Curia G., Longo D., Biagini G., Jones R. S., Avoli M. (2008). The pilocarpine model of temporal lobe epilepsy. J. Neurosci. Methods 172, 143–157. 10.1016/j.jneumeth.2008.04.019 [DOI] [PMC free article] [PubMed] [Google Scholar]
  3. Ghaffari A., Ebrahimi Orimi H. (2014). EEG signals classification of epileptic patients via feature selection and voting criteria in intelligent method. J. Med. Eng. Technol. 38, 146–155. 10.3109/03091902.2014.890677 [DOI] [PubMed] [Google Scholar]
  4. Ghosh-Dastidar S., Adeli H., Dadmehr N. (2008). Principal component analysis-enhanced cosine radial basis function neural network for robust epilepsy and seizure detection. IEEE Trans. Biomed. Eng. 55(2 Pt 1), 512–518. 10.1109/TBME.2007.905490 [DOI] [PubMed] [Google Scholar]
  5. Guo L., Rivero D., Pazos A. (2010). Epileptic seizure detection using multiwavelet transform based approximate entropy and artificial neural networks. J. Neurosci. Methods 193, 156–163. 10.1016/j.jneumeth.2010.08.030 [DOI] [PubMed] [Google Scholar]
  6. Hamani C., Mello L. E. (2002). Spontaneous recurrent seizures and neuropathology in the chronic phase of the pilocarpine and picrotoxin model epilepsy. Neurol. Res. 24, 199–209. 10.1179/016164102101199611 [DOI] [PubMed] [Google Scholar]
  7. Howbert J. J., Patterson E. E., Stead S. M., Brinkmann B., Vasoli V., Crepeau D., et al. (2014). Forecasting seizures in dogs with naturally occurring epilepsy. PLoS ONE 9:e81920. 10.1371/journal.pone.0081920 [DOI] [PMC free article] [PubMed] [Google Scholar]
  8. Howland R. H. (2014). Vagus nerve stimulation. Curr. Behav. Neurosci. Rep. 1, 64–73. 10.1007/s40473-014-0010-5 [DOI] [PMC free article] [PubMed] [Google Scholar]
  9. Jolliffe I. T. (1993). Principal component analysis: a beginner's guide—II. Pitfalls, myths and extensions. Weather 48, 246–253. 10.1002/j.1477-8696.1993.tb05899.x [DOI] [Google Scholar]
  10. Kevric J., Subasi A. (2014). The effect of multiscale PCA de-noising in epileptic seizure detection. J. Med. Syst. 38, 131. 10.1007/s10916-014-0131-0 [DOI] [PubMed] [Google Scholar]
  11. Kobayashi M., Wen X., Buckmaster P. S. (2003). Reduced inhibition and increased output of layer II neurons in the medial entorhinal cortex in a model of temporal lobe epilepsy. J. Neurosci. 23, 8471–8479. Available online at: http://www.jneurosci.org/content/23/24/8471.long [DOI] [PMC free article] [PubMed] [Google Scholar]
  12. Kramer M. A., Cash S. S. (2012). Epilepsy as a disorder of cortical network organization. Neuroscientist 18, 360–372. 10.1177/1073858411422754 [DOI] [PMC free article] [PubMed] [Google Scholar]
  13. Kramer M. A., Eden U. T., Kolaczyk E. D., Zepeda R., Eskandar E. N., Cash S. S. (2010). Coalescence and fragmentation of cortical networks during focal seizures. J. Neurosci. 30, 10076–10085. 10.1523/JNEUROSCI.6309-09.2010 [DOI] [PMC free article] [PubMed] [Google Scholar]
  14. Kramer M. A., Truccolo W., Eden U. T., Lepage K. Q., Hochberg L. R., Eskandar E. N., et al. (2012). Human seizures self-terminate across spatial scales via a critical transition. Proc. Natl. Acad. Sci. U.S.A. 109, 21116–21121. 10.1073/pnas.1210047110 [DOI] [PMC free article] [PubMed] [Google Scholar]
  15. Kumar S. S., Buckmaster P. S. (2006). Hyperexcitability, interneurons, and loss of GABAergic synapses in entorhinal cortex in a model of temporal lobe epilepsy. J. Neurosci. 26, 4613–4623. 10.1523/JNEUROSCI.0064-06.2006 [DOI] [PMC free article] [PubMed] [Google Scholar]
  16. Kwak S.-E., Kim J.-E., Kim D.-S., Won M. H., Lee H. J., Choi S.-Y., et al. (2006). Differential paired-pulse responses between the CA1 region and the dentate gyrus are related to altered CLC-2 immunoreactivity in the pilocarpine-induced rat epilepsy model. Brain Res. 1115, 162–168. 10.1016/j.brainres.2006.07.082 [DOI] [PubMed] [Google Scholar]
  17. Lee H. W. (2014). Neuromodulation therapy: nonmedical, nonsurgical treatment for intractable epilepsy, in Epilepsy Topics, ed Holmes M. (Rijeka: InTech; ), 161–172. [Google Scholar]
  18. Lekshmi S., Selvam V., Rajasekaran M. P. (2014). EEG signal classification using principal component analysis and wavelet transform with neural network, in Communications and Signal Processing (ICCSP), 2014 International Conference on (Chennai: IEEE; ), 687–690. [Google Scholar]
  19. Liang S.-F., Chang W.-L., Chiueh H. (2010a). EEG-based absence seizure detection methods, in Neural Networks (IJCNN), The 2010 International Joint Conference on (Barcelona: IEEE; ), 1–4. [Google Scholar]
  20. Liang S.-F., Chen Y.-C., Wang Y.-L., Chen P.-T., Yang C.-H., Chiueh H. (2013). A hierarchical approach for online temporal lobe seizure detection in long-term intracranial EEG recordings. J. Neural Eng. 10:045004. 10.1088/1741-2560/10/4/045004 [DOI] [PubMed] [Google Scholar]
  21. Liang S.-F., Wang H.-C., Chang W.-L. (2010b). Combination of EEG complexity and spectral analysis for epilepsy diagnosis and seizure detection. EURASIP J. Adv. Signal Process. 2010:853434 10.1155/2010/853434 [DOI] [Google Scholar]
  22. Martinet L.-E., Fiddyment G., Madsen J., Eskandar E., Truccolo W., Eden U. T., et al. (2017). Human seizures couple across spatial scales through travelling wave dynamics. Nat. Commun. 8:14896. 10.1038/ncomms14896 [DOI] [PMC free article] [PubMed] [Google Scholar]
  23. Moghim N., Corne D. W. (2014). Predicting epileptic seizures in advance. PLoS ONE 9:e99334. 10.1371/journal.pone.0099334 [DOI] [PMC free article] [PubMed] [Google Scholar]
  24. Nandan M., Talathi S. S., Myers S., Ditto W. L., Khargonekar P. P., Carney P. R. (2010). Support vector machines for seizure detection in an animal model of chronic epilepsy. J. Neural Eng. 7:036001. 10.1088/1741-2560/7/3/036001 [DOI] [PubMed] [Google Scholar]
  25. Niedermeyer E., Lopes da Silva F. (2005). Electroencephalography: Basic Principles, Clinical Applications, and Related fields. Philadelphia, PA: Lippincott Williams & Wilkins. [Google Scholar]
  26. Osorio I., Frei M. G., Wilkinson S. B. (1998). Real-time automated detection and quantitative analysis of seizures and short-term prediction of clinical onset. Epilepsia 39, 615–627. 10.1111/j.1528-1157.1998.tb01430.x [DOI] [PubMed] [Google Scholar]
  27. Perucca P., Dubeau F., Gotman J. (2013). Widespread EEG changes precede focal seizures. PLoS ONE 8:e80972. 10.1371/journal.pone.0080972 [DOI] [PMC free article] [PubMed] [Google Scholar]
  28. Polat K., Güneş S. (2008). Artificial immune recognition system with fuzzy resource allocation mechanism classifier, principal component analysis and FFT method based new hybrid automated identification system for classification of EEG signals. Expert Syst. Appl. 34, 2039–2048. 10.1016/j.eswa.2007.02.009 [DOI] [Google Scholar]
  29. Racine R. J. (1972). Modification of seizure activity by electrical stimulation. II. Motor seizure. Electroencephalogr. Clin. Neurophysiol. 32, 281–294. 10.1016/0013-4694(72)90177-0 [DOI] [PubMed] [Google Scholar]
  30. Sharif B., Jafari A. H. (2017). Prediction of epileptic seizures from EEG using analysis of ictal rules on Poincaré plane. Comput. Methods Programs Biomed. 145, 11–22. 10.1016/j.cmpb.2017.04.001 [DOI] [PubMed] [Google Scholar]
  31. Shoeb A. H., Guttag J. V. (2009). Application of machine learning to epileptic seizure detection, in Proceedings of the 27th International Conference on Machine Learning (ICML-10)), 975–982. Available online at: https://dspace.mit.edu/handle/1721.1/54669 [Google Scholar]
  32. Singh D., Aktas O. (2016). The Window Size for Classification of Epileptic Seizures based on Analysis of EEG Patterns. Available online at: http://www.diva-portal.org/smash/record.jsf?pid$=$diva2%3A927318&dswid$=$article#sthash.rL7LiFTq.dpbs
  33. Siuly S., Li Y. (2015). Designing a robust feature extraction method based on optimum allocation and principal component analysis for epileptic EEG signal classification. Comput. Methods Programs Biomed. 119, 29–42. 10.1016/j.cmpb.2015.01.002 [DOI] [PubMed] [Google Scholar]
  34. Srinivasan V., Eswaran C., Sriraam N. (2005). Artificial neural network based epileptic detection using time-domain and frequency-domain features. J. Med. Syst. 29, 647–660. 10.1007/s10916-005-6133-1 [DOI] [PubMed] [Google Scholar]
  35. Stafstrom C. E. (2011). Distinct mechanisms mediate interictal and pre-ictal discharges in human temporal lobe epilepsy. Epilepsy Curr. 11, 200–202. 10.5698/1535-7511-11.6.200 [DOI] [PMC free article] [PubMed] [Google Scholar]
  36. Subasi A., Ismail Gursoy M. (2010). EEG signal classification using PCA, ICA, LDA and support vector machines. Expert Syst. Appl. 37, 8659–8666. 10.1016/j.eswa.2010.06.065 [DOI] [Google Scholar]
  37. Thornton R. C., Rodionov R., Laufs H., Vulliemoz S., Vaudano A., Carmichael D., et al. (2010). Imaging haemodynamic changes related to seizures: comparison of EEG-based general linear model, independent component analysis of fMRI and intracranial EEG. Neuroimage 53, 196–205. 10.1016/j.neuroimage.2010.05.064 [DOI] [PubMed] [Google Scholar]
  38. Turski W. A., Cavalheiro E. A., Schwarz M., Czuczwar S. J., Kleinrok Z., Turski L. (1983). Limbic seizures produced by pilocarpine in rats: behavioural, electroencephalographic and neuropathological study. Behav. Brain Res. 9, 315–335. 10.1016/0166-4328(83)90136-5 [DOI] [PubMed] [Google Scholar]
  39. Valens C. (1999). A Really Friendly Guide to Wavelets, ed Valens C. Available online at: http://iar.cs.unm.edu/~williams/cs530/arfgtw.pdf [Google Scholar]
  40. Watrous A. J., Fried I., Ekstrom A. D. (2011). Behavioral correlates of human hippocampal delta and theta oscillations during navigation. J. Neurophysiol. 105, 1747–1755. 10.1152/jn.00921.2010 [DOI] [PubMed] [Google Scholar]
  41. Yu X., Chum P., Sim K.-B. (2014). Analysis the effect of PCA for feature reduction in non-stationary EEG based motor imagery of BCI system. Optik 125, 1498–1502. 10.1016/j.ijleo.2013.09.013 [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials


Articles from Frontiers in Neuroinformatics are provided here courtesy of Frontiers Media SA

RESOURCES