Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Scalp EEG quantitative analysis : automated real-time detection and prediction of epileptic seizures Shahidi Zandi, Ali 2012

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
24-ubc_2012_fall_shahidi_zandi_ali.pdf [ 11.35MB ]
Metadata
JSON: 24-1.0072884.json
JSON-LD: 24-1.0072884-ld.json
RDF/XML (Pretty): 24-1.0072884-rdf.xml
RDF/JSON: 24-1.0072884-rdf.json
Turtle: 24-1.0072884-turtle.txt
N-Triples: 24-1.0072884-rdf-ntriples.txt
Original Record: 24-1.0072884-source.json
Full Text
24-1.0072884-fulltext.txt
Citation
24-1.0072884.ris

Full Text

Scalp EEG Quantitative Analysis: Automated Real-Time Detection and Prediction of Epileptic Seizures  by Ali Shahidi Zandi B.Sc., Biomedical Engineering, Amirkabir University of Technology, Iran M.Sc., Biomedical Engineering, Amirkabir University of Technology, Iran  A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF  DOCTOR OF PHILOSOPHY in THE FACULTY OF GRADUATE STUDIES (Electrical and Computer Engineering)  THE UNIVERSITY OF BRITISH COLUMBIA (Vancouver) July 2012 c Ali Shahidi Zandi, 2012  Abstract As a chronic neurological disorder, epilepsy is associated with recurrent, unprovoked epileptic seizures resulting from a sudden disturbance of brain function. Long-term monitoring of epileptic patients’ Electroencephalogram (EEG) is often needed for diagnosis of seizures, which is tedious, expensive, and time-consuming. Also, clinical staff may not identify the seizure early enough to determine the semiology at the onset. This motivates EEG-based automated real-time detection of seizures. Apart from their possible severe side effects, common treatments for epilepsy (medication and surgery) fail to satisfactorily control seizures in ∼25%  of patients. EEG-based seizure prediction systems would significantly enhance  the chance of controlling/aborting seizures and improve safety and quality of life for patients. This thesis proposes novel EEG-based patient-specific techniques for real-time detection and prediction of epileptic seizures and also presents a pilot study of scalp EEGs acquired in a unique low-noise underground environment. The proposed detection method is based on the wavelet packet analysis of EEG. A novel index, termed the combined seizure index, is introduced which is sensitive to both the rhythmicity and relative energy of the EEG in a given channel and considers the consistency among different channels at the same time. This index is monitored by a cumulative sum procedure in each channel. This channel-based information is then used to generate the final seizure alarm. In this thesis, a prediction method based on a variational Bayesian Gaussian mixture model of the EEG positive zero-crossing intervals is proposed. Novel indices of similarity and dissimilarity are introduced to compare current observations with the preictal and interictal references and monitor the changes for each channel. Information from individual channels is finally combined to trigger an alarm ii  Abstract for upcoming seizures. These methods are evaluated using scalp EEG data. The prediction method is also tested against a random predictor. Finally, this thesis investigates the capability of an ultra-shielded underground capsule for acquiring clean EEG. Results demonstrate the potential of the capsule for novel EEG studies, including establishing novel low-noise EEG benchmarks which could be helpful in better understanding of the brain functions and mechanisms deriving various brain disorders, such as epilepsy.  iii  Preface The work presented in this thesis has been partially published in (or submitted to) different journals or conference proceedings. The list of these publications are provided below. For each chapter, the publications related to the materials presented in that chapter are also cited in the introductory part of the chapter. I have been the main author for all publications and have had the main role in generating the ideas, developing the methodologies, processing the data, and analyzing the results. Chapter 3 of this thesis is based on the work published in Proceedings of International IEEE EMBS Conferences in 2007 [179], 2008 [180], and 2009 [181]. The work presented in Chapter 4 has been partially published in IEEE Transactions on Biomedical Engineering [182] and Journal of Clinical Neurophysiology [187]. Parts of the work presented in Chapter 5 have been published in Proceedings of International IEEE EMBS Conferences in 2010 [183], and 2011 [185], and parts have been submitted to IEEE Transactions on Biomedical Engineering [188]. Chapter 6 is based on the work published in IEEE Transactions on Biomedical Engineering [186] and the Proceedings of the 3rd International Conference of inter-Disciplinary Underground Science and Technology (i-DUST) [184]. The discussions and conclusions provided in Chapter 7 are based on the related papers published in (or submitted to) IEEE Transactions on Biomedical Engineering [182, 186, 188] and Journal of Clinical Neurophysiology [187]. The research work of this thesis has been conducted with approval by the Clinical Research Ethics Board (CREB) of The University of British Columbia (approval number of H06–70463). iv  Preface The list of publications resulted in this thesis is as follows:  Journal Articles • A. Shahidi Zandi, R. Tafreshi, M. Javidan, and G. A. Dumont. Predicting  epileptic seizures in scalp EEG based on a variational Bayesian Gaussian mixture model of zero-crossing intervals. IEEE Transactions on Biomedical Engineering, submitted, 2012. ([188])  • A. Shahidi Zandi, G. A. Dumont, M. Javidan, and R. Tafreshi. Detection of epileptic seizures in scalp electroencephalogram: An automated real-time  wavelet-based approach. Journal of Clinical Neurophysiology, 29(1):1–16, 2012. ([187]) • A. Shahidi Zandi, G. A. Dumont, M. J. Yedlin, P. Lapeyrie, C. Sudre, and S. Gaffet. Scalp EEG acquisition in a low-noise environment: A quantitative  assessment. IEEE Transactions on Biomedical Engineering, 58(8):2407– 2417, 2011. ([186]) • A. Shahidi Zandi, M. Javidan, G. A. Dumont, and R. Tafreshi. Automated real-time epileptic seizure detection in scalp EEG recordings using an algo-  rithm based on wavelet packet transform. IEEE Transactions on Biomedical Engineering, 57(7):1639–1651, 2010. ([182])  Refereed Conference Papers • A. Shahidi Zandi, G. A. Dumont, M. Javidan, and R. Tafreshi. Epilep-  tic seizure prediction using variational mixture of Gaussians. In 33rd An-  nual International IEEE EMBS Conference, pages 7549-7552, Boston, Massachusetts USA, 2011. ([185]) • A. Shahidi Zandi, G. Dumont, M. Yedlin, P. Lapeyrie, C. Sudre, and S. Gaffet. Analysis of scalp EEG recorded in a low-noise environment. In i-DUST 2010, pages 03002 1-8, Apt, France, 2011. ([184])  v  Preface • A. Shahidi Zandi, R. Tafreshi, M. Javidan, and G. A. Dumont. Predicting  temporal lobe epileptic seizures based on zero-crossing interval analysis in scalp EEG. In 32nd Annual International IEEE EMBS Conference, pages  5537–5540, Buenos Aires, Argentina, 2010. ([183]) • A. Shahidi Zandi, G. A. Dumont, M. Javidan, and R. Tafreshi. An entropy-  based approach to predict seizures in temporal lobe epilepsy using scalp EEG. In 31st Annual International IEEE EMBS Conference, pages 228–231, Minneapolis, Minnesota, USA, 2009. ([181])  • A. Shahidi Zandi, G. A. Dumont, M. Javidan, R. Tafreshi, B. A. MacLeod, C. R. Ries, and E. Puil. A novel wavelet-based index to detect epileptic  seizures using scalp EEG signals. In 30th Annual International IEEE EMBS Conference, pages 919-922, Vancouver, British Columbia, Canada, 2008. ([180]) • A. Shahidi Zandi, R. Tafreshi, G. A. Dumont, C. R. Ries, B. A. MacLeod,  and E. Puil. Electroconvulsive therapy: A model for seizure detection by a wavelet packet algorithm. In 29th Annual International IEEE EMBS Conference, pages 19161919, Lyon, France, 2007. ([179])  vi  Table of Contents Abstract  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  ii  Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  iv  Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  vii  List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  x  List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  xii  List of Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . .  xix  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  xxi  Dedication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii 1  2  Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  1  1.1  Epilepsy and Epileptic Seizures . . . . . . . . . . . . . . . . . . .  1  1.2  Electroencephalogram (EEG) . . . . . . . . . . . . . . . . . . . .  6  1.3  Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  9  1.4  Thesis Contributions . . . . . . . . . . . . . . . . . . . . . . . .  11  1.5  Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . .  13  Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Epileptic Seizure Detection . . . . . . . . . . . . . . . . . . . . .  14 14  2.2  Epileptic Seizure Prediction  . . . . . . . . . . . . . . . . . . . .  23  2.3  Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  34  vii  Table of Contents 3  Seizure Detection and Prediction: Preliminary Studies and Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  37  3.1  Wavelet Transform . . . . . . . . . . . . . . . . . . . . . . . . .  37  3.2  Wavelet-Based Seizure Detection . . . . . . . . . . . . . . . . . .  40  3.2.1  Wavelet Packet Energy Ratio . . . . . . . . . . . . . . . .  40  3.2.2  A Novel Wavelet Index to Detect Seizures . . . . . . . . .  44  3.2.3  Epileptic Seizure Detection Results . . . . . . . . . . . .  46  3.3  3.4 4  Crossings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  51  3.3.1  EEG Zero-Crossings . . . . . . . . . . . . . . . . . . . .  52  3.3.2  Methodology . . . . . . . . . . . . . . . . . . . . . . . .  53  3.3.3  Epileptic Seizure Prediction Results . . . . . . . . . . . .  56  Discussion and Conclusion . . . . . . . . . . . . . . . . . . . . .  60  Automated Real-Time Seizure Detection Based on Wavelet Packet Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  62  4.1 4.2  EEG Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  63 63  4.2.1  Separation Measure and Regularity Band . . . . . . . . .  65  4.2.2  Regularity Index . . . . . . . . . . . . . . . . . . . . . .  70  4.2.3  Energy Index . . . . . . . . . . . . . . . . . . . . . . . .  71  4.2.4  Combined Seizure Index (CSI) . . . . . . . . . . . . . . .  74  4.2.5  Seizure Alarm . . . . . . . . . . . . . . . . . . . . . . .  77  Clinical Results . . . . . . . . . . . . . . . . . . . . . . . . . . .  79  4.3.1  Seizure Detection Results . . . . . . . . . . . . . . . . .  79  4.3.2  Seizure Focus Lateralization in Temporal Lobe Epilepsy .  94  Summary and Conclusion . . . . . . . . . . . . . . . . . . . . . .  96  4.3  4.4 5  An Entropy-Based Approach to Predict Seizures Using EEG Zero-  Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals 97 5.1  5.2  EEG Zero-Crossing Intervals . . . . . . . . . . . . . . . . . . . .  98  5.1.1  Histogram of Zero-Crossing Intervals . . . . . . . . . . .  98  5.1.2  Discriminative Histogram Bins . . . . . . . . . . . . . . .  99  Predicting Seizures Based on Kullback–Leibler Divergence . . . . 100  viii  Table of Contents 5.3  Predicting Epileptic Seizures Using Variational Bayesian Mixture of Gaussians . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Variational Mixture of Gaussians . . . . . . . . . . . . . . 103  5.3.2  Similarity and Dissimilarity Indices . . . . . . . . . . . . 107  5.3.3  Seizure Prediction Alarm . . . . . . . . . . . . . . . . . . 110  5.4  An Analytical Chance Predictor . . . . . . . . . . . . . . . . . . 112  5.5  Epilepsy Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113  5.6  Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113  5.7 6  5.3.1  5.6.1  Method Based on KL Divergence . . . . . . . . . . . . . 115  5.6.2  Method Based on Variational GMM . . . . . . . . . . . . 121  Summary and Conclusion . . . . . . . . . . . . . . . . . . . . . . 130  Low-Noise Scalp EEG Analysis: A Pilot Study Towards Establishment of Novel EEG Benchmarks . . . . . . . . . . . . . . . . . . . . 131 6.1  EEG Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133  6.2  Data Analysis and Results . . . . . . . . . . . . . . . . . . . . . 134 6.2.1 6.2.2  6.3 7  Power Spectral Analysis . . . . . . . . . . . . . . . . . . 135 Time-Frequency Analysis . . . . . . . . . . . . . . . . . 138  Summary and Conclusion . . . . . . . . . . . . . . . . . . . . . . 150  Conclusion and Future Work . . . . . . . . . . . . . . . . . . . . . . 152 7.1  Epileptic Seizure Detection . . . . . . . . . . . . . . . . . . . . . 152  7.2  Epileptic Seizure Prediction  7.3  Low-Noise EEG Study . . . . . . . . . . . . . . . . . . . . . . . 161  . . . . . . . . . . . . . . . . . . . . 158  Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Appendices A Nonlinear Scaling Function Properties B Variational Gaussian Mixture Model  . . . . . . . . . . . . . . . . 187 . . . . . . . . . . . . . . . . . 189  B.1 Variational Bayes Expectation–Maximization . . . . . . . . . . . 189 B.2 Variational Lower Bound . . . . . . . . . . . . . . . . . . . . . . 191  ix  List of Tables Table 3.1  The results of applying the WPER algorithm to the test ECT dataset for different detection approaches. . . . . . . . . . . . . . . . . .  43  Table 3.2  EEG data used to evaluate the WPER and combined index. . . . . .  47  Table 3.3  The frequency bands selected to analyze EEG recordings using the combined index and WPER. . . . . . . . . . . . . . . . . . . . .  48  Table 3.4  Results of applying the combined index and WPER to the epilepsy data. 51  Table 3.5  Results of the proposed entropy-based method for predicting epileptic seizures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  Table 3.6  59  Results of applying the entropy-based seizure prediction algorithm to the epilepsy data with different weighting parameters. . . . . . . . .  60  Table 4.1  EEG data analyzed. . . . . . . . . . . . . . . . . . . . . . . . .  64  Table 4.2  The regularity band (FR ) determined for different patients based on the corresponding extracted seizure and non-seizure references. . . .  80 83  Table 4.3  Results of applying the proposed method to training data using Ψk . .  Table 5.1  Epilepsy EEG Data. . . . . . . . . . . . . . . . . . . . . . . . . 114  Table 5.2  Seizure prediction results for the method based on the KL divergence. 116  Table 5.3  Seizure prediction results for the method based on the variational GMM. 122  Table 6.1  Results of the one-sided t-test (p-values), comparing the PSDs of different setups for the three subjects. . . . . . . . . . . . . . . . . . 138  Table 6.2  Results of the one-sided t-test (p-values), comparing the mean of Ψ (recording counting-relaxed β-band energy ratio) in the two environments with the alternative hypothesis that the mean of Ψ in the capsule is greater than the mean of Ψ in the hospital. . . . . . . . . . . . . 146  x  List of Tables Table 6.3  Results of the one-sided t-test (p-values), comparing the mean of Φ (recording relative β-band energy) in the two environments with the alternative hypothesis that the mean of Φ in the capsule is greater than the mean of Φ in the hospital. . . . . . . . . . . . . . . . . . . . 148  Table 6.4  Results of the one-sided t-test (p-values), comparing the mean of Υ (recording counting-relaxed γ-band energy ratio) in the two environments with the alternative hypothesis that the mean of Υ in the capsule is greater than the mean of Υ in the hospital. . . . . . . . . . . . . 150  Table 7.1  Results of some epileptic seizure detection methods based on scalp EEG in comparison to the proposed method. . . . . . . . . . . . . 156  Table 7.2  Results of some epileptic seizure prediction methods in comparison to the proposed method based on the variational GMM. . . . . . . . 160  xi  List of Figures Figure 1.1  A schematic view of the PDS waveform. . . . . . . . . . . . . .  5  Figure 1.2  Electrode placement of the IFSECN 10–20 system. . . . . . . . .  7  Figure 1.3  A multichannel bipolar EEG segment from a patient with left TLE. The dashed line indicates the approximate time of the electrographic seizure onset. Sustained rhythmic patterns are visible in channels from the left side. . . . . . . . . . . . . . . . . . . . . . . . . .  Figure 3.1  Wavelet trees with three levels of decomposition: (a) DWT, and (b) WPT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  Figure 3.2  8  39  ECT data: (a) EEG from 30 s before the ECT start time to 60 s after (the time axis is scaled with respect to the ECT start time), and (b) the corresponding FFT. . . . . . . . . . . . . . . . . . . . . . .  Figure 3.3  WPER analysis of the EEG the case presented in Figure 3.2. The time axis is scaled with respect to the ECT start time. . . . . . . .  Figure 3.4  42 42  Seizure detection indices for an EEG segment from channel T3 -T5 of Patient 3 with left TLE: (a) Average WPER, and (b) Combined Index. Dashed line indicates the electrographic seizure onset. . . .  Figure 3.5  49  Seizure detection indices for an EEG segment from channel T4 -T6 of Patient 1 with right TLE: (a) Average WPER, and (b) Combined Index. Dashed line indicates the electrographic seizure onset. . . .  Figure 3.6  49  EEG signal (band-pass filtered: 0.5-70 Hz), average WPER, and combined index corresponding to a 12-second segment of a seizure  Figure 3.7  interval from channel T3 -C3 of Patient 3. . . . . . . . . . . . . .  50  An example of EEG positive zero-crossings. . . . . . . . . . . . .  52  xii  List of Figures Figure 3.8  The entropy waveform for positive zero-crossing intervals of the EEG signal in bipolar channel T4 -T6 of Patient 3 with right TLE: (a) Interictal period, and (b) Several minutes before the seizure onset to a few minutes after. Dashed line indicates the seizure onset. . . .  Figure 3.9  57  Prediction measures computed for the case presented in Figure 3.8: (a) The spatial sum of the combined alarm sequences γk , and (b) the seizure prediction index SPk (THp = 0.15). The seizure onset is indicated by the vertical dashed line.  . . . . . . . . . . . . . . .  58  Figure 3.10 Prediction measures computed for an EEG interval from Patient 5: (a) The spatial sum of the combined alarm sequences γk , and (b) the seizure prediction index SPk (THp = 0.7). The seizure onset is indicated by the vertical dashed line.  Figure 4.1  . . . . . . . . . . . . . . .  59  The average separation measure for different sub-bands in FG for a patient with left TLE: (a) Average on right side channels, (b) Average on left side channels, and (c) Average on all channels. Frequency sub-bands located between the dashed lines are mostly affected as the seizure occurs. . . . . . . . . . . . . . . . . . . . . . . . .  Figure 4.2 Figure 4.3 Figure 4.4  Determining the regularity band, FR , for the proposed wavelet-based seizure detection algorithm. This is performed only once per patient.  69  Scaling function ν(z, z0 ) : (a) z0 < Zm and (b) z0 ≥ Zm . . . . . .  73  An example of the combined seizure index for an EEG interval of channel C4 −T4 in a patient with right TLE: (a) CSI base, (b) CSI  exponent, and (c) CSI. Dashed line indicates the seizure onset. . . .  Figure 4.5  76  Steps of the proposed real-time wavelet-based seizure detection algorithm, after determining the regularity band. . . . . . . . . . . .  Figure 4.6  68  78  EEG, CSI, and channel alarms corresponding to different bipolar channels on the focus side of a patient with right TLE as well as the seizure alarm sequence (bottommost). Seizure starts at 344 s. . .  Figure 4.7  81  The CSI, channel alarm sequence, and seizure alarm sequence using 2  far moving reference (Ψk ) for the case presented in Figure 4.6 as well as the final seizure alarm sequence Ψk , generated based on both references (bottommost). . . . . . . . . . . . . . . . . . . . . .  xiii  82  List of Figures Figure 4.8  Results of applying the seizure detection method to the test epilepsy data (using Ψk ): (a) Sensitivity (%), (b) False Detection Rate (/h), and (c) Detection Delay (s). . . . . . . . . . . . . . . . . . . . .  Figure 4.9  84  Distribution of the detection delay with respect to the electrographic seizure onset for the test seizures detected by the proposed automated algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . . .  84  Figure 4.10 Onset of a detected seizure from Patient 6 with TLE. Sustained rhythmic activities with noticeable change in amplitude and frequency are seen in the channels representing the right temporal area. The arrow indicates the time that the automated method detects the seizure. . .  86  Figure 4.11 Onset of a detected seizure from Patient 8 with TLE. Sustained rhythmic activities associated with noticeable change in the frequency are clear in the channels representing the left temporal area. The arrow indicates the time that the automated method detects the seizure. . .  86  Figure 4.12 A detected seizure from Patient 12 with TLE. The electrographic seizure onset is obscured in muscle artifacts. Sustained rhythmic activities are noticeable later in the recording. The arrow indicates the time that the automated method detects the seizure.  . . . . . .  87  Figure 4.13 A detected seizure from Patient 20 with TLE. The onset of the seizure is contaminated by artifacts. The arrow indicates the time that the automated method detects the seizure. . . . . . . . . . . . . . . .  87  Figure 4.14 A short seizure from Patient 15 with eTLE which is detected by the automated algorithm shortly after the onset as indicated by the arrow.  88  Figure 4.15 A detected seizure from Patient 13 with eTLE. High frequency rhythmic activities can be seen in different channels, especially in Fz -Cz , F4 -C4 , and FP2 -F4 . The arrow indicates the automated detection time. 88  Figure 4.16 A missed seizure from Patient 3. Subtle activities occur in some channels, especially T3 -C3 , C3 -Cz , SP1 -T3 and C4 -Cz . Bifrontal frequent epileptiform discharges have been persistent during interictal state. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  xiv  89  List of Figures Figure 4.17 A missed seizure from Patient 11. Sustained rhythmic patterns occur only in few channels from the left side (SP1 -T3 and T3 -C3 ). Some channels including FP1 -F7 , F7 -T3 , and T3 -T5 also show subtle rhythmic patterns. . . . . . . . . . . . . . . . . . . . . . . . . . . .  89  Figure 4.18 False alarm from Patient 15 due to the burst of sharp waves/spikes in frontal and temporal channels. The arrow indicates the alarm time. .  90  Figure 4.19 False detection from Patient 8 resulting from a burst of non-epileptic rhythmic patterns. The arrow indicates the alarm time. . . . . . . .  91  Figure 4.20 False detection from Patient 16 due to the EMG (chewing) artifacts. The arrow indicates the alarm time. . . . . . . . . . . . . . . . .  91  Figure 4.21 Sensitivity versus false detection rate for different parameters (based on Ψk ): (a) Γ = 1, 5, 10, 20, and 50; (b) λ = 0.25, 0.5, 0.75, and 0.9; (c) Ω = 1, 1.2, 1.5, 2, and 3; (d) α = 0.01, 0.05, 0.1, 0.3, and 0.7. 92  Figure 4.22 Detection delay for different parameters (based on Ψk ): (a) Γ, (b) λ, (c) Ω, and (d) α. Solid and dashed lines present the median and average delay respectively. . . . . . . . . . . . . . . . . . . . .  93  Figure 4.23 Combined seizure index (CSI) from Patient 6 with right TLE. The CSI for different channels on the side of the seizure focus and the opposite side within a time window from -5 to 10 s with respect to the electrographic seizure onset is shown. . . . . . . . . . . . . .  94  Figure 4.24 Average of CSI for the side of the seizure focus and the opposite side in patients with TLE (only seizures from the test dataset are considered). . . . . . . . . . . . . . . . . . . . . . . . . . . .  95  Figure 5.1  Determining the discriminative histogram bins for predicting seizures. 100  Figure 5.2  Computation of the similarity index. The operation inside the dashed box is activated only if Me = 1. . . . . . . . . . . . . . . . . . . 109  Figure 5.3  Steps of the seizure prediction method based on the variational GMM. The “Histogram extraction” block is the same as the one defined in Figure 5.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111  xv  List of Figures Figure 5.4  Different measures calculated for an EEG interval from Patient 9 using the method based on the KL divergence (θc = 0.35, λ = 4.05, and θa = 0.5): (a) ∆int , (b) ∆pre , (c) rk , and (d) γk , for channel F7 -T3 ; (e) γk obtained using the top 3 channel alarms (Y = 3). Time axis is scaled with respect to the electrographic seizure onset. . . . 118  Figure 5.5  Different measures calculated for an interictal EEG interval from Patient 9 using the method based on the KL divergence (θc = 0.35, λ = 4.05, and θa = 0.5): (a) ∆int , (b) ∆pre , (c) rk , and (d) γk , for channel F7 -T3 ; (e) γk obtained using the top 3 channel alarms (Y = 3). 119  Figure 5.6  Different measures calculated for an EEG interval from Patient 1 using the method based on the KL divergence (θc = 0.4, λ = 4, and θa = 0.6), where the method misses the impending seizure: (a) ∆int , (b) ∆pre , (c) rk , and (d) γk , for channel T4 -T6 ; (e) γk obtained using the top 3 channel alarms (Y = 3). Time axis is scaled with respect to the electrographic seizure onset. . . . . . . . . . . . . . . . . . . 120  Figure 5.7  Different measures calculated using the method based on the variational GMM for an EEG interval from Patient 7 (ηc = 0.3, ηs = 0.3, and ηa = 0.5): (a)–(d) present respectively dˆk , sˆk , Ck , and γk for  channel Fz -Cz , and (e) shows γk obtained using the top 3 channel  alarms (Y = 3). Time axis is scaled with respect to the electrographic seizure onset. . . . . . . . . . . . . . . . . . . . . . . . 124  Figure 5.8  Different measures calculated using the variational GMM-based method for an EEG interval from Patient 9 (ηc = 0.45, ηs = 0.3, and ηa = 0.25): (a)–(d) present respectively dˆk , sˆk , Ck , and γk for channel F7 -T3 , and (e) shows γk obtained using the top 3 channel alarms  (Y = 3). Time axis is scaled with respect to the electrographic seizure onset. . . . . . . . . . . . . . . . . . . . . . . . . . . . 125  Figure 5.9  Current observation set (Xk ) in comparison to the interictal (Xint ) and preictal (Xpre ) reference sets for channel F7 -T3 of Patient 9 (the case presented in Figure 5.8) at different times with respect to the electrographic seizure onset: (a) -45 min, (b) -25 min, (c) -5 min, and (d) -2 min. Only the two most discriminative bins are shown (i.e. two-dimensional data points).  xvi  . . . . . . . . . . . . . . . . 126  List of Figures Figure 5.10 Different measures calculated using the variational GMM-based method for an interictal interval from Patient 9 (ηc = 0.45, ηs = 0.3, and ηa = 0.25): (a)–(d) present respectively dˆk , sˆk , Ck , and γk for channel F7 -T3 , and (e) shows γk obtained using the top 3 channel alarms  (Y = 3). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127  Figure 5.11 Different measures calculated using the variational GMM-based method for a missed seizure from Patient 1 (ηc = 0.25, ηs = 0.05, and ηa = 0.5): (a)–(d) present respectively dˆk , sˆk , Ck , and γk for channel  T4 -T6 , and (e) shows γk obtained using the top 3 channel alarms  (Y = 3). Time axis is scaled with respect to the electrographic seizure onset. . . . . . . . . . . . . . . . . . . . . . . . . . . . 128  Figure 5.12 Performance of the variational GMM-based prediction method on the test data for different values of the method parameters: (a), (c), and (e) show graphs of sensitivity versus false prediction rate for ηc , ηs , and ηa , respectively; (b), (d), and (f) present the corresponding average (blue ) and median (green ◦) prediction time for ηc , ηs , and  ηa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129  Figure 6.1  The montage used to acquire the EEG signals. The electrode “R” is used as reference while the electrode “G” is the ground. . . . . . . 134  Figure 6.2  EEG segments of 3 s of the right channel from Subject 1, while relaxed with lights on: (a) Hospital; (b) Capsule. . . . . . . . . . . . 135  Figure 6.3  The power spectra of the the left channel EEG for Subject 2, nolight/relaxed: i) in the hospital with and without notch filtering and ii) in the capsule. . . . . . . . . . . . . . . . . . . . . . . . . . 136  Figure 6.4  The normalized magnitude of the S transform in the γ-band (30-100 Hz) for 30-second EEG segments from the right channel of Subject 1, acquired in the hospital under no-light condition: (a) Relaxed without notch filter; (b) Relaxed with notch filter; (c) Counting without notch filter; (d) Counting with notch filter. In each panel, the corresponding S transform magnitude has been normalized with respect to the maximum over 0-100 Hz. . . . . . . . . . . . . . . . 141  xvii  List of Figures Figure 6.5  The normalized magnitude of the S transform in the γ-band (30-100 Hz) for 30-second EEG segments from the right channel of Subject 1, acquired in the capsule under different situations: (a) Lights off, relaxed; (b) Blackout, relaxed; (c) Lights off, counting; (d) Blackout, counting. In each panel, the corresponding S transform magnitude has been normalized with respect to the maximum over 0-100 Hz. . 142  Figure 6.6  The normalized magnitude of the S transform in frequency range of 0-30 Hz for 30-second EEG segments from the right channel of Subject 1, acquired in different situations: (a) Hospital, lights off, relaxed; (b) Capsule, lights off, relaxed; (c) Capsule, blackout, relaxed; (d) Hospital, lights off, counting; (e) Capsule, lights off, counting; (f) Capsule, blackout, counting. In each panel, the corresponding S transform magnitude has been normalized with respect to the maximum over 0-100 Hz. . . . . . . . . . . . . . . . . . . . . . . . 143  Figure 6.7  The average of Ψ, the counting-relaxed β-band energy ratio, in both environments: (a) Subject 1; (b) Subject 2; (c) Subject 3. . . . . . . 145  Figure 6.8  The average of Φ, the ratio of the β-band energy to the energy of 0-12 Hz in the counting state (relative β-band energy), in both environments: (a) Subject 1; (b) Subject 2; (c) Subject 3. . . . . . . . . 147  Figure 6.9  The average of Υ, the counting-relaxed γ-band energy ratio, in both environments: (a) Subject 1; (b) Subject 2; (c) Subject 3. . . . . . . 149  xviii  List of Abbreviations AED  Antiepileptic Drug  AP  Action Potential  ApEn  Approximate Entropy  AR  Autoregressive  ASH  Averaged Shifted Histogram  CWT  Continuous Wavelet Transform  CSI  Combined Seizure Index  CUSUM Cumulative Sum DWT  Discrete Wavelet Transform  ECT  Electroconvulsive Therapy  EEG  Electroencephalogram  EM  Expectation–Maximization  EMBS  Engineering in Medicine & Biology Society  EMG  Electromyography  EMI  Electromagnetic Interference  EPSP  Excitatory Postsynaptic Potential xix  List of Abbreviations FD  Fractal Dimension  FFT  Fast Fourier Transform  FIR  Finite Impulse Response  GMM  Gaussian Mixture Model  IFSECN International Federation of Societies for Electroencephalography and  Clinical Neurophysiology ILAE  International League Against Epilepsy  ICA  Independent Component Analysis  IPSP  Inhibitory Postsynaptic Potential  KL  Kullback–Leibler divergence  LSBB  Laboratoire Souterrain a` Bas Bruit de Rustrel  MP  Matching Pursuit  MRI  Magnetic Resonance Imaging  PDF  Probability Density Function  PDS  Paroxysmal Depolarization Shift  PSD  Power Spectral Density  SOM  Self-Organizing Map  SVM  Support Vector Machine  TLE  Temporal Lobe Epilepsy  eTLE  extraTemporal Lobe Epilepsy  WPER  Wavelet Packet Energy Ratio  WPT  Wavelet Packet Transform  WT  Wavelet Transform xx  Acknowledgments This dissertation owes its existence to the support and encouragement of many people. First, I offer my extreme gratitude to my supervisor, Prof. Guy A. Dumont, for his invaluable advice, intellectual guidance and enormous patience. I am greatly indebted to him for his support and inspiration throughout my Ph.D. research. I would also like to express my deepest sense of appreciation to my co-supervisor, Prof. Manouchehr Javidan, for his excellent advice and dedication. This thesis could not have been completed without his support and guidance. I would specially like to express my appreciation to Prof. Matthew J. Yedlin as a member of my Ph.D. supervisory committee for his constructive comments and great support. I would also like to extend my gratitude to Prof. Reza Tafreshi for his valuable comments and suggestions I relied on during my Ph.D. study. I would like to thank my external examiner, Prof. Christopher James, and other members of my Ph.D. examining committee, Prof. John Steeves, Prof. Jane Z. Wang, Prof. Philippe Kruchten and Prof. Birger Bergersen, for their valuable feedback and their time and effort. I am grateful to Prof. Bernard A. MacLeod, Prof. Ernie Puil, and Prof. Craig R. Ries at the Department of Anesthesiology, Pharmacology & Therapeutics of The University of British Columbia for their valuable advice and support at the beginning of this Ph.D. research. It was my great pleasure to collaborate with Dr. St´ephane Gaffet and Dr. Christophe Sudre from LSBB, Rustrel, France, and Dr. Philippe Lapeyrie from Car´emeau University Hospital, Nˆımes, France, throughout a part of my Ph.D. research, and I am thankful to them for their help and suggestions. xxi  Acknowledgments I would also like to thank Mr. Peter Van Rienen and Mr. Larry Stevenson in the Neurophysiology laboratory at Vancouver General Hospital for collecting the epilepsy EEG data used in this research. Special thanks to my colleagues and friends in the laboratory of Electrical and Computer Engineering in Medicine for their support and providing a great environment for research. I would like to thank my parents. You have supported me, without question and qualm, through every twist and turn. If it were not for both of you, I would not be who I am today. Finally, last but certainly not least, I would like to specially thank my wife, Azadeh, for her love, support, and patience. This work was supported in part by the University Graduate Fellowship (UGF) and Four Year Fellowship (FYF) of The University of British Columbia.  xxii  Dedication  To my parents, . . . To Azadeh, my wife and best friend, . . . for their immeasurable spiritual support and love.  xxiii  Chapter 1  Introduction The brain consists of billions of neurons. As a chronic neurological disorder affecting ∼1% of the world’s population [42], epilepsy is associated with recurrent and  sudden excessive electrical discharges, i.e. epileptic seizures, which disrupt the normal activity of neurons and change the patient’s behavior/function temporarily. Reliable automated systems for detection and prediction of the epileptic seizures would facilitate the monitoring and treatment of epilepsy and improve the quality  of life and safety for the affected patients. The Electroencephalogram (EEG) has been the most utilized tool for diagnosing various neurological disorders, including epilepsy, and studying brain function and behavior. The aim of this thesis is to develop automated real-time methods to detect and predict epileptic seizures based on scalp EEG recordings as well as to quantitatively study scalp EEG acquired in a unique ultra-shielded low-noise environment in order to evaluate the potential of that environment for novel EEG studies. This includes the establishment of novel low-noise EEG benchmarks, which could be helpful in better understanding of brain function and mechanisms deriving different brain disorders such as epilepsy.  1.1 Epilepsy and Epileptic Seizures Epilepsy is the second most common neurological disorder (after stroke) associated with recurrent, unprovoked epileptic seizures stemming from a sudden dis-  1  Chapter 1. Introduction turbance of brain function. This brain malfunction is characterized by abnormal synchronous firing of cortical neurons recruiting neighboring cells into a critical mass. Indeed, according to the definition proposed by the International League Against Epilepsy (ILAE) and the International Bureau for Epilepsy, an epileptic seizure is “a transient occurrence of signs and/or symptoms due to abnormal excessive or synchronous neuronal activity in the brain” [40]. The incidence of epilepsy varies among different age groups [24, 42] and forms a U-shape curve, which shows the lowest incidence for people between the age of 30 and 40 years. The highest incidence of epilepsy is seen in the first year of life as well as among the elderly [42, 191]. The aetiology of epilepsy is various among different age groups and geographical locations. Even if a major cause is present for epilepsy, other factors including genetic and environmental elements may affect the clinical manifestations. Generally, the congenital and perinatal factors are the most common causes for epilepsy with the onset in early childhood, while aetiology of epilepsy in adults is more likely to be external and non-genetic; however, this discrimination is not absolute at all [191, 192]. In the elderly, vascular diseases have been found to be an increasingly common aetiology of epilepsy. The other common causes include brain tumors, other neurological disorders, traumas, and infections, although a significant portion of epileptic cases have unknown aetiology [191, 192]. In 1981, ILAE classified different types of epileptic seizures, as follows [1]: • Partial (focal) seizures: A seizure is classified as a partial (focal) seizure, if the first clinical and EEG manifestations of the seizure indicate that it originates from a neuronal population confined to a part of one cerebral hemisphere. • Generalized seizures: A seizure is classified as a generalized seizure, when the first changes demonstrate the initial involvement of both hemispheres. • Unclassified epileptic seizures: If a seizure cannot be classified due to some reasons such as inadequate or incomplete data, it is labeled as an unclassified seizure.  Partial (focal) seizures are categorized into simple partial seizures, complex 2  Chapter 1. Introduction partial seizures, and secondarily generalized partial seizures [1]. During the simple partial seizure, the patient remains conscious and is able to remember what happens. In this type of seizures, the patient may exhibit motor signs, somatosensory or special-sensory symptoms (simple hallucinations), or autonomic signs such as epigastric sensations, flushing, or sweating. The complex partial seizure is, on the other hand, associated with consciousness impairment. The complex partial seizure may appear as a simple partial seizure followed by impairment of consciousness, or it is possible that the consciousness is lost at the seizure onset. The aura which is used frequently in description of epileptic seizures refers to the portion of the seizure occurring before the consciousness is impaired. Some partial seizures (simple or complex) may evolve to generalized seizures. This type of partial seizures is known as secondarily generalized. Generalized seizures are also classified into different types [1, 62]: absence, myoclonic, clonic, tonic, tonic-clonic, and atonic seizures. The absence seizures are characterized by an abrupt onset, interruption of the patient’s current activity, and a blank stare. The consciousness is impaired during the seizure but regained quickly after the seizure. The attack lasts from a few seconds to half a minute and terminates as rapidly as it started. Atypical absence seizures may have onset and/or termination which is not abrupt and be associated with changes in tone that are more pronounced. During a myoclonic seizure, sudden and brief involuntary jerks (single or multiple) occur which may be generalized or be confined to a part of the body such as face and trunk. Generalized seizures may also appear as clonic, tonic, or tonic-clonic seizures. Clonic seizures are characterized by repetitive rhythmic jerks in absence of tonic components; on the other hand, tonic seizures are associated with rigid violent muscular spasms, which bind the limbs in some tense position, and with the eye/head deviation toward one side. Tonic seizures may also involve the rotation of the whole body. The most frequently experienced type of generalized epileptic seizures is tonic-clonic. This type of seizure may commence with a vague warning (i.e., aura) in some patients, but most people lose consciousness without any premonitory signs. During the tonic phase, a sharp sudden muscle spasm occurs, and after involving respiratory muscles, there is a sound (cry or moan). The patient falls to the ground, increasing the risk of injury. Lying rigid on the ground, the patient may experience respiratory problems, 3  Chapter 1. Introduction bite the tongue, and urinate involuntarily. This tonic phase is then followed by the clonic convulsive movements which last for a variable time period. The other type of generalized seizures is termed atonic in which there is a sudden loss/reduction of postural tone that may lead to a drop head with loosening of the jaw, dropping of the limbs or even falling to the ground [1, 62]. Seizure activities can also be generally divided into two categories based on the way they terminate [37]: self-limited epileptic seizures and status epilepticus. As opposed to the self-terminating epileptic seizures which may last up to several minutes, status epilepticus is a life-threatening condition in which epileptic activity continues for 30 min or more and needs immediate medical management/care to terminate. Status epilepticus can manifest itself as prolonged seizures or repetitive seizures without full recovery in between [122, 191]. Indeed, when the natural mechanisms responsible for seizure termination fail, the seizure tends to continue indefinitely and status epilepticus occurs [37, 122]. The conventional treatment of epilepsy includes medication and surgery. Antiepileptic Drugs (AEDs) are effective in controlling seizures in most epileptic cases. According to the surveys, about 70% of patients treated with AEDs will gain long-term remission from seizures, although AEDs have potential side-effects, some of which may be long-term and irreversible [191]. Phenobarbital, Phenytoin, Valproic Acid and Carbamazepine are among the older generation, commonly prescribed AEDs. Some of the newer AEDs include Levetiracetam, Topiramate, Tiagabine, Lamotrigine and Pregabalin. AEDs have multiple different mechanisms of action. For some AEDs such as Carbamazepine, Phenytoin, and Lamotrigine the main mode of action is to block voltage-dependent sodium channel conductance, whereas some other drugs including Tiagabine, Clonazepam and Clobazam enhance the Gamma-Aminobutyric Acid (GABA) inhibitory mechanisms. Some AEDs are found to have multiple modes of action (e.g. Topiramate), while the mechanism of action for some of these drugs is not well known (e.g. Gabapentin) [191]. Medication is less effective in ∼30% of patients with epilepsy, and the treatment  is more difficult for these cases. For patients with medically intractable seizures, epilepsy surgery may be an alternative option to control seizures. At a conservative  estimate, about 2–5% of patients with medically intractable partial seizures might 4  Chapter 1. Introduction  Figure 1.1: A schematic view of the PDS waveform. benefit from surgery [191]. The success of epilepsy surgery is highly dependent on the pre-surgical evaluations which are done based on different measures including clinical information, EEG, Magnetic Resonance Imaging (MRI), functional MRI, and in some cases, Single Photon Emission Computed Tomography (SPECT), and Positron Emission Tomography (PET). Although EEG manifestation of epileptic seizures may be very different among patients, the EEG of most seizures, in general, involves sustained rhythmic patterns and/or increased amplitude [36, 57, 162]. From the neuronal point of view, intracellular recordings from epileptic neurons reveal a large shift of the resting membrane potential which is called Paroxysmal Depolarization Shift (PDS) [56, 80, 161]. PDS is associated by an increase in intracellular calcium and a train (500–800 per second) of Action Potentials (APs) [155] which may be followed by some afterdischarges [80, 108, 130, 211]. PDSs originating from a larger cortical region are accompanied by spikes recorded on the scalp. Partial seizures are thought to be initiated by abnormal discharges of cortical neurons recruiting neighboring cells to a critical mass. This process results in an increasing synchronization of neuronal activities associated with a loss/reduction of inhibitory mechanisms and/or excess excitations [108]. Figure 1.1 shows a schematic view of PDS observed in intracellular recordings from epileptic tissues [80, 130, 211].  5  Chapter 1. Introduction  1.2 Electroencephalogram (EEG) Since recorded for the first time from human subjects by Hans Berger in 1920s, EEG has been the most utilized tool in studying the brain activity and diagnosing various neurological disorders. For instance, EEG is a major measure in the diagnosis and management of epilepsy [58, 78, 145, 162], has been used to monitor anesthesia in the operating room and sedation in the intensive care unit [176, 224], and is also utilized to study the neural synchronization and brain behavior in specific frequency bands [159, 213]. The brain is made of billions of neurons (nerve cells). Each neuron consists of the soma, dendrites, and axon. The soma includes the cell nucleus and contains the cell metabolism and protein synthesis. The axon is a long cylinder-like extension of the cell which transmits electrical impulses. The dendrites are cellular extensions which are connected to the axons or dendrites of other neurons, receiving impulses from other cells or relaying these signals to others through synapses. An exchange of the ions across the nerve cell membrane induces a temporary change in the membrane potential, termed action potential or AP, which is transmitted along the axon. If the AP travels along the axon ending in an excitatory synapse, an Excitatory Postsynaptic Potential (EPSP) occurs in the following neuron. In contrast, if the synapse is inhibitory, then it generates an Inhibitory Postsynaptic Potential (IPSP) resulting in hyperpolarization [166]. The principal generators of the EEG are EPSPs and IPSPs of pyramidal neurons [34]. In the case of an EPSP, there is an active current sink at the synaptic area, where positive ions flow into the cell to depolarize the membrane locally. Simultaneously, a distant part of the cell behaves as a passive current source and drives the current flow outwards, i.e. a closed circuit. The current direction is, however, opposite for an IPSP, where an active current source and a distant passive current sink form a closed circuit. Passing through the intra- and extracellular spaces, these currents set up a potential field around the cell. The extracellular potential around the current sink is relatively negative, while it is positive near the current source. These potential fields and the related currents are very weak around a cell and are not recordable at the scalp. However, since the pyramidal cells are all aligned perpendicular to the cortex surface, the potential fields from individual neurons are  6  Chapter 1. Introduction  Figure 1.2: Electrode placement of the IFSECN 10–20 system. summed and produce recordable voltages far from the generators, provided that the activities are synchronous [34]. Various systems have been used to record EEG from the human scalp. The committee of the International Federation of Societies for Electroencephalography and Clinical Neurophysiology (IFSECN) has recommended a unique electrode placement, known as the International 10–20 system, as an standard [25]. Figure 1.2 presents the location of the electrodes in the 10–20 system. The “10” and “20” indicate that the distance between adjacent electrodes is either 10% or 20% of a specified distance measured using specific anatomical landmarks, e.g. the total distance between the front and back or left and right of the head. Each electrode is labeled by specific letters and numbers. The letters specify the anatomical area the electrode corresponds to, e.g. “F” refers to the frontal area. Even-numbered electrodes are placed on the right side of the head, while the odd numbers correspond to the left side [25]. In addition to these electrodes, sphenoidal electrodes (SP1 and SP2 ) may be used in routine clinical applications. The EEG can 7  Chapter 1. Introduction FP1−F3 F3−C3 C3−P3 P3−O1 FP2−F4 F4−C4 C4−P4 P4−O2 FP1−F7 F7−T3 T3−T5 T5−O1 FP2−F8 F8−T4 T4−T6 T6−O2 C3−Cz C4−Cz Fz−Cz SP1−C3 SP2−C4 SP2−SP1 SP1−T3 T3−C3 SP2−T4 T4−C4 250 µV 1 sec  Figure 1.3: A multichannel bipolar EEG segment from a patient with left TLE. The dashed line indicates the approximate time of the electrographic seizure onset. Sustained rhythmic patterns are visible in channels from the left side.  be recorded using referential or bipolar montages. In referential montages, the voltage differences between all electrodes and a common electrode (reference) are recorded, where each electrode-reference pair forms a channel. In bipolar montages, however, instead of using a reference electrode, the voltage difference between two designated electrodes is recorded (i.e., each electrode pair is considered as a channel). A major disadvantage of the referential montage is that there is no single reference electrode optimal for all situations since no reference is truly inactive. Bipolar montages reduce the effects of common noise/artifacts and eliminate the influence of contaminated references [25]. Figure 1.3 shows a multichannel bipolar EEG interval including the electrographic seizure onset from a 22–year– old female with the left Temporal Lobe Epilepsy (TLE), where the dashed line indicates the approximate time of the onset. Sustained rhythmic patterns are clearly seen shortly after the onset in different channels from the left side, such as SP1 –T3 , SP1 –C3 , T5 –O1 , and T3 –T5 . EEG can be also recorded directly from the human cerebral cortex, termed 8  Chapter 1. Introduction intracranial EEG. As opposed to the scalp EEG, the intracranial EEG is invasive and acquired using either grid electrodes which are placed over the cortex surface (but are not inserted into the brain) or depth electrodes which penetrate the brain. The intracranial EEG has some advantages over the scalp EEG. Since the intracranial EEG is recorded directly from the cortex, EEG is not attenuated or altered by the skull/scalp tissue, acting as a low-pass filter. Also, the EEG is not contaminated by Electromyography (EMG) artifacts, frequently seen in the scalp EEG. In addition, the intracranial electrodes can record signals from the small population of neurons, not recordable on the scalp. Therefore, epileptic seizures are detected usually earlier and more often using the intracranial recordings than the scalp signals [197]. However, the intracranial EEG is invasive and consequently less applicable in the routine clinical practice. This type of EEG is mainly used to plan/manage epilepsy surgery or monitor the brain activity during mapping of cortical function [197]. For patients with epilepsy, the EEG can be classified as: (1) interictal EEG, the EEG patterns belonging to a non-seizure state between seizures during wakefulness or sleep; (2) preictal EEG, the EEG patterns observed immediately before the seizure occurs; (3) ictal EEG, the EEG patterns confirming the occurrence of a seizure (i.e., EEG at the time of the seizure); and (4) postictal EEG, the EEG patterns observed immediately after the termination of the seizure (which could last several seconds to minutes).  1.3 Motivation As the most utilized tool in the analysis of brain activities, EEG is widely used in the diagnosis and identification of epileptic seizures. However, EEG interpretation in long-term monitoring in epileptic patients is time-consuming, tedious and expensive. Furthermore, in order to determine the seizure semiology at the onset, medical staff intervention as an integral part of the epileptic patient evaluation is required [162]; however, this may not be possible if the seizure is not identified early enough. This motivates the development of EEG-based systems for automated real-time detection of the seizure onset, which not only would facilitate the long-term monitoring and treatment of epileptic seizures but could also assist in  9  Chapter 1. Introduction lateralization/localization of the focus in partial seizures, which is helpful in presurgical evaluations [144]. Moreover, the common epilepsy treatments, medication and surgery, not only may have severe side effects but also fail to satisfactorily control seizures in ∼25% of epileptic patients [139]. Therefore, a reliable seizure prediction system based on EEG would enable clinicians to control seizures by administering therapeutic agents as early as possible and would improve the quality of life and safety for the affected patients. Such a tool can decrease the risk of injury and the intense sense of helplessness resulting from the unpredictability of seizures. In addition, a real-time system forewarning the impending seizure in advance would provide an opportunity to prevent the seizure using seizure-intervention approaches such as applying rapid-acting AEDs, electrical stimulation techniques, and local cooling [39, 71, 139, 140, 199]. One particularly important question about an epileptic seizure prediction system is “How long prior to the onset should the system generate an alarm?”. Analyses of scalp and intracranial EEG recordings over the past several years have shown that dynamical changes may be detectable a few minutes to several hours prior to the seizure onset [139]. Such a high variance of the seizure prediction time would limit the clinical application of a prediction system. Upon receiving the prediction alarm, the patient will be on alert up to several hours depending on the prediction horizon. This time period can be stressful and restricts routine daily activities. In fact, considering false alarms that a prediction device may generate, long prediction horizons are “particularly unfavorable” due to the significant time (per day) that the patient needs to wait for seizures which may never occur [172]. This would result in increasing anxiety and therefore would have negative effects on the patient’s quality of life [9]. This situation becomes more frustrating and unpleasant when the sensitivity of the prediction system is also relatively low. In addition, a long prediction horizon can be restrictive for the automated intervention system as the effect of intervention should last for long time [172]. On the other hand, a very short prediction time (e.g. one minute) may be insufficient for clinical intervention to control/abort the seizure. Therefore, the prediction time has a high impact on the clinical applicability of a seizure prediction system. Recent surveys [9, 175] have shown high interest among epileptic patients 10  Chapter 1. Introduction and/or caregivers in development of automated seizure prediction systems for both “warning” and “closed-loop intervention”. These studies report that the majority of patients/caregivers prefer short prediction times. A particular survey by Arthurs et al. [9] has indicated the prediction time of 3 to 5 min as the most preferred length of warning time based on responses received from 89 patients/caregivers, while only ∼26% of persons participating in the study preferred long warn-  ing times (i.e., more than one hour). According to this study, the rationale behind preferring the short warning time of 3-5 min has been the fact that such a duration would be enough for taking “safety precautions” and avoiding “embarrassment” without increasing “anxiety” and “stress”. It is worth mentioning that some stud-  ies have indicated the suitability of time intervals as short as ∼2 min for some  interventions such as administrating rapid-acting AEDs [171]. In another recent  study by Schulze-Bonhage et al. [175], 141 outpatients were asked to complete a questionnaire regarding seizure prediction devices. According to the results, the majority of patients (more than 80% in total) chose a warning time of less than one hour, with the strong preference of 10 min. This thesis aims to develop novel real-time automated scalp EEG-based methods for detecting the electrographic onset of the epileptic seizures as well as predicting the seizures well in advance. The other objective of the current work is to study the scalp EEG signals acquired in a unique underground low-noise laboratory to investigate the potential of this environment for novel EEG studies with the ultimate goal of establishing new EEG benchmarks. Since the scalp EEG is highly susceptible to environment noise, which distorts the signal and buries subtle but informative patterns, such low-noise EEG benchmarks would be helpful in understanding the underlying dynamics of different brain disorders, including epilepsy, as well as more thoroughly studying the normal brain function and behavior.  1.4 Thesis Contributions The major contributions of this thesis are as follows. The thesis: • Introduces a novel index, termed the Combined Seizure Index (CSI), to detect the electrographic seizure onset based on the rhythmicity and relative energy of EEG in each channel as well as the consistency among different 11  Chapter 1. Introduction channels. The CSI is a normalized index based on the Wavelet Packet Transform (WPT) and consists of two major components which are proposed for the first time in this thesis. • Proposes a novel separation measure to find the frequency sub-bands mostly affected in transition from non-seizure to seizure state.  • Introduces a new nonlinear scaling function which is used to construct the seizure energy index by scaling the relative energy calculated for each epoch  of a given EEG channel with respect to the level of separation between the seizure and non-seizure states in different frequency sub-bands in that channel (i.e., separation measure). • Proposes a novel real-time seizure detection method based on the CSI and  evaluates this technique using the test data including ∼236 h of scalp EEG  recordings from 26 patients with a total of 79 partial epileptic seizures.  • Studies the capability of the CSI in lateralizing the seizure focus in TLE. • Proposes a novel real-time epileptic seizure prediction method based on a variational Bayesian Gaussian Mixture Model (GMM) of the EEG positive  zero-crossing intervals. In this method, after constructing the histogram of zero-crossing intervals, the discriminative bins are selected as the observed data points and compared to the interictal and preictal reference sets through novel indices of dissimilarity and similarity based on the variational GMM. In the next step, for each EEG channel, a new combined index is formed and used to generate an alarm sequence. The information from individual channels is finally combined to trigger an alarm forewarning of the upcoming seizure. • Evaluates the variational GMM-based seizure prediction method using the test dataset including ∼215 h of scalp EEG with a total of 46 partial seizures in 17 patients with epilepsy and tests this technique against an analytical chance predictor. • Presents a pilot study that investigates effects of an ultra-shielded capsule 12  Chapter 1. Introduction located at the low-noise underground laboratory (LSBB), Rustrel, France, when used to acquire scalp EEG.  1.5 Thesis Outline This chapter presented the background material on epilepsy, epileptic seizures, and EEG and illustrated the research problems as well as the major contributions of this thesis. The remaining chapters are organized as follows. Chapter 2 reviews the previously published EEG-based seizure detection and prediction methods. In Chapter 3, some preliminary studies and methods, which have been accomplished/developed for detection and prediction of epileptic seizures throughout the research of this thesis, are presented. Chapter 4 describes the details of the novel automated wavelet-based seizure detection method, introduced in this thesis, and reports the evaluation results based on a large epilepsy dataset. In Chapter 5, two novel epileptic seizure prediction methods based on analysis of EEG zero-crossing intervals are proposed and described in details: a method based on variational GMM and a method based on the Kullback–Leibler divergence (KL). The performance of these techniques is evaluated using scalp EEG data and compared with that of a random (chance) predictor. Chapter 6 presents a novel study on scalp EEG recorded in an underground low-noise environment. Finally, Chapter 7 provides the summary and conclusions of the thesis and discusses the limitations of the current study and possible directions for future work.  13  Chapter 2  Literature Review Chapter 1 was devoted to present the background information on EEG, epilepsy and epileptic seizures and to explain the thesis objectives and contributions. In this chapter, the related work in the field of automated EEG-based epileptic seizure detection and prediction is reviewed.  2.1 Epileptic Seizure Detection One of the most cited automated seizure detection algorithms was developed by Gotman [57, 58], based on decomposition of EEG signals into elementary halfwaves. After reconstructing the half-wave representation of the filtered EEG signals, three measures were extracted from epochs of 2 s [57]: the average amplitude of half-waves relative to a background segment, the average duration of these elementary waves, and the coefficient of variation (ratio of standard deviation to mean) of their duration as a measure of rhythmicity. The background segment was defined as a moving window ending several seconds before the current epoch. Gotman proposed some detection criteria by defining a set of thresholds for these measures. The method was later evaluated using a large EEG dataset of 5303 h (consisting of both surface and depth recordings) with the total of 244 seizures in 49 patients, after considering some modifications [58]. In the modified method, the criteria for monitoring the relative average amplitude and the gap between the background and current epoch were changed, while a period of 8 s following each  14  Chapter 2. Literature Review epoch was also taken into account in order to truly detect the seizure activity in that epoch and reduce false detections. Using these modifications, sensitivities of 73% and 83% and false detection rates of 0.84/h and 1.35/h were reported for the scalp and intracranial EEG recordings, respectively, where the detection delay was not reported. Considering a segment after each EEG epoch to decide about the occurrence of seizure patterns in that epoch increases the detection delay and makes the method far from a real-time technique. Qu and Gotman [156, 157] proposed a patient-specific algorithm to detect the seizure onset. The method relied on a sample seizure and a set of non-seizure EEG segments, recorded evenly over 24 h, which were used to train a modified nearestneighbor classifier. They evaluated this method using both scalp and intracranial EEG and achieved 100% sensitivity along with a false detection rate of 0.21/h and an average detection delay of 9.6 s for a test dataset including 64.9 h of interictal EEG and 77 seizures in 17 patients [156]. The testing interictal data were collected at regular intervals over long-term monitoring. This patient-specific method relies on the seizure example used for training and may fail to detect seizures from other types. Therefore, for patients with multiple seizure types, more than one classifier may be required to get the perfect sensitivity. It also needs a large number of nonseizure samples to ensure a low false detection rate. In 1998, Osorio et al. [145] proposed a seizure detection method using a waveletbased Finite Impulse Response (FIR) filter. Using samples of a Daubechies–4 wavelet function as the filter coefficients, they designed a certain bandpass FIR filter covering 5 to 45 Hz. After applying this filter to the EEG signals, the median of the square values of the filter output was computed for each epoch, resulting in a “foreground” sequence. Then, the current value of a “background” sequence (i.e., reference) was computed based on the last 4 min of the “foreground” sequence. The ratio of “foreground” to “background” sequence was considered as a measure for seizure detection. A seizure alarm was produced if the maximum value of this index over all channels remained above a predefined threshold for a certain period. Using the optimal parameters, perfect performance (sensitivity and specificity of 100%) was obtained with a median detection delay of 2.1 s, when the method was evaluated using 330 ten-minute intracranial EEG segments of 16 patients. Despite the perfect results, this method was not applied to long-term recordings; there15  Chapter 2. Literature Review fore, its performance might not have been sufficiently investigated. In addition, the method was not tested on scalp recordings. This group later proposed a procedure to adapt the seizure detection algorithm using the seizure and non-seizure training segments [67]. Optimizing a performance criterion resulted in selection of the best FIR filter and percentile value, replacing the wavelet and median order statistic filters. A recent evaluation of an offline automated seizure detection system using a large test scalp EEG dataset (∼1200 h with 146 seizures in 55 patients) revealed an overall sensitivity of almost 80% and a false detection rate of ∼0.1/h [87]. In this  assessment, a detection was considered to be true when it happened within 2 min of the seizure onset, while the detection delay was not explored. The detection method is based on three measures, namely the pattern-match regularity statistic as a measure of the signal regularity, the local maximum frequency, and amplitude variation, where the last two measures are mostly used for artifact rejection [87]. Non-stationary nature of EEG signals motivates several seizure detection studies employing the Wavelet Transform (WT). Khan and Gotman [91] proposed a method to detect epileptic seizures in intracranial recordings based on the Discrete Wavelet Transform (DWT). Three features were extracted, namely “relative scale energy”, “coefficient of variation of amplitude”, and “relative average amplitude”. Then, some heuristic rules were employed for temporal detection procedure, followed by final alarm generation based on spatial information. In this method, in addition to a “background” segment similar to that one previously used by Gotman [57, 58], an adaptive “background array” of frequencies was used to reject non-seizure rhythmic activities. After trained using 222 h of intracranial EEG recordings including 97 seizures from 11 subjects, the method was evaluated using an independent dataset consisting of 229.5 h and 66 seizures in 11 patients, resulting in 85.6% sensitivity and a false detection rate of ∼0.3/h. Since the method was not specifically designed to detect seizures in the early stages of generation,  it might not be useful for real-time seizure detection. Defining similar features from wavelet coefficients, Saab and Gotman [162] proposed an approach to detect seizure onsets in scalp EEG by determining the probability that an epoch may demonstrate seizure activities. Using a large training dataset (652 h of scalp recordings with 126 seizures in 28 patients), they estimated the a priori probabilities for 16  Chapter 2. Literature Review each combination of the three extracted features. Forming a temporal index based on the estimated epoch seizure probability and considering the effect of artifacts to reduce the number of false detections, they reported an average sensitivity of 76%, a false detection rate of 0.34/h, and a median delay of 10 s (after a tuning procedure) for a test set consisting of 360 h of scalp EEG with 69 seizures in 16 patients. Based on the probabilistic seizure detection framework proposed by Saab and Gotman [162], performance of different features was evaluated in a recent study by Kuhlmann et al. [94], where six alternative wavelet-based features were also considered in addition to the features proposed in [162]. Evaluation was done using a surface EEG dataset (525 h including 88 seizures in 21 patients) based on a 10–fold cross-validation scheme, resulting in 81% sensitivity along with a false positive rate of 0.6/h and median delay of 16.9 s for the best selection of features [94]. Assessing all possible combinations of three features out of nine, the study showed that replacing the relative scale energy with the relative power improved the seizure detection performance (i.e., the best selection). In another work, evaluation of a seizure detection method based on the Approximate Entropy (ApEn) showed that incorporating the DWT in the preprocessing step increased the detection accuracy from 73% to 96% [143]. Meier et al. [128] proposed a generic real-time seizure detection approach based on a Support Vector Machine (SVM) as the classifier and different features including power of the Continuous Wavelet Transform (CWT) at specific scales. The method was designed to take into account different morphologies of the seizure onset, where the features were optimized using an iterative procedure. Using surface EEG recordings (total of ∼43 h including 91 seizures in 57 patients), this  study reported an average sensitivity of ∼96%, an average false detection rate of  ∼0.5/h and the delay of 1.6±2.8 s. Although the study showed that considering  the seizure morphologies could increase the detection performance, those results need to be verified using separate test data due to the significant overlap between the dataset used for evaluating the method and the dataset used for optimizing/calibrating the features. Shoeb et al. [190] used wavelet decomposition to extract the energy of each EEG epoch at different time scales, capturing the EEG morphology in each chan17  Chapter 2. Literature Review nel. Grouping features from all channels into a single vector, they encoded the spatial distribution of EEG waveforms on the scalp by the placement of features from each channel within the vector. This large feature vector was then classified as seizure or non-seizure using a SVM with radial-basis kernel, trained using a number of seizure examples. In a patient-specific mode and using a leave-oneout cross-validation testing scheme, they evaluated this method utilizing the total of 60 h of surface EEGs from 36 subjects including 139 seizures. They reported ∼94% sensitivity, a false detection rate of 0.25/h, and an average latency of 8 s.  The results are promising; however, the false detection rate of the method needs to be validated using more interictal data from the subjects due to the relatively high occurrence rate of seizures in this database (∼2.31 seizures per hour). Also, in addition to the computational cost of training the SVM for each patient, recording multiple seizures from each patient for the training procedure is time-consuming and can increase the hospitalization period, limiting the application of this technique in routine clinical environments. Hesse and James proposed a spatial topographical approach to track and detect epileptiform activities in multichannel EEG based on Independent Component  Analysis (ICA) [69]. Extracting source waveforms and sensor projections from a reference EEG segment using ICA, a target activity, e.g. epileptic seizure, was tracked and detected based on the correlation between the target sensor projection and the signal subspace in a moving-window procedure. Testing the method on one epileptic patient, their preliminary results are promising. Recently, an offline seizure detection approach based on analysis of the extracted features through a two-dimensional space by means of nonlinear decision functions was proposed for intracranial recordings [210]. Different features in time and frequency domains were employed to classify the test EEG data, after determining the related nonlinear decision boundaries using the training data. It was shown that the proposed mathematical foundation can provide a unified approach to evaluate the performance of different features used in seizure detection. Based on the proposed twodimensional plane and the nonlinear decision functions, Tito et al. [209] evaluated the performance of the correlation sum in seizure detection. Adeli et al. [3] investigated a wavelet-chaos-based method to detect seizures using EEG. The ability of the largest Lyapunov exponent and correlation dimension 18  Chapter 2. Literature Review to differentiate among the normal, interictal, and ictal waveforms was assessed. They found statistically significant differences in the values of these two measures among the three groups by considering specific EEG frequency sub-bands, whereas these discrepancies were not necessarily significant when analyzing the original EEG. Extending their wavelet-chaos-based approach by adding the standard deviation of EEG as the third measure, considering mixed-band features (as opposed to specific-band features), and employing neural networks in the classification stage, they reported about 96% classification accuracy [53, 54]. A recent study evaluates the performance of the Fractal Dimension (FD) as a measure of the irregularity of a curve in detection of epileptic seizures [154]. Three algorithms of Katz’s [86], Higuchi’s [70], and k-nearest neighbour for estimating the FD were compared. Computing the FD for EEG epochs of 2s, the Katz’s and Higuchi’s algorithms failed to produce consistent change during seizures. In contrast, the FD estimated by the nearest-neigbour approach dropped close to the seizure onset. Using a test set of ∼292 h of scalp EEG with 18 seizures from four  patients, the seizure detection method based on the k-nearest neighbour algorithm  achieved 100% sensitivity, average detection delay of 8.82 s, and false positive rate of 0.42/h. A seizure onset identification approach was proposed by O’Neill et al. [144]. Using appropriate segments from preictal and ictal intervals, they chose special temporal patterns resulting in the most discrimination between these segments. A weighted sum of these selected patterns resulted in a temporal-pattern filter where the coefficients of this summation were obtained by the least square approach. Finally, they showed that applying the resultant filters to scalp EEG recordings could uncover seizure onset patterns obscure in the raw EEG. However, results of applying the method to prolonged EEG data were not reported in this study. Detection of epileptic seizures using artificial neural networks has been proposed in several studies. One of the best known approaches was proposed by Gabor et al. [46]. After applying a wavelet-based filtering approach to EEG signals, a Self-Organizing Map (SOM) neural network was trained using the timefrequency representation of several seizure examples. Comparing the extracted feature vector of test epochs with the neural network reference vectors and employing a “rule-based decision sequence”, they analyzed EEGs to recognize epileptic 19  Chapter 2. Literature Review seizures. This method was later assessed using more than 4550 h of surface EEG from 65 patients including 181 seizures, revealing a 92.8% sensitivity with an average false detection rate of 1.35/h; however, the seizure detection latency was not reported [45]. The SOM has been also utilized for detection of epileptiform discharges in the scalp EEG by James et al. [78]. This epileptiform discharge detection approach consisted of three major stages. In the mimetic stage, the raw candidates for epileptiform discharges are extracted from EEG. In the next stage, a trained SOM is employed as a classifier. These first two stages form a singlechannel detector. In the last stage, the outputs of different channels (i.e., spatial information) are combined using a “fuzzy-logic rule-based” system to generate the final output of the detection system. The performances of an Elman network and a probabilistic neural network in detection of epileptic EEG were compared by Srinivasan et al. [198]. Since the ApEn drops during the seizure period, they chose this measure as the input of these neural networks (classifiers). Selecting different parameter combinations in the computation of ApEn, they evaluated these two networks using a dataset that included scalp EEG recordings of 5 normal subjects and the intracranial tracings of 5 epileptic patients. They concluded that Elman network generally revealed better performance (an overall accuracy of more than 95% in all combinations). However, choosing different types of EEG recordings for seizure and non-seizure periods could be a drawback of this work since it might affect the performance of the neural networks. That is, the natural differences between depth and surface EEGs could increase the discrimination between the two classes regardless of the seizure occurrence. Also, since the epileptic EEG epochs were always selected from the seizure period, the performance of the classifiers on interictal intervals was not assessed. In another study, three neural network models employing adaptive activation functions in the hidden layer were proposed to detect epileptic seizures [208]. Results showed an average sensitivity and specificity of 100% for all three models, while the training time for the model utilizing the Morlet wavelet function with free parameters was shorter than other models. Seizure detection latency was not reported for these neural network models. Lack of the detection delay assessment is also a limitation of some recent seizure detection studies based on artificial neural networks [48, 61]. 20  Chapter 2. Literature Review Recently, an automated patient-specific method was proposed for early detection of epileptic seizures using scalp EEG [131]. Extracting fifty eight features including various spectral, time-domain, wavelet, and complexity measures, the features providing the maximum mutual information with the classifier output and resulting in less redundancy were selected for each channel of data. A recurrent neural network classifier was trained for each channel, and the outputs of the classifiers from different channels were fed to a decision module to label the current EEG epoch. The neural network classifiers were designed to have five output nodes to label the EEG as interictal, preictal, ictal, postictal, and artifact. The algorithm was tested in two modes using surface EEGs: preonset detection (using preictal output of classifier) and onset detection (using ictal output). The preonset detector was successful in early seizure detection in 14 of 25 patients with a median delay of -51 s and false positive rate of 0.06/h. The onset detector, however, could detect all seizures with false detection rate of 0.023/h and median delay of 4 s. Despite the promising results, a major drawback of the proposed patient-specific method is the extensive training step which makes the method less clinically applicable. In fact, training several neural networks (one per channel) and optimizing the algorithm parameters as well as selecting proper training samples for each of five states (classified by the neural network) take a relatively long time and need special supervision by an expert. Moreover, since the algorithm was only tested on the patients with single type of seizure morphology, it is likely that the training step even needs more supervisory effort when the method is used for the patients with multiple seizure morphologies. In a recent study by Aarabi et al. [2], a fuzzy rule-based method was proposed to detect seizures from intracranial EEG and evaluated using ∼302 h of in-  tracranial recordings including 78 seizures in 21 patients. Four features namely the sample entropy, dominant frequency, average amplitude, and coefficient of variation of amplitude were extracted from EEG epochs of 2.5 s, after preprocessing. The fuzzy-logic-based decision-making block monitored the EEG patterns in each channel and combined the channel-based information to make the final decision. Four bipolar channels, two for the epileptogenic zone and two from an associated distant region, were used. At the same time, a back-propagation neural network, trained using a portion (40%) of the whole dataset, was used to determine the pa21  Chapter 2. Literature Review rameters and thresholds required in the decision-making block. The study reported a sensitivity of 98.7%, a false detection rate of 0.27/h, and an average detection delay of 11 s; however, the method needs to be evaluated using a separate test set since it seems that the training data were included in the data used for evaluation. Methods based on Autoregressive (AR) modeling have been used in analysis of epileptic EEG. Khamis et al. [90] investigated the performance of a seizure detection method based on AR spectral analysis. Choosing four scalp electrodes near the epileptic focus of each patient, the AR method was applied to the EEG epochs from each channel, and the channel-based information were combined to label the multichannel epoch (termed “data block”). Evaluation of the method using 1624 h of scalp EEG from 10 patients with left temporal epilepsy (83 seizures in total) resulted in an overall sensitivity of 91.57% and an epoch-based false positive rate of 3.97%. The detection delay was not assessed in this study. Franaszczuk and Bergey [43] proposed a measure of synchronization for interictal and ictal EEG based on multichannel AR model of data. The preliminary results of analyzing the EEG recordings from three patients using the proposed measure showed increased synchronization (i.e., better fit to the linear model) for the ictal periods which often persisted in the postictal period. In another study by Alkan et al. [6], the EEG power spectra was estimated based on AR model and employed as the input of the logistic regression and multilayer perceptron neural network classifiers to detect epileptic seizures. Testing the method using 200 examples from 11 subjects (5 epileptic patients), classification accuracies of 89.5% and 90.5% were achieved respectively for the logistic regression and neural network classifiers. In the same study, the performance of periodogram and multiple signal classification approaches used for power spectrum estimation was compared with AR method. Results showed that AR performed better than periodogram but was less accurate than multiple signal classification. Subsai et al. [201] compared the performance of the multiple signal classification and eigenvector methods (i.e., subspace-based methods) with AR methods in detection of epileptic seizures, when they used them to estimate the EEG power spectra from healthy and epileptic subjects. The study reported that the power spectra computed by subspace-based methods demonstrated the epileptic seizures more clearly than those obtained by AR parametric methods. 22  Chapter 2. Literature Review Analysis of epileptic EEG based on the Matching Pursuit (MP) has been also reported in several studies. Franaszczuk et al. [44] analyzed the intracranial ictal recordings from 9 patients with mesial temporal onset using the MP algorithm, where the time-frequency energy distribution of each seizure was studied. Also, analyzing depth EEG recordings of 17 seizures from 12 patients using the MP algorithm, Bergey and Franaszczuk [15] reported that early in the seizure the most rhythmic seizure patterns are more complex than limit cycle behavior and that the EEG complexity increases later in the seizure. Wilson et al. [219] evaluated the performance of the “Reveal” algorithm which is based on the MP. The method was tested using scalp EEGs from 426 epileptic (1049 h with 670 seizures) and 33 nonepileptic patients (465 h), resulting in 76% sensitivity and 0.11/h false detection rate. The detection delay was not reported for this method.  2.2 Epileptic Seizure Prediction Two distinct scenarios are usually considered to describe the evolution of epileptic seizures [117, 139]. One scenario, which could be conceivable for the initiation of generalized seizures, is that the seizure happens abruptly without any previous dynamical changes. On the other hand, the second scenario maintains that there is a long-term gradual dynamical change (or a cascade of changes) leading to the ictal state, which could be more probable for partial seizures. Indeed, it emphasizes the existence of a preictal state considered to be the transition from the interictal to the ictal state, which is supported by some clinical findings. Previous studies reported that the cerebral blood flow increases before the epileptic seizure onset [14, 215]. In addition, increase in cerebral oxygen availability [4] and significant changes of the Blood Oxygen Level Dependent (BOLD) signal [38] prior to the seizure onset have been reported. Changes in the heart rate before the seizure have also been studied [31, 88, 142]. From a neuronal point of view, partial seizures are thought to be initiated by a group of neurons discharging abnormally and recruiting the adjacent neurons [139]. Based on these concepts and clinical signs, several studies have been carried out so far to find a reliable solution for epileptic seizure prediction using EEG recordings. The predictive value of the interictal spikes has been investigated in several  23  Chapter 2. Literature Review studies, with conflicting results reported [104]. Lange et al. [99] observed a systematic change in spike activities before seizures. Analyzing patients with partial seizures (in the temporal lobes), they found that the occurrence rate of focal spikes reduced several minutes before the seizure onset, while the bilateral spike activities increased. In another survey, in 1989, Wieser [217] reported a significant decrease in the interictal spike activities prior to the seizure onset in long-term EEG monitoring of patients with epilepsy. In contrast, Gotman and Koffler [60] rejected systematic changes of the spike rate before seizures and reported an increase in spike discharges after seizures, not restricted to the focal area. Also, studying 10 patients with intractable epilepsy, Katz et al. [85] indicated that there were no spike rate changes in the 5-min interval before seizures comparing to more distant intervals. Linear approaches such as AR modeling were among the first attempts to predict seizures. Rogowski et al. [160] proposed a prediction method based on an AR estimation of EEG signals. Analyzing the poles of the predictor during the time, they found that in most cases there was a pole with a specific trajectory representing a transition to the ictal state several seconds (up to 6 s) before the seizures. In 1998, Salant et al. applied a multichannel EEG analysis based on AR modeling [164]. In this study, impending seizures from 5 patients were predicted from 1 to 6 s in advance using pole trajectory monitoring and also calculation of coherence between two channels. In another study by Chisci et al. [23], the performance of a seizure prediction algorithm based on AR modeling of EEG signals and SVM classification was assessed. After extracting a feature vector made up of the AR coefficients from each multichannel epoch, a nonlinear SVM with a Gaussian kernel was employed to classify this feature vector. To deal with the undesired fluctuations of the classifier output time series and reduce the number of false alarms, a Kalman filtering approach was considered as the postprocessing step. The method was evaluated using the depth EEG recordings from 9 patients based on a Monte Carlo evaluation scheme with ten trials (separate training and test sets were used), resulting in 100% sensitivity and the average false prediction rate ranging from 0 to 0.60/h across patients. The average prediction time of ∼5 to ∼92 min was reported for different  patients. Comparing the results of the method with the case that the Kalman filter was removed from the processing procedure showed the effectiveness of the 24  Chapter 2. Literature Review Kalman filtering in reducing the false positive rate. The method needs to be evaluated using more data including the scalp recordings as also mentioned by the authors as their future work. Litt et al. studied long-term intracranial recordings from 5 patients with mesial TLE [113]. They found that the EEG energy intermittently increased in the epileptic focus area and theses energy elevations became more frequent from about 7 h before the onset. In addition, computing the accumulated energy from EEG signals, they reported an increase in this measure in the 50 min before the onset. A later study by Harrison et al. [65] raised doubt about the predictive power of the accumulated energy. In a recent study [149], a patient-specific method for prediction of epileptic seizures using the spectral power of nine frequency bands was proposed. These linear features extracted from all EEG channels for each 20-second window (with 50% overlap) were then labeled using a cost-sensitive SVM classifier, followed by a postprocessing step based on a Kalman filter. A cross-validation approach was employed to evaluate the performance of the method using ∼433 h of intracra-  nial EEG from 18 patients with total of 80 seizures. Using bipolar recordings, a sensitivity of 97.5% and a false positive rate of 0.27/h were reported. The (average) prediction time of the method was not specified, but a prediction horizon of 30 min was used to evaluate the algorithm. The method was tested against an analytical Poisson-based random predictor [195], showing the superiority of that method. The study highlighted the discriminative power of the γ-band (30–128  Hz) features. The method clearly shows promise as a potential seizure predictor; however, its false prediction rate is still high to be used in practice. To better investigate the method performance and evaluate its reliability as a warning device for patient with epilepsy, it is necessary to apply it to more EEG data. This would include long-term EEG recordings from other databases, scalp recordings (which are susceptible to higher level of noise and artifacts), and EEGs acquired outside of the hospital environment, where people practice their normal activities and/or are on the medication. The theory of nonlinear systems has also been used in several EEG studies of epilepsy in order to characterize the dynamical transition from the interictal to the ictal state. In many of these studies, the time-delay embedding method is 25  Chapter 2. Literature Review used to reconstruct the phase (state) space trajectories from the EEG scalar time series [139]. Given the time series {xi } (where i = 1, . . . , N ), the corresponding  state (phase) space vectors {xi } are defined by the time-delay embedding method  as xi = [xi , xi+τ , . . . , xi+(m−1)τ ]T where τ and m are, respectively, the time delay and embedding dimension [84, 139]. In 1990, analyzing depth-EEG recordings from a patient with partial epileptic seizures, Iasemidis et al. [75] found that the largest average Lyapunov exponent as  a measure of chaotic behavior reveals a specific profile when calculated for successive EEG windows, from 10 min before to 10 min after the seizure. By reconstruction of the phase space using the time-delay embedding method, this research group showed that the measure drops significantly at the start of the seizure. In 2003, Iasemidis et al. [76] proposed an adaptive approach to predict seizures based on the convergence of the short-term maximum Lyapunov exponent (STLmax) among critical electrodes in the preictal state. Applying a moving-window analysis to compute the STLmax values of all EEG channels, for each pair of electrodes, an index based on the difference of the STLmax values was considered as a measure of entrainment of those two electrodes. For a group of sites, the average of these indices, corresponding to different pairs of electrodes, was defined as the group entrainment index. Determining some optimal groups of sites and monitoring their entrainment indices, a prediction alarm was set if any of these indices transited from a value over a predefined threshold to a value less than another predefined threshold. In this adaptive approach, the optimal groups of electrodes were reselected after each warning of an impending seizure according to some defined criteria. Applying the method to the continuous intracranial EEG recordings (ranging from 0.76 to 5.84 days) of 5 patients with TLE, they reported a sensitivity of 82.6% with a false prediction rate of 0.17/h and an average prediction time of 100.3 min for the test data, after estimation of optimal settings for each patient based on the training data. A time horizon of 3 h was considered to evaluate the generated alarms. Despite the encouraging results of this method, calculation of Lyapunov exponents is computationally expensive. In addition, reliable estimation of the Lyapunov exponents requires a large number of data points; however, for such a long EEG segment, stationarity is not preserved. The ability of the Lyapunov exponents for predicting epileptic seizures have also been questioned by 26  Chapter 2. Literature Review Lai et al. [97, 98], describing the statistical fluctuations and noise as the two major factors preventing the Lyapunov exponents to be a reliable predictive tool. Some studies employed nonlinear measures based on the correlation sum (as an estimator of the correlation integral). Estimating the “local probability density”, the correlation sum counts the number of pairs of points in the state space which are closer than a specific radius [139]. Martinerie et al. [123] proposed a seizure prediction method using correlation density. Also referred to as Lerner density, the correlation density is defined as the correlation sum that is computed for a fixed radius [139]. In a sliding-window approach, Martinerie et al. [123] analyzed intracranial EEG signals from 11 patients after reconstruction of the phase space using time-delay spatial embedding. It was shown that the profile of the correlation density decreases during preseizure periods and reaches its lowest value at the ictal state. In this study, a statistical test was employed, rejecting the hypothesis that the trends of the correlation density resulted from stochastic fluctuations rather than EEG dynamics. Eighty-nine percent of seizures (17 out of 19) were predicted with the prediction time of 2–6 min. The study was restricted to short recordings (40 min with 20-min interictal period) which only included seizures occurring during the awake state, and the false prediction rate was not analyzed. Based on the assumption that epileptic seizures are associated with a lower complexity in EEG signals, the correlation dimension as a measure of complexity has been used to analyze epileptic EEG in some studies [106, 107]. Investigating the spatio-temporal alternations of complexity using a moving-window correlation dimension analysis in intracranial epileptic EEG recordings from 20 patients with TLE, Lehnertz and Elger [107] found the lowest dimension during the ictal period in the focal area. Also, some temporary transitions from high to low values in dimensionality were recognized in preictal, postictal and even interictal states in the focal area. A gradual decrease in these alternations was found spatially with increasing distance from focal sites. Based on these results, the primary foci of seizures were correctly lateralized based on the dimension variance in interictal states. This group also evaluated the capability of the correlation dimension for predicting epileptic seizures [106]. Using 68 depth-EEG data sets of 16 patients including 52 interictal and 16 preictal segments, the correlation dimension of each 30-second EEG window was computed from the corresponding phase space vec27  Chapter 2. Literature Review tors reconstructed by the time-delay embedding method. Defining a threshold, they found that not only did the the correlation dimension values decrease significantly prior to the onset of seizures, but also the duration of this drop was maximum in the preictal state. In this retrospective approach, seizure onsets were predicted up to 25 min in advance. Apart from the difficulties regarding the computation of the correlation dimension and the need of a large number of data points, this method needs to be applied in a prospective scheme in order to evaluate its performance, especially in terms of the false positive rate. One such assessment has been done by Harrison et al. [66] using long-term recordings, which shows that the correlation dimension does not have predictive power for epileptic seizures. Hively et al. presented model-independent indicators to detect the dynamical changes in nonlinear time series and showed the superiority of these phase-space dissimilarity measures to the traditional measures, such as correlation dimension and Kolmogorov entropy, by testing them on the Lorenz model and epileptic EEG data [73]. They proposed a channel-consistent epileptic seizure forewarning approach based on these phase-space dissimilarity measures and applied it to ∼261 h  of scalp EEG recordings from 41 patients [72]. After converting the filtered EEG data into a symbolized form, the corresponding phase space vectors were constructed using the time-delay embedding method. Then, the discrete distribution of the phase space vectors for each window was calculated and compared to all of the base case distributions using the dissimilarity measures. They reported a sensitivity of 87.5% (35 out of 40 temporal lobe seizures), a false prediction rate of 0.021/h and an average prediction time of ∼35 min. One major limitation of the study is  that all of the available data were used for training the method, i.e. there was no separate test set for evaluation of the method performance. Therefore, despite the promising results, the method needs to be applied to independent test epileptic data in order to accurately assess its performance. Jia et al. [82] proposed a seizure prediction method based on the Lempel–Ziv complexity [109] of a two-symbol sequence, derived from the EEG time series. This binary sequence was calculated from EEG in two stages: 1) computing the absolute difference between the EEG time series and its mean value and 2) comparing the resultant absolute difference sequence with its mean value [82]. The normalized Lempel–Ziv complexity of this binary sequence (measuring the gen28  Chapter 2. Literature Review eration rate of new patterns in the sequence) was then used to identify the preictal state. For this purpose, the complexity was calculated for each electrode, smoothed and averaged over the group of focal electrodes as well as the group of remote electrodes. The difference between the average complexity calculated for focal and remote groups was then calculated and used as the feature for a linear SVM classifier. In a prospective scheme, the interictal and preictal periods of the previous seizures were used to train and optimize the classifier in order to label the current EEG epochs. This method was evaluated using intracranial EEGs from two patients with frontal lobe epilepsy, revealing sensitivities of 77.8% (14/18) and 66.7% (4/6) respectively. The number of false alarms for the two patients was 3 (in ∼10 h) and 2 (in ∼4 h), and the average prediction time was ∼16 and 7 min.  In 1999, Le Van Quyen et al. [101] proposed a method to anticipate seizure  onsets using the similarity between the reference and current dynamics based on a nonlinear analysis of EEG zero-crossing intervals. Constructing the reference dynamics from an interictal period quite far from any seizures, a similarity index was computed for each time window (25 s) of the EEG signal, based on the crosscorrelation between the dynamics of that EEG segment and the reference dynamics. To overcome some drawbacks of the time-delay embedding method, such as dependency on large data sets and sensitivity to the EEG amplitude fluctuations resulting from noise or spike activities, the corresponding phase space was constructed using the sequence of time intervals between positive zero-crossings in this method. This similarity decreased during preseizure period gradually and increased again during the postictal period. Applying the proposed method to the intracranial EEG recordings from 13 patients with TLE, 19 out of 23 seizures were predicted successfully (∼83% sensitivity) with an average prediction time of 5.75 min. An in-sample optimization was done to determine the parameters involved in producing a prediction alarm. In another study by this research group [102], investigating the performance of the aforementioned method, they found that the preictal changes characterized by the similarity index were not confined to the epileptogenic regions. Also, results showed that the preictal state was associated with a frequency shift towards lower frequencies, especially the higher delta and theta bands. In 2001, Le Van Quyen et al. [103] applied this algorithm to scalp EEG signals. Twenty-six surface EEG recordings from 23 patients with TLE were analyzed using a 30-second moving 29  Chapter 2. Literature Review window. The method resulted in 96% sensitivity, where seizures were predicted several minutes before they occurred (mean 7 min); however, the false prediction rate was not reported. A drawback of this method is using a fixed reference segment. That is, due to the complexity of EEG, the interictal dynamics may change by time; thus, a fixed reference segment may decrease the accuracy of the method in long-term monitoring. In addition, although an in-sample optimization was used to determine algorithm parameters in some cases, the method was not tested on independent data sets. Analysis of synchronization between different EEG recording sites has also been employed in some studies to characterize dynamical transitions in the epileptic brain. In 2000, Mormann et al. [135] introduced a measure of phase synchronization, termed the mean phase coherence, to analyze the synchrony between two EEG channels (i.e. bivariate synchrony), as the pathological neuronal synchronization is commonly accepted as a critical incident in most theories of epilepsy. Employing this measure in a moving-window analysis of intracranial EEG signals of 17 patients with TLE, this group found a significant difference between values of the measure in the interictal and preictal segments. While the mean phase coherence revealed high values interictally, it decreased before seizures in some channel combinations. Also, in 14 patients, they could recognize the focal area correctly based on the measure averaged over time and space. However, no results were reported in this study using long-term continuous recordings. In another survey in 2003, this research group compared the capability of the mean phase coherence and maximum linear cross-correlation (as a measure of lag synchronization) in anticipating seizure occurrence using 31 h of depth-EEG signals from 10 TLE patients [136]. They showed that both measures decreased during the preictal period despite high values in the interictal state and had a medium level of correlation with each other. In 12 of 14 available seizures (∼86%), both measures could detect the preseizure state with 100% specificity after performing an in-sample optimization procedure for each measure. The anticipation time ranged from 4 to 219 min (mean 86 min) and from 7 to 218 min (mean 102 min), respectively, for the mean phase coherence and maximum linear cross correlation. The EEG dataset used in this study only included recordings from the awake state. In addition, the results were only reported for the data used in the optimization procedure (i.e., in-sample 30  Chapter 2. Literature Review optimization), and no results on an independent dataset as well as on continuous long-term EEG recordings, including different physiological states, were reported. These results revealed no predictive advantage for the nonlinear measure (mean phase coherence) over the linear one (cross correlation) for the given dataset which is in agreement with previous findings by Jerger et al. [81]. In another study by Mormann et al. [138], the potential of 30 different linear and nonlinear measures in prediction of epileptic seizures was compared using long-term intracranial recordings from five patients, showing that the linear measures had similar or even better performance than nonlinear measures. In a study on application of phase synchronization in detection of the preseizure period, Le Van Quyen et al. [105] employed an approach based on defining some reference clusters (or a library) of interictal synchronization patterns. Given a multichannel epoch, each synchronization pattern is obtained by computing the level of phase-locking between every two channels in 15 frequency bands (2 Hz steps from 0 to 30 Hz). The elements (channels and frequency bands) of the resulting vector which discriminated the interictal reference clusters from a selected preictal interval were then chosen to form a feature vector. Comparing the feature vector calculated for each (current) epoch with that of the reference clusters, this group could obtain a sensitivity of 70% for seizure anticipation in a dataset consisting of 305 h of intracranial EEG recordings from 5 patients (52 seizures). The method parameters were optimized to reach a high specificity for each patient (more than 95%). A mean anticipation time of 187±56 min was reported in this study. In this method, using fixed references may affect the performance especially in long-term recordings. In another work [21], Ch´avez et al. analyzed the intracranial EEG recordings from two epileptic patients using two nonlinear measures of coupling: the phaselocking index and the nonlinear regression coefficient. A significant decrease of synchrony, mainly in the frequency band of 10-25 Hz, was reported by this study in the focal area ≫30 min before the seizure onsets in both patients (sensitivity and  false positive rate were not specified).  The seizure prediction performance of changes in bivariate phase synchrony, measured by the mean phase coherence, between pairs of EEG channels was evaluated in a recent patient-specific study [95]. Long-term continuous intracranial 31  Chapter 2. Literature Review recordings (∼597 h with total of 73 seizures) from 6 patients was analyzed by considering all possible channel pairs and different methods, i.e. different thresholding approaches, window lengths, filtering schemes, and prediction horizons. Decreases and increases in preictal synchrony were both studied in this work. For each patient, the seizure prediction performance was compared with an analytical Poisson random predictor [170]. Results showed that bivariate-synchrony-based prediction within 15 min of the seizure onset could not be different from chance in general, since the performance of the top 5% of channel pairs were close to the top 5% of the Poisson-based random predictor performance. For each patient, the performance of the best channel pair was better than that of the Poisson-based random predictor for a specific set of thresholds. In a four-fold cross validation analysis, the study revealed the sensitivity of 50 to 88% and the corresponding false prediction rate of 0.64 to 4.96/h on the test data for the best channel pair of each patient, where the best channel pair was initially chosen based on all seizures (i.e., training and test seizures). The statistical significance of the cross-validation analysis was assessed using alarm time surrogates [8], showing that for most cases the average test sensitivity was higher than the average sensitivity resulting from the random predictor based on alarm time surrogates. The study suggested to investigate the measures of multivariate synchrony in combination with nonlinear classifiers. The performance of different bivariate measures of the EEG synchronization for predicting epileptic seizures was explored by Mirowski et al. [132]. Using the intracranial recordings of 21 patients, they analyzed six different bivariate measures: cross-correlation, nonlinear interdependence, difference of short-term Lyapunov exponents, wavelet-based phase-locking synchrony, entropy of phase difference, and wavelet coherence. Each measure was calculated for 5-min long EEG blocks, resulting in a “pattern” for each block. The patterns corresponding to each measure were then labeled using three different classifiers, the logistic regression, convolutional networks, and SVM. Using separate test and training datasets for each patient, they evaluated the performance of the combination of each pair of measure-classifier. The results of this patient-specific study showed that the combination of the convolutional networks and wavelet coherence could predict perfectly (100% sensitivity with no false alarms) the test seizures for 15 (out of 21) patients. The results are promising, but further assessment is necessary since the 32  Chapter 2. Literature Review test dataset of each patient include only one or two seizures. O’Sullivan-Greene et al. [146] investigated the reliability of the EEG synchronization for the purpose of seizure prediction using a simplified network of linear coupled oscillators with linear interconnection. The observability of such a linear model was studied, and it was shown that even this simple linear system is not fully observable in practice due to different factors including the limited measurement precision and noise. They reported that although by increasing the number of channels the observability can be improved, the problem remains unsolved because of the limited channels available for the practical EEG machines. This study concluded that tracking the synchronization from scalp or intracranial electrodes, placed on the surface of the cortex, is an “ill-posed” problem and the synchronization can be distinguishable on EEG only if significant parts of the network (brain) are synchronized (i.e., the seizure is already established). They indicated seizure prediction based on synchrony analysis could be feasible through very localized EEG measurements, e.g. using depth electrodes implanted in the deep cortex. Although the results of this study are still subject to debate, this study did not address this fundamental question: why would the full observability be a necessary condition for the predictability? Based on the observability issue raised by O’Sullivan-Greene et al., they proposed a new paradigm for seizure prediction/early detection using “active” signal probing [147], following some previous studies on anticipating the seizure onset based on the brain response to the external stimulations [83, 202]. Through simulation, O’Sullivan-Greene et al. showed that predicting (early detecting) seizures based on EEG synchronization could be viable when an external stimulus was applied [147]. The underlying idea was that a stable system (i.e., brain state in the normal/interictal situation) would only response significantly to the stimuli with the frequencies close enough to its natural frequencies, and therefore, there would be some alteration in the system response to such stimuli when it moves toward an abnormal situation, e.g. a seizure state. In an study by D’Alessandro et al. [30], a multifeature and multichannel seizure prediction approach, in which the optimal selection of features and channels was used to anticipate seizures from each individual patient, was proposed. Three level features were used in this study. In the first level, six different linear and non33  Chapter 2. Literature Review linear features, namely curve length, energy, nonlinear energy, spectral entropy, sixth power, energy of wavelet packets were proposed. In the second level, some measures of the first-level features such as minimum, maximum, median, mean, variance, and integral were defined, while the third level features included the measures of the second-level features. In an intensive two-stage search process, the best features and channels were selected for each patient. In the first stage, a genetic algorithm procedure was used and the results were refined based on their performance when fed to a probabilistic neural network (i.e., the classifier used in this work). Using the intracranial EEG from four patients, an average sensitivity of 62.5%, and an average false prediction rate of ∼0.28/h were reported for a test  set separated from the training set. The prediction time was in average 3.45 min. One interesting result of this study was that the optimal (prediction) channel was different from the focal channel in all cases. Recently, the potential of the pattern-match regularity statistic, as a measure of regularity, for prediction of epileptic seizures from scalp EEG was evaluated by Chien et al. [22] (the performance of this measure in offline seizure detection was previously investigated by the same research group [87]). The prediction algorithm was based on the convergence of the pattern-match regularity statistic among a group of electrodes, selected using the training data. Using a separate test set of long-term scalp EEG recordings from 31 patients (60 seizures in total), a sensitivity of 68.3% and a false prediction rate of 0.235/h was reported. The algorithm was also tested against a random predictor. The random alarms were generated such that the number of them matched the number of alarms generated by the algorithm for each segment of the test data. After repeating the random procedure 1000 times on the test data, the distribution of sensitivities from the random predictor was calculated, showing that the sensitivity of the algorithm was higher than 91% of the values resulting from the random prediction.  2.3 Conclusion This chapter reviewed different techniques and methods, previously proposed in the literature for automatic EEG-based epileptic seizure detection and prediction, and reported their results, strengths and weaknesses.  34  Chapter 2. Literature Review Automated seizure detection based on EEG has been the subject of research for decades with the goal of facilitating the long-term monitoring of epileptic patients, providing the opportunity to determine the seizure semiology at the onset (which is helpful in pre-surgical evaluations), and thereby improving the treatment of epileptic seizures. Several techniques have been proposed to identify the ictal patterns, but automated real-time detection of epileptic seizures has remained problematic. A reliable algorithm which is helpful in routine clinical environments has to be able to detect seizures shortly after the onset with a high sensitivity and a small false detection rate, while its computational complexity is low enough for real-time implementation. However, most of the developed methods did not satisfy all these criteria. Although some methods revealed promising results in terms of sensitivity and false detection rate, they either were designed to perform offline or resulted in an unacceptably long average detection delay. In some studies, the detection delay was not even reported/assesed. Another limitation of some previously developed patient-specific detection techniques is their dependency on intensive training steps, resulting from large training datasets and/or algorithms with high computation cost, which limits their application in the routine clinical environments, e.g. by increasing the hospitalization period. It is worth highlighting that even in the case of generic techniques which were trained using very large datasets from different patients to be general enough for clinical use, they needed some (patient-specific) tuning when applied to a test data. While automated detection of epileptic seizures is of great interest from the treatment/diagnosis aspect, reliable epileptic seizure prediction would significantly enhance the chance of controlling/aborting seizures by administering therapeutic agents as early as possible, reduce the risks and improve the quality of life for the patients with refractory epilepsy. Over the past three decades, many studies were accomplished to investigate the predictability of seizures based on various linear and nonlinear measures extracted from EEG. Nonetheless, the problem of reliable epileptic seizure prediction remains unsolved and challenging since the developed methods did not provide acceptable performance (sensitivity and specificity) for practical use and/or failed to perform better than chance [139]. One major shortcoming with the previous studies has been the high false prediction rate, limiting their application in practice. In many studies, proposed methods were trained/op35  Chapter 2. Literature Review timized on the same dataset used for evaluation. Also, despite the necessity for comparing the performance of seizure prediction methods with chance using the analytical frameworks [170, 195, 220] or time surrogates approaches based on Monte Carlo simulations [7, 8], most of these techniques were not tested against random (chance) predictors. This thesis aims to develop automated real-time techniques for detection and prediction of epileptic seizures. In the next chapter, the preliminary work accomplished in this regard is presented as the basis for the methods proposed in Chapter 4 and Chapter 5.  36  Chapter 3  Seizure Detection and Prediction: Preliminary Studies and Background The previous chapter reviewed the state of the art in automated detection and prediction of epileptic seizures. This chapter elaborates upon the background and preliminary studies on detection and prediction of seizures accomplished throughout the research work of this thesis. After a brief review of the Wavelet Transform (WT), two methods for detecting seizures are presented. The remainder of the chapter is devoted to describe the concept of zero-crossing in EEG and introduce an epileptic seizure prediction approach based on the entropy analysis of zero-crossing intervals. Parts of the work presented in this chapter have been published in Proceedings of International IEEE EMBS Conferences in 2007 [179], 2008 [180], and 2009 [181].  3.1 Wavelet Transform As a time-frequency representation, the WT is an appropriate analytical tool to process transient, non-stationary, and time-varying signals such as EEG [17, 121, 152]. The WT decomposes a given signal x(t) using a set of basis functions. Each basis function is a scaled (dilated) and translated (shifted) version of a basic 37  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background waveform called the mother wavelet. The Continuous Wavelet Transform (CWT) of the continuous signal x(t) is defined by CW Tx (τ, a) =  ∞  1 |a|  x(t)ψ ∗  −∞  t−τ a  dt  (3.1)  where ψ(t) is the mother wavelet, which is scaled by a and translated by τ . In addition, a multi-resolution description is used in wavelet analysis to decompose the signal x(t) into increasingly finer details. In this case, x(t) is expanded based on two sets of basis functions [17], the wavelets and the scaling functions, as follows ∞  x(t) = k  2j0 /2 cj0 (k)ϕ(2j0 t − k) +  j=j0 k  2j/2 dj (k)ψ(2j t − k),  (3.2)  where functions ϕ(t) and ψ(t) are the basic scaling and mother wavelet, respectively. In the above expansion, the first summation presents an approximation of x(t) based on the scale index of j0 , while the second term adds more details using larger j (finer scales). The coefficients in this wavelet expansion are called the Discrete Wavelet Transform (DWT) of the signal x(t). Using orthogonal bases, these coefficients can be calculated by the following inner products [17] ∞  cj (k) = x(t), ϕj,k (t) =  −∞ ∞  dj (k) = x(t), ψj,k (t) =  −∞  2j/2 x(t)ϕ(2j t − k) dt  (3.3a)  2j/2 x(t)ψ(2j t − k) dt  (3.3b)  where cj (k) and dj (k) are, respectively, the scaling (approximation) and wavelet (detail) coefficients. Figure 3.1(a) presents a typical three-level decomposition tree using the DWT for the given signal x(t) associated with the root of the tree, i.e. node (0, 0) corresponding to subspace Ω0,0 . In general, node node (ℓ, ϑ) which refers to subspace Ωℓ,ϑ is located at the ℓth decomposition level of the tree, where ℓ = 0, 1, . . . , L. The depth of the tree is L = log2 n, where n is the signal dimensionality. At each level (except the root), ϑ is either 0 (left node) or 1 (right node). At the first dyadic decomposition step, the frequency band corresponding to the root, i.e. the frequency content of x(t), is divided evenly into two frequency sub-bands (lower 38  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background  (a)  (b)  Figure 3.1: Wavelet trees with three levels of decomposition: (a) DWT, and (b) WPT.  and higher frequencies) which are inherited by nodes (1, 0) and (1, 1) in the first level of the tree. In the next dyadic decomposition step, the frequency content of the node representing the lower sub-band, i.e. (1, 0), is also split evenly into two other low and high sub-bands, forming the frequency spectra of the nodes in the next level. The Wavelet Packet Transform (WPT) is a generalization of the DWT in which the dyadic decomposition process is accomplished in both lower and higher frequencies. This general decomposition scheme offers a greater range of possibilities for signal processing than the DWT. A typical scheme for a wavelet packet tree with three levels of decomposition is shown in Figure 3.1(b). In the wavelet packet tree, node (ℓ, ϑ), which corresponds to subspace Ωℓ,ϑ , is the ϑth node at decomposition level ℓ from the root of the tree, for ℓ = 0, 1, . . . , L and ϑ = 0, 1, . . . , 2ℓ − 1,  where L = log2 n (n is the signal dimensionality). The “frequency resolution” at each level of the tree is defined as the number of nodes associated with the band-  width of 1 Hz. In each decomposition step, the frequency band associated with each node (parent) is divided evenly into two sub-bands (low and high frequencies) each of which is inherited by one node (child) in the next level. Therefore, at the ℓth decomposition level, each node is associated with bandwidth of Fs /2ℓ+1 , where Fs is the sampling frequency. This decomposition scheme results in minimum bandwidth associated with each node (maximum frequency resolution) at the last decomposition level [152].  39  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background  3.2 Wavelet-Based Seizure Detection Due to the non-stationarity of EEG signals, the WT is a suitable analytical tool to automatically identify the ictal periods. In this section, the details of two seizure detection techniques based on the WPT are described, and results of the two methods are compared using an epilepsy dataset.  3.2.1 Wavelet Packet Energy Ratio Proposed by Tafreshi et al. [203], the Wavelet Packet Energy Ratio (WPER) is an index for detecting epileptic seizures based on the energy ratio of two dominant EEG frequency bands, namely, the seizure and background (non-seizure) frequency bands. Changes of the EEG frequency content during the seizure cause a significant increase in the WPER, which is used to mark the seizure occurrence. To compute the WPER, after determining the seizure and background frequency bands, the energy of the seizure frequency band is calculated using wavelet packet coefficients for every epoch of the EEG signal in each channel. This energy is, then, divided by the number of nodes in the wavelet packet tree corresponding to this frequency band. Finally, this normalized energy is divided by the energy of the background frequency band, which is also normalized by the number of corresponding nodes. Equation 3.4 describes the computation of the WPER index WPER =  Ns i=1 Nb i=1  M 2 k=1 Csik M 2 k=1 Cbik  ×  Nb , Ns  (3.4)  where Ns and Nb are, respectively, the number of nodes lying in the seizure and background frequency bands. M is the number of coefficients (number of basis functions) in each node. For all epochs, the same level of decomposition is chosen for consistency. Cs and Cb are the corresponding wavelet packet coefficients for the seizure and background frequency bands respectively. In this thesis, the WPER is first employed to detect seizures induced by Electroconvulsive Therapy (ECT), as a model for seizure detection. Later, the performance of this index in detection of epileptic seizures is assessed.  40  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background Application of WPER on Electroconvulsive Therapy (ECT) Data ECT is used to treat clinical depression that is unresponsive to drugs. During each treatment, a psychiatrist induces a generalized tonic-clonic seizure with electrical current after an anesthesiologist administers a short-acting general anesthetic. Typically, a course of 12 ECT treatments is provided during an initial four-week period. Detection of the generalized seizure during ECT is typically done with the visual EEG analysis as it is more dependable than monitoring motor activity alone [125, 126]. The EEG is also used to characterize seizures in ECT [125]. For example, seizure duration has been studied extensively, although there is no general agreement on using it as a criterion of ECT effectiveness [89, 125, 158]. Some results on automated estimation of this parameter have also been reported [49]. In this section, the WPER index is evaluated using EEG signals acquired during ECT, as a model for seizure detection, and the results are presented. In this study, 50 scalp (surface) one-channel EEG traces, recorded from nine patients at the University of British Columbia Hospital following informed written consent, were used. Each recording included one ECT seizure episode. Stimulation was done using the pulse width of 0.5 ms and frequency of 70 Hz. Data were sampled at 128 Hz and filtered using a 60-Hz notch filter. To analyze the data, each EEG recording was segmented into two-second epochs with one-second overlap to be suitable for wavelet analysis [121]. The frequency spectrum of EEG signals revealed some tangible differences in the lower frequency range (<10 Hz) between the seizure and non-seizure periods. Figure 3.2 shows an EEG period from 30 s before the ECT start time to 60 s after, along with the corresponding Fast Fourier Transform (FFT), where the generalized seizure occurred from ∼20 to 35 s after ECT start time.  Dividing the 50 EEG recordings into training and test sets, four detection approaches were employed to evaluate the capability of the WPER in seizure detection. The training set consisted of 9 EEG recordings (the first recording of each patient), while the 41 remaining traces were considered as the test set. The training set was used to define the seizure and background frequency bands as well as the threshold values in each detection approach. According to the changes in the frequency content of the EEG recordings, the background and seizure frequency  41  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background  4  500  4  From −30 to 0 sec.  x 10  µV  250 0  2  −250 −500 −30  −25  −20  −15  −10  −5  0 0  0  1  2  3  4  4  500  µV  250  4  ECT Resistance Testing  0  6  7  8  9  10  6  7  8  9  10  7  8  9  10  2  −250 −500 0  5  From 0 to 30 sec.  x 10  Generalized Seizure 5  10  15  20  25  0 0  30  1  2  3  4  5  ECT Stimulus 4  500  4  From 30 to 60 sec.  x 10  µV  250 0 −250 −500 30  2  Postictal (isoelectric) 35  40  45  50  55  0 0  60  1  2  3  4  Time (sec.)  5  6  Frequency (Hz)  (a) EEG  (b) FFT  Figure 3.2: ECT data: (a) EEG from 30 s before the ECT start time to 60 s after (the time axis is scaled with respect to the ECT start time), and (b) the corresponding FFT. 6  WPER  5 4 3 2 1 0 −30 −25 −20 −15 −10 −5  0  5  10  15  20  25  30  35  40  45  50  55  60  Time (sec.)  Figure 3.3: WPER analysis of the EEG the case presented in Figure 3.2. The time axis is scaled with respect to the ECT start time.  bands were chosen as 0.5 to 1.7 Hz and 1.8 to 5 Hz, respectively. This selection was consistent with the previous research indicating dominant slow-wave activities during ECT seizures [93, 119]. Figure 3.3 depicts the WPER waveform for the case presented in Figure 3.2, where the seizure starts about 20 s after ECT start time. Due to the increase of the WPER during the seizure period and the minimum duration usually considered for an ECT seizure [89, 158], two distinct thresholds (amplitude and duration) for the WPER peaks were defined to detect seizure periods. To reduce the delay in seizure detection in case of using both thresholds together, immediately after detecting a WPER value greater than the amplitude 42  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background Table 3.1: The results of applying the WPER algorithm to the test ECT dataset for different detection approaches. Detection Approach  Sensitivity (%)  Number of False Detections  1 2 3 4  75.6 87.8 92.7 95.1  6 13 9 7  threshold, the detector assumed that it detected a WPER peak, went backwards and found the peak onset. Then, when the time difference between the current epoch and the onset of the WPER peak was greater than the duration threshold, the detector generated an alarm indicating the occurrence of a seizure period. Four detection approaches were used in this study as follows: 1. Fixed amplitude threshold for all patients (no duration threshold). 2. Patient-specific amplitude thresholds (no duration threshold). 3. Fixed amplitude and duration thresholds for all patients. 4. Patient-specific amplitude thresholds along with a fixed duration threshold. Using the training dataset, the fixed amplitude threshold in approach 1 was set to 1, while this value was defined as 0.65 in approach 3. Also, the fixed duration threshold was set to 15 s in approaches 3 and 4. Applying these detection approaches to the test data produced the results summarized in Table 3.1, where the WPER index was computed based on the wavelet coefficients in the last decomposition level using Daubechies-6 wavelet. In the first approach, selecting a fixed amplitude threshold for the WPER index resulted in a relatively low sensitivity. A significant improvement in sensitivity was obtained by choosing flexible thresholds (approach 2). However, in this approach, the number of false detections also increased significantly. In the third approach, using two fixed thresholds instead of one, the sensitivity improved and the number of false detections decreased in comparison to approach 2. Finally, the fourth approach with flexible amplitude threshold and fixed duration threshold resulted in the highest sensitivity with a low number of false detections. 43  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background  3.2.2 A Novel Wavelet Index to Detect Seizures Despite its promising results, the WPER is a noisy index, and therefore, it is susceptible to high false detection rates. This index is not robust enough and may demonstrate changes irrelevant to EEG patterns (see Section 3.2.3). In addition, defining a fixed specific frequency band representing the background (non-seizure) is not appropriate in many cases, due to the high variability of EEG patterns. Here, a novel wavelet-based index for detecting epileptic seizures based on identification of rhythmicity in scalp EEG signals is proposed. A significant number of epileptic seizures are associated with rhythmic activities in the frequency range of 3 to 29 Hz [57, 162]; therefore, EEG rhythmicity can be an indicator of the ictal state in different channels. EEG, however, includes different types of nonepileptic rhythmic patterns which may affect the performance of such a detection approach. Accordingly, to increase the specificity of the detection algorithm, the energy (amplitude) of EEG is also considered. The proposed measure is a combined index sensitive to both the rhythmicity and energy of EEG signals and is defined as the product of regularity and amplitude indices which are computed as follows. Regularity Index as a Measure of Rhythmicity To compute the regularity index, it is first necessary to define a frequency band in which the rhythmicity of EEG is considered as a probable sign for ictal activity. This frequency band is termed the regularity band. In a moving-window analysis, the kth EEG epoch is decomposed using the WPT to obtain the coefficient vector Vk corresponding to the regularity band at the last decomposition level in the wavelet packet tree, resulting in maximum frequency resolution. Finding the first N largest absolute values of Vk elements (here, N = 5), the one which has the highest energy in its vicinity is chosen as the dominant coefficient in vector Vk (the energy is defined as the sum of the corresponding coefficient square values). The frequency band corresponding to the vicinity of the dominant coefficient is considered as Fd with a central frequency of fc . Suppose yk (t) is the time-domain signal corresponding to coefficient vector Vk (inverse WPT); then, the raw regularity index Rk is computed as the maximum cross-correlation between yk (t) and 44  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background the reference signal xk (t) by Rk = max τ  ∞ −∞ xk (t + τ )yk (t) dt ∞ ∞ 2 2 −∞ xk (t) dt × −∞ yk (t) dt  (3.5)  where xk (t) is a pure sinusoidal waveform defined as xk (t) = sin(2πfc t). By definition, this index is confined to [0, 1]. The more similar these two signals are, the higher the obtained value of Rk is. The raw regularity index is, then, averaged over consecutive epochs as AVRk =  1 Lf  Lf −1  Rk−i  (3.6)  i=0  where k represents the current epoch number, and Lf is the length of the movingaverage filter. Since there is usually a minimum level of rhythmicity in EEG signals, a nonlinear scaling is applied to the average regularity index AVRk to highlight the high regularity values. This scaling is performed by Equation 3.7, resulting in the regularity index Rk 4  Rk = 1 − exp −  AVRk 4  1 − AVRk  (3.7)  Amplitude Index as a Measure of Relative Energy To decrease the false positive rate of the algorithm, it is necessary to ignore lowamplitude activities in the regularity band. However, it should be also considered that the absolute value of the EEG amplitude may not characterize seizure. That is, high-amplitude EEG does not necessarily correspond to an ictal state. Therefore, in this approach, a relative index is employed to reduce the effects of lowamplitude rhythmic activities by considering the typical EEG amplitude during seizures, without highlighting the high-amplitude activities. After determining a typical seizure amplitude, termed atyp , a pure sinusoidal waveform is defined as zk (t) = atyp xk (t) = atyp sin(2πfc t) for each EEG epoch (xk (t) is the sinusoidal reference used in Equation 3.5). Then, applying the WPT to this waveform, the  45  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background coefficient with maximum absolute value in the last decomposition level is found, and the energy stored in its vicinity is computed. This energy, named Eref , is then used to compute the raw amplitude index for the kth epoch as  Ak =   Ek /Eref ,  if Ek /Eref < 1  1,  (3.8)  otherwise,  where Ek is the energy stored in the vicinity of the dominant coefficient in Vk . Finally, the amplitude index Ak is defined as the smoothed version of Ak , as follows Ak =  1 Lf  Lf −1  Ak−i  (3.9)  i=0  After computing the regularity (R) and amplitude (A) indices, the combined index C for the kth EEG epoch is defined as Ck = Ak × Rk  (3.10)  Accordingly, a novel index is formed that monitors both the rhythmicity and relative energy of EEG epochs and shows a significant increase as seizures occur. Due to the definition of the combined index, its value is confined to [0, 1]; i.e., it is a normalized index. This advantage provides an opportunity to compare different seizures.  3.2.3 Epileptic Seizure Detection Results In this section, the performance of the proposed wavelet-based combined index and WPER in detecting epileptic seizures is evaluated using a surface EEG dataset. Epilepsy Data To assess the performance of the combined index and WPER, we used scalp EEG data provided by the EEG department of Vancouver General Hospital after ethics approval. In this study, the dataset included ∼75.8 h of multichannel recordings  from 14 patients with total of 63 epileptic seizures. Patients included nine females  46  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background Table 3.2: EEG data used to evaluate the WPER and combined index. Patient  Recording Length (h)  Number of Seizures  1 2 3 4 5 6 7 8 9 10 11 12 13 14 All  5.24 3.10 3.94 2.80 2.42 2.62 2.40 3.00 8.11 8.14 6.00 10.00 15.40 2.62 75.79  4 3 2 5 3 3 7 4 6 3 3 7 10 3 63  and five males with an average age of 29.8 years, ranging from 18 to 56 years old. The EEG signals were sampled at 256 Hz. Table 3.2 shows details of data analyzed. To apply a moving-window analysis, each EEG recording was segmented into two-second windows with one-second overlap. This segmentation results in epochs, the length of which is power of two, suitable for analysis using wavelets [121]. Clinical Results To analyze the EEG recordings of each patient, the frequency bands required to compute the combined index and the WPER, i.e., the regularity band for the combined index and the dominant frequency bands for the WPER, were determined separately using the first EEG recording/seizure of that patient. Table 3.3 shows this selection for all patients included in this study. To compute the combined index, the typical seizure amplitude atyp was selected as 80 µV for all patients. The length of the moving-average filters (Lf ) used in computing the combined index was set to 5. Also, to smooth the WPER index, a moving-average filter with the  47  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background Table 3.3: The frequency bands selected to analyze EEG recordings using the combined index and WPER.  Patient  Combined Index Regularity Band (Hz)  WPER Dominant Bands (Hz): Seizure/Background  1 2 3 4 5 6 7 8 9 10 11 12 13 14  2-6 4-10 4-10 4.5-10 3-10 3-10 3-10 3-10 4-10 9-10 3-10 10-25 8-15 4-10  3-6 / 1-2.5 5.5-9 / 1.5-4 4-10 / 1-3 5.5-9 / 1.5-4 3-9 / 1-2.5 3-9 / 1-2.5 3-10 / 1-2.5 3-9 / 1-2.5 5.5-9 / 1.5-4 9-10 / 1-3 3-10 / 1-2 12-25 / 1-10 8-15 / 1-5 5.5-9 / 1.5-4  same length was applied to this index. Computation of both measures was done using Daubechies-6 wavelet. Figure 3.4 and Figure 3.5 present examples of the combined index and average WPER. In Figure 3.4, the temporal changes of these indices for an EEG segment from channel T3 -T5 of Patient 3 (with left TLE) are depicted, while Figure 3.5 shows theses measures for a part of EEG recording related to channel T4 -T6 of Patient 1 suffering from right TLE. According to a neurologist inspecting the data, the seizure onset (indicated by the dashed line) is about 3740 s and 3615 s for the fist and second cases, respectively. As shown in these figures, the WPER is much noisier than the combined index. In addition, while there is a big difference between the maximum WPER amplitude values in these two cases, the combined index introduces a fixed amplitude range as it is a normalized index. Figure 3.6 zooms in on a 12-second EEG segment of a seizure interval in channel T3 -C3 of Patient 3 and depicts the corresponding average WPER and combined index profiles. This figure clearly shows that the 48  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background  Average WPER  15  10  5  0  1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 3200 3400 3600 3800  Time (sec.) (a)  Combined Index  1 0.8 0.6 0.4 0.2 0  1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 3200 3400 3600 3800  Time (sec.) (b)  Figure 3.4: Seizure detection indices for an EEG segment from channel T3 -T5 of Patient 3 with left TLE: (a) Average WPER, and (b) Combined Index. Dashed line indicates the electrographic seizure onset.  Average WPER  2.5 2 1.5 1 0.5 0  1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 3200 3400 3600 3800  Time (sec.) (a)  Combined Index  1 0.8 0.6 0.4 0.2 0  1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 3200 3400 3600 3800  Time (sec.) (b)  Figure 3.5: Seizure detection indices for an EEG segment from channel T4 -T6 of Patient 1 with right TLE: (a) Average WPER, and (b) Combined Index. Dashed line indicates the electrographic seizure onset.  49  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background  1.2  Average WPER  25  Combined Index  20  1 0.8  15  Combined Index 0.6  Average WPER  10 0.4 5  0.2  0  0 EEG  T3−C3  3783  3784  3785  3786  3787  3788  3789  3790  3791  3792  3793  3794  3795  Time(sec.)  Figure 3.6: EEG signal (band-pass filtered: 0.5-70 Hz), average WPER, and combined index corresponding to a 12-second segment of a seizure interval from channel T3 -C3 of Patient 3.  combined index is more robust than WPER. Indeed, one may find some significant changes in WPER values for pretty similar EEG profiles (here, rhythmic EEG patterns), whereas the combined index follows an approximately constant trend. In the quantitative evaluation of these two indices, patient-specific thresholds were used. A channel detection was made when the index under evaluation surpassed the predefined threshold, and a seizure detection alarm was generated when at least three channel detections (not in the same channel) occurred within 5 s. Successive detections were assumed as a single detection, provided that their time difference was less than 30 s. The results are presented in Table 3.4. Overall, most of the seizures were detected by both the combined index (52 out of 63) and WPER (54 out of 63). However, the false detection rate was found to be significantly lower for the combined index. The WPER resulted in less detection delay than the combined index. The high false detection rate obtained for the WPER clearly verifies that this index is very noisy and not suitable for practical use.  50  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background Table 3.4: Results of applying the combined index and WPER to the epilepsy data.  Patient  SE (%)  WPER FDR MDD/ADD (/h) (sec.)  SE (%)  Combined Index FDR MDD/ADD (/h) (sec.)  1 2 3 4 5 6 7 8 9 10 11 12 13 14 All  50 100 100 80 100 100 57.1 100 100 100 100 100 70 100 85.7  0 11.0 2.0 8.9 12.0 12.6 9.2 0.67 22.5 15.1 9.3 4.1 0.39 12.2 7.8  100 100 100 80 100 100 71.4 100 100 66.7 100 42.8 80 66.67 82.5  0.19 0 0 0 0 0.38 2.1 0 0.25 1.22 1.83 1.3 0.32 7.25 0.88  18/18 4/9.6 15/15 1.5/8.5 0/0 0/1.6 25.5/29.5 27.5/27 0/1 6/5 0/1 10/10.28 9/9.43 0/0 7/9.6  9/8.5 14/14.6 8/8 13/18.2 28/29.3 7/7 8/10 26.5/32.7 8.5/11.6 12/12 15/15.67 9/10 7/9 16.5/16.5 10.5/14.09  SE: Sensitivity; FDR: False Detection Rate; MDD: Median Detection Delay; ADD: Average Detection Delay.  3.3 An Entropy-Based Approach to Predict Seizures Using EEG Zero-Crossings One scenario which is usually considered to describe the evolution of partial epileptic seizures maintains that there is a long-term gradual dynamic change (or a cascade of changes) leading to the ictal state. Indeed, it highlights the existence of a preictal state which can be considered as a transition from the interictal to the ictal state and is supported by some clinical findings [139]. In this part of the thesis, details of a new method to predict epileptic seizures based on preictal changes are described. This method is based on entropy analysis of the positive zero-crossing intervals in the surface EEG and its derivatives.  51  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background  Zero Level  Tℓ Tℓ+1 Iℓ = Tℓ+1 − Tℓ  Figure 3.7: An example of EEG positive zero-crossings.  3.3.1 EEG Zero-Crossings In this study, instead of amplitude, EEG dynamics are analyzed based on the time intervals between successive positive zero-crossings (i.e., passing from negative to positive values). Zero-crossing analysis has been applied previously to EEG studies on sleep [194], Alzheimer’s disease [68], and epilepsy [101]. Zero-crossing intervals are a specific form of interspike intervals [79, 168], preferred in some neurophysiological studies [115, 116], and in particular a type of threshold-crossing interspike intervals, which can be interpreted as return times to a Poincar´e secant in phase space [151]. One advantage of the zero-crossing approach is its robustness against amplitude noise and artifacts [68, 101]. Accordingly, since surface EEG is susceptible to different types of noise and artifacts, this approach removes the undesired components to some extent. Moreover, in this approach, dynamical information can be extracted using a significantly lower amount of data. Figure 3.7 shows an example of EEG positive zero-crossings. Analyzing EEG epochs, let Tℓ be the time of the ℓth positive zero-crossing in a particular epoch after detrending (i.e. removing the mean value and any linear trends) where ℓ = 1, 2, . . . , L (L is the total number of positive zero-crossings); then, this epoch can  52  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background be represented with a set of zero-crossing intervals as I = {Iℓ | Iℓ = Tℓ+1 − Tℓ }.  (3.11)  This set of data points is then used to monitor the underlying EEG dynamics in order to predict epileptic seizures.  3.3.2 Methodology In this method, the Probability Density Function (PDF) of I (Equation 3.11) in each epoch is used to characterize EEG dynamics. The kernel density estimation [193] is employed as a non-parametric approach to estimate the PDF of zerocrossing intervals. Given N data points {x1 , x2 , · · · , xN } of an unknown PDF,  p(x), the estimated PDF using kernel K(·) is pˆ(x) =  x − xn 1 N K , N w n=1 w  (3.12)  where w is the smoothing parameter, also called the window width. Choosing a Gaussian kernel in this work, the window width is defined as w=σ ˆ  4 3N  1/ 5  ,  (3.13)  where σ ˆ is the estimated standard deviation of data. This equation results in an optimal window width for a normal PDF [193] and a sub-optimal estimation for non-Gaussian distributions. In addition to the EEG signal, the first and second derivatives of EEG are analyzed for characterization of the underlying mechanisms. Empirically, it was found that preictal changes of the distribution of positive zero-crossing intervals are more pronounced in EEG derivatives than EEG in some cases. In fact, by including the first and second derivatives, the PDF of intervals between the extrema (1st derivative) as well as saddle points (2nd derivative) are also studied. To reduce the effect of noise and artifacts and improve the specificity of the method, it is first necessary to define a range of acceptable positive zero-crossing intervals which is patientspecific. Indeed, only values lying in this range are considered in estimation of the 53  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background PDFs, and the rest are recognized as outliers. Here, this range is determined based on the power spectral density of EEG waveforms during the ictal period. That is, analyzing the EEG in the seizure period, a rough frequency range [f0 , f1 ] characterizing the ictal activities can be determined; this could be the regularity band determined for the combined index in Section 3.2.2. This frequency band is then extended to [f0 (1−δ), f1 (1+δ)], and the range of acceptable positive zero-crossing intervals is defined as [1/f1 (1 + δ), 1/f0 (1 − δ)] where 0 ≤ δ ≤ 1. Typically, the  dominant frequency band of the ictal period does not change significantly from one seizure to another for a specific patient. Thus, for each patient, this range of values can be determined properly by analyzing one seizure episode. In this work, δ was empirically set to 0.1. Entropy as a Measure of Irregularity in EEG Epileptic seizures can be interpreted as manifestations of the brain transitions from chaos to order [163]. By monitoring the irregularity level of EEG, it would be possible to characterize these dynamic changes. In this work, the PDF of positive zero-crossing intervals for the kth epoch in the EEG signal and its first and second derivatives are estimated, respectively named pˆ0k , pˆ1k , and pˆ2k . Then, the differential entropy [100] of each PDF is calculated by ∞  h(X) = −  p(x) ln p(x) dx  (3.14)  −∞  where p(x) is the given PDF. As approaching to the seizure onset, the synchronization of neuronal activities increases which is associated with a loss/reduction of inhibitory mechanisms. As a result, it is expected that the entropy decreases during the preictal period. Therefore, it would be feasible to predict impending seizures by applying a change detection procedure to the resulting entropy time series. Upcoming Seizure Alarm To detect decreases in entropy time series, a one-sided Cumulative Sum (CUSUM) procedure [120, 148] is employed. As a robust statistic, CUSUM minimizes the detection delay for any fixed false alarm rate [12]. Suppose the three entropy time  54  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background series are defined as {h0k } (EEG), {h1k } (1st derivative), and {h2k } (2nd derivative),  where k represents the epoch number and hki is computed by Equation 3.14 from pˆki (i = 0, 1, and 2). Then, the one-sided CUSUM test to detect a decrease in hki can be performed in a recursive form [120] as i Ski = max 0, (g i − εsi ) − hki + Sk−1  (3.15)  where Ski is the CUSUM value for the kth epoch, g i is the goal value and εsi is a positive threshold. Then, defining a decision boundary G, an alarm sequence is generated by 1, Ski ≥ G (3.16) γki = 0, otherwise. The goal value g i is determined adaptively for each epoch in this work. A moving background is defined from 15 to 10 min before the current epoch. Then, the median of the corresponding entropy values in the background is considered as the goal value. However, to avoid the false alarms resulting from sudden increases in the entropy followed by a decrease, e.g. the increase of entropy in the postictal period, the goal value is modified using an interictal segment as a reference. Let µ i and σ i be the mean and standard deviation of {hik } for the reference. Then,  the computed g i is acceptable only if g i ≤ µ i + σ i ; otherwise, g i = µ i . After  determining the goal value for the current epoch, εsi = αg i where 0 ≤ α ≤ 1. The parameters α and G are determined specifically for each patient and are fixed for all entropy time series.  After generating the alarm sequences for the three time series, they are combined for each EEG channel as γk = η0 γk0 + η1 γk1 + η2 γk2 , where  2 i=0 ηi  (3.17)  = 1 and ηi ≥ 0. Now, considering different EEG channels and  analyzing them as described above, combined alarm sequences from all channels  are processed in a time window with the length of L epochs (here, 10 min), i.e. spatio-temporal analysis. Defining a forgetting factor λ, the seizure prediction in-  55  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background dex, termed SP, is defined as a multivariate index for the kth epoch by SPk = min 1,  L−1  1 Cmin  L−1 l=0 exp(−λl) l=0  γk−l exp(−λl) ,  (3.18)  where Cmin is the minimum number of channels required to show an entropy drop, and γk is defined as  CT  γk,j ,  γk =  (3.19)  j=1  where γk,j is the combined alarm sequence calculated for the kth epoch of channel j by Equation 3.17, and CT is the total number of EEG channels. Finally, an alarm anticipating an upcoming seizure is generated as soon as SPk surpasses a predefined threshold, termed THp . This threshold is defined specifically for each patient as the maximum of the SP index for the interictal reference. In this study, for all cases, parameters λ and Cmin were empirically set to 0.01 and 3 respectively.  3.3.3 Epileptic Seizure Prediction Results In this section, the results of the proposed entropy-based seizure prediction method, applied to a scalp EEG dataset, are presented. Epilepsy Data To evaluate the performance of the proposed seizure prediction algorithm, an EEG dataset provided by the EEG department of Vancouver General Hospital after ethics approval was utilized. This dataset included ∼30 h of multichannel surface EEG  with total of 19 seizures in 5 patients with TLE. Data were acquired according to the International 10–20 system and sampled at 256 Hz. Fifteen bipolar channels were analyzed in this work. To apply a moving-window analysis, each EEG recording was segmented into thirty-second epochs with twenty-second overlap.  56  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background  Entropy  4.5  4  3.5  3  5  10  15  20  25  Time (min.) (a)  Entropy  4.5  4  3.5  3  35  40  45  50  55  60  Time (min.) (b)  Figure 3.8: The entropy waveform for positive zero-crossing intervals of the EEG signal in bipolar channel T4 -T6 of Patient 3 with right TLE: (a) Interictal period, and (b) Several minutes before the seizure onset to a few minutes after. Dashed line indicates the seizure onset.  Clinical Results Analyzing EEG recordings of each patient, the range of acceptable positive zerocrossing intervals was determined using the first epileptic seizure of that patient. Also, an interictal segment starting long time (about 60 min) before the first seizure was selected as a reference to set the threshold THp as well as to control the false alarm rate as described above (i.e., verifying g i ). Figure 3.8 shows an entropy waveform for different states of the EEG signal in channel T4 -T6 of Patient 3 suffering from right TLE. While the entropy does not change significantly during the interictal state, it drops several minutes before the seizure onset (dashed line). For this case, the spatial sum of the combined alarm sequences (γk ), computed by Equation 3.19, and the SPk index are presented in Figure 3.9(a) and (b), respectively. As shown, there is a significant increase in the SP index several minutes before the seizure onset. Another example of 57  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background  10  γk  8 6 4 2 0  35  40  45  50  55  60  Time (min.) (a) 1 Seizure Onset  SPk  0.8 0.6 0.4 THp  0.2 0  35  40  45  50  55  60  Time (min.) (b)  Figure 3.9: Prediction measures computed for the case presented in Figure 3.8: (a) The spatial sum of the combined alarm sequences γk , and (b) the seizure prediction index SPk (THp = 0.15). The seizure onset is indicated by the vertical dashed line.  the proposed method results is shown in Figure 3.10 for a seizure from Patient 5, indicating the ability of the method to anticipate this seizure. To quantitatively assess the performance of the proposed method, a prediction was considered to be true if a seizure happened within 45 min after the alarm; otherwise, it was labeled as a false alarm. The prediction time was defined as the time difference between the alarm and the electrographic seizure onset. Table 3.5 present the results of the proposed method for each patient. As shown, this entropybased method could predict 17 out of 19 seizures with the false prediction rate of 0.297/h and average prediction time of ∼27 min.  Investigating the effect of EEG derivatives on the seizure prediction was an-  other part of this study. The algorithm was applied to all recordings of the five patients with different values of weighting parameters (η0 , η1 , and η2 ). Results are summarized in Table 3.6 and reveal that considering the first (η1 = 0) and second 58  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background  10  γk  8 6 4 2 0  35  40  45  50  55  60  65  60  65  Time (min.) (a) 1  SPk  0.8  Seizure Onset  THp  0.6 0.4 0.2 0  35  40  45  50  55  Time (min.) (b)  Figure 3.10: Prediction measures computed for an EEG interval from Patient 5: (a) The spatial sum of the combined alarm sequences γk , and (b) the seizure prediction index SPk (THp = 0.7). The seizure onset is indicated by the vertical dashed line.  Table 3.5: Results of the proposed entropy-based method for predicting epileptic seizures. Patient  Recording Length (h)  Number of Seizures  SE (%)  FPR (/h)  APT (min.)  1 2 3 4 5 All  5.24 3.10 8.11 8.14 5.62 30.21  4 3 6 3 3 19  75 100 83.34 100 100 89.47  0.381 0 0.370 0.245 0.355 0.297  19.9 41.6 23.6 30.4 23.9 27.4  SE: Sensitivity; FPR: False Prediction Rate; APT: Average Prediction Time.  59  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background Table 3.6: Results of applying the entropy-based seizure prediction algorithm to the epilepsy data with different weighting parameters. Weighting Parameters  (η0 , η1 , and η2 ) η0 = 1, η1 = η2 = 0 η0 = η1 = 21 , η2 = 0 η0 = η1 = η2 = 13  SE (%)  FPR (/h)  APT (min.)  78.94 84.21 89.47  0.165 0.297 0.297  30.2 28.1 27.4  SE: Sensitivity; FPR: False Prediction Rate; APT: Average Prediction Time.  (η2 = 0) derivatives of the EEG signal increased the sensitivity of the algorithm significantly, while the prediction time decreased slightly. However, the false prediction rate was increased noticeably by inclusion of EEG derivatives.  3.4 Discussion and Conclusion In this chapter, some preliminary works, accomplished throughout the research carried out for this thesis, were elaborated. Two wavelet-based approaches for detecting epileptic seizures and a seizure prediction method based on zero-crossing analysis were described. All methods were evaluated using scalp EEG data acquired from epileptic patients. In detection of epileptic seizures, the performance of a new seizure index, i.e. combined index, which is based on the wavelet packet analysis of EEG signals was compared with that of a previously developed index based on the WPT, i.e. WPER. The results of this analysis showed that both the WPER and combined indices could detect seizures with relatively high sensitivity; however, the false detection rate of the WPER was significantly higher since it is a very noisy index. Although the combined index outperformed the WPER in this study, it needs some modifications to be suitable for reliable real-time epileptic seizure detection. In particular, the combined index has to be modified in order to reduce the number of false alarms as well as the detection latency. In Chapter 4, an enhanced version of this index, termed the Combined Seizure Index (CSI) is proposed, and its performance in detection of epileptic seizures is evaluated using a large scalp EEG 60  Chapter 3. Seizure Detection & Prediction: Preliminary Studies & Background dataset. Also, the capability of the CSI in seizure focus lateralization is studied. The current chapter also proposed a novel epileptic seizure prediction method based on entropy analysis of EEG zero-crossing intervals. Overall, evaluation of this method using surface recordings from five patients with TLE verified that the transition from the interictal to ictal state can be identified by monitoring the changes of EEG zero-crossing intervals. It was shown that inclusion of EEG derivatives could improve the sensitivity of the method, but at the cost of noticeable increase in the number of false alarms, which limits the application of this method in practice. Therefore, it is necessary to develop more reliable seizure prediction techniques. Chapter 5 introduces two other novel methods based on EEG zerocrossing analysis, evaluates their performance using a large surface EEG dataset, and compares them against chance (random) prediction.  61  Chapter 4  Automated Real-Time Seizure Detection Based on Wavelet Packet Transform In the previous chapter, a combined index to detect epileptic seizures was proposed and assessed using a set of scalp EEG recordings from epileptic patients. This chapter introduces a novel method for automated real-time detection of epileptic seizures based on an enhanced version of that index, which is termed the Combined Seizure Index (CSI). The CSI is a novel normalized wavelet-based index that measures both the rhythmicity and relative energy of EEG in each channel and is sensitive to the consistency among all channels. The performance of this new seizure detection method is evaluated using a large epilepsy dataset of scalp EEG, and the results are reported and discussed in detail. In addition to detecting seizures, the capability of the CSI in lateralizing the seizure focus is investigated. The work presented in this chapter has been published in part in IEEE Transactions on Biomedical Engineering [182] and Journal of Clinical Neurophysiology [187]1 . 1 Copyright by the American Clinical Neurophysiology Society, 2012, Lippincott Williams & Wilkins  62  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  4.1 EEG Data In this study, EEG data from consecutive patients hospitalized in the seizure investigation unit at Vancouver General Hospital were used after ethics committee approval. Only patients with two or more seizures were selected. One patient was excluded since her seizures were not associated with any visually distinguishable EEG patterns. This results in inclusion of 26 patients with total of ∼275 h of multichannel scalp EEG and 105 epileptic seizures in this work. The EEG data of  each patient were split into blocks of up to ∼3 h by the EEG technicians at the  time of the data collection. Each EEG block was considered as one “recording”  in this study. Patients included 15 females and 11 males, with an average age of 36.2 years. Twenty two patients had been diagnosed with TLE, based on clinical information and visual analysis of scalp EEG. Four cases had focal seizures emanating from extratemporal areas (eTLE). The length of recordings used in this study varied among different patients due to the amount of data available for each case. For some patients, only a few hours of interictal data were available, resulting in shorter recordings. Table 4.1 presents the details of the raw EEG data. EEGs were recorded using 21 electrodes based on the International 10–20 system as well as sphenoidal electrodes, sampled at 256 Hz using a 12–bit analogto-digital converter, and preprocessed by a 0.1-100 Hz bandpass filter. The EEG dataset was visually inspected by a neurologist/electroencephalographer to determine the seizure onsets. In this study, up to 18 bipolar EEG channels were employed to analyze the epilepsy data. To implement a moving-window analysis, each recording was segmented into two-second epochs with one-second overlap. This segmentation scheme results in epochs the length of which is a power of two (2 s × 256 Hz), making them appropriate for wavelet analysis [121].  4.2 Methods Most epileptic seizures are associated with rhythmic patterns [57, 162, 196]; therefore, the rhythmicity of EEG can be considered as a sign of the ictal state. EEG, however, contains various types of non-seizure rhythmic patterns which may reduce the specificity of those seizure detection approaches which are based on 63  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  Table 4.1: EEG data analyzed.  Patient 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26  Age Gender (yr) 18 26 56 42 42 39 34 19 24 25 25 47 68 27 24 24 43 26 26 54 36 42 45 58 35 38  F F M F M M F F M F F M F M M F M F F M M F F M F F All  Test Data No. (h) Szr  Type of Epilepsy  Train Data∗ (h)  Length  TLE TLE TLE TLE TLE TLE TLE TLE TLE TLE TLE TLE eTLE TLE eTLE TLE TLE TLE TLE TLE eTLE TLE TLE TLE TLE eTLE  1.1 1.1 1.2 1.08 1.2 1.2 1.03 1.08 1.26 1.02 3.1 2.3 2.05 1.0 1.33 2.32 2.45 1.0 1.3 1.0 2.0 1.0 2.0 2.0 2.0 1.0 39.12  4.1 2.0 1.4 1.72 1.2 1.4 1.17 1.32 1.74 7.08 5.1 4.3 1.65 5.0 8.67 13.08 3.55 3.0 7.0 24.0 19.4 22.0 20.0 25.0 32.0 19.0 235.88  3 2 2 4 2 2 1 6 3 5 2 2 1 2 6 9 2 1 3 4 1 4 4 4 3 1 79  Total  Length (h)  No. Szr  5.2 3.1 2.6 2.8 2.4 2.6 2.2 2.4 3.0 8.1 8.2 6.6 3.7 6.0 10.0 15.4 6.0 4.0 8.3 25.0 21.4 23.0 22.0 27.0 34.0 20.0 275  4 3 3 5 3 3 2 7 4 6 3 3 2 3 7 10 3 2 4 5 2 5 5 5 4 2 105  TLE: Temporal Lobe Epilepsy; eTLE: extraTemporal Lobe Epilepsy; Szr: Seizures. ∗ The way that training data (seizure and non-seizure references) were selected is described in Section 4.3. For each patient, one seizure was chosen as reference (training), i.e. 26 seizures in total.  64  Chapter 4. Automated Real-Time Seizure Detection Based on WPT recognition of rhythmicity in the signal. Hence, to reduce the number of false alarms of the detection algorithm, it would be also necessary to consider some other characteristics increasing the discrimination between seizure and non-seizure intervals. In this section, the details of a novel wavelet-based real-time seizure detection method are presented.  4.2.1 Separation Measure and Regularity Band Occurrence of an epileptic seizure is usually associated with significant changes in EEG spectral characteristics which are patient-specific. Therefore, determining the frequency band mostly affected in transition from non-seizure to seizure state would be helpful in increasing the discrimination between ictal patterns and other EEG waveforms. This patient-specific frequency band is termed the regularity band or FR in this study. To determine the regularity band, a novel measure which is based on the Probability Density Function (PDF) of the EEG energy logarithm in seizure and nonseizure states is defined. This nonlinear measure, called separation measure, determines how much separated the seizure and non-seizure states are in different frequency bands, given a particular EEG channel. For each patient, a non-seizure EEG segment, which should be long enough (at least 30 min in this work) to include different spectral aspects of the background EEG, and one seizure sample are selected as fixed references in order to compute the separation measure. In general, most seizures contain EEG patterns in the frequency range of ∼3 to  29 Hz [57, 162]; therefore, a general frequency band, termed FG , from 1 to 30 Hz is defined in this work to compute the separation measure. FG is divided evenly into 29 non-overlaping sub-bands, labeled Fi , i.e. each sub-band width is 1 Hz. Applying a moving-window approach, every epoch of each reference (seizure and non-seizure) is decomposed into a wavelet packet tree to obtain the coefficients corresponding to FG at the last decomposition level, resulting in the maximum frequency resolution [152]. Here, the length of each epoch is 29 (256 Hz × 2 s)  samples; thus, there are 10 decomposition levels including the root of the tree. At the last level, there exist 512 nodes each of which is associated with bandwidth of 0.25 Hz and contains one wavelet coefficient. Therefore, by selecting the nodes  65  Chapter 4. Automated Real-Time Seizure Detection Based on WPT representing a specific frequency band at this level, the corresponding coefficients are easily extracted. In this study, after testing Daubechies, Coiflets, and Symlets wavelets with different orders, Daubechies-6 was selected based on its better detection performance. It is worth noting that the use of Daubechies wavelets in analysis of epileptic EEG is well documented [46, 91, 145, 162, 190]. After decomposing each EEG epoch by the Wavelet Packet Transform (WPT), the energy of every sub-band of FG is computed by summing the corresponding wavelet coefficient square values. This results in a separate dataset for each EEG epoch. Considering epochs from seizure and non-seizure references in a particular EEG channel, two sets of data points for each sub-band of FG are obtained, respectively representing the energy of seizure and non-seizure references for that channel. Using the resulting datasets, it is then possible to estimate the probability density of the EEG energy in different sub-bands for each reference. Here, the natural logarithm of energy values is considered to compress the range of variations. To estimate the PDFs, the Averaged Shifted Histogram (ASH) method [178], as a computationally and statistically efficient density estimation, is employed. Given N samples {x1 , . . . , xN } of a random variable with probability density p(x), one  can consider a set of M histograms, pˆ0 , . . . , pˆM −1 , with bin width Bw and bin edges defined as lBw /M where l = 0, . . . , M − 1. The unweighted ASH is then defined as  pˆ(x) =  1 M  M −1  pˆl (x).  (4.1)  l=0  This results in an estimated density which is piecewise constant over the intervals with the width of δ = Bw /M . Let Ik = [kδ, (k + 1)δ) be the kth intervals and Nk be the number of samples falling in it. The height of ASH in Ik is the average of the heights of the M shifted histograms, i.e., the average of Nk−M +1 + · · · + Nk Nk−M +2 + · · · + Nk + Nk+1 Nk + · · · + Nk+M −1 , ,..., . N Bw N Bw N Bw This results in the unweighted ASH in the following form [178]: 1 pˆ(x) = N Bw  M −1 l=1−M  1−  66  |l| M  Nk+l for x ∈ Ik  (4.2)  Chapter 4. Automated Real-Time Seizure Detection Based on WPT To estimate a PDF using the ASH method, it is recommended to select M ≥ 10  to preserve the accuracy of the estimation [178]. On the other hand, it was exper-  imentally found in this study that choosing M > 10 results in only minor differences in detection performance at the cost of losing computational efficiency. Therefore, M was set to 10 as a trade-off between the accuracy and computational cost. The bin width Bw is computed using Equation 4.3, which has been shown to be the optimal histogram bin size to achieve the efficient, unbiased estimation of the PDF [177] Bw = 3.49ˆ σN  −1/3  (4.3)  where σ ˆ is the standard deviation of the given dataset including N samples. Given a particular sub-band Fi ⊂ FG , let pˆi,j (Enszr ) and pˆi,j (Ennon ) be the  estimated PDF of the energy logarithm in the jth EEG channel (Cj ) for the seizure and non-seizure references, respectively, pˆi,j (Enszr ) ≡ pˆ(ln(Enszr )|Fi , Cj ) pˆi,j (Ennon ) ≡ pˆ(ln(Ennon )|Fi , Cj )  (4.4)  where Enszr and Ennon are the energy of seizure and non-seizure references, respectively; pˆ(x|y) represents the estimated conditional PDF for given random variables X and Y . Then, the novel separation measure for sub-band Fi and channel Cj is proposed as si,j = (E{ln(Enszr )|Fi , Cj } − E{ln(Ennon )|Fi , Cj }) × 1 − exp −  KL (ˆ pi,j (Enszr ) pˆi,j (Ennon )) Γ  where, for random variables X and Y , E{X|Y } =  ditional expectation, and KL(p  q) =  (4.5)  ∞ −∞ xp(x|y) dx  ∞ −∞ p(x) ln (p(x)/q(x))  is the con-  dx stands for  the Kullback–Leibler divergence (KL) [96] (also known as relative entropy) between probability densities p(x) and q(x). The first term of Equation 4.5 measures the separation of the two densities based on the mean values. However, to better discriminate between the densities, it would be necessary to take into account the higher-order statistics in addition to the mean. Therefore, the second term (between  67  Chapter 4. Automated Real-Time Seizure Detection Based on WPT Right Channels  Left Channels  Average Separation Measure  Average Separation Measure  0.06  0.05  0.04  0.03  0.02  0.01  0  5 10 15 20 25 SubBand No. (a)  All Channels  0.8  0.45  0.7  0.4  0.6  0.35  Average Separation Measure  0.07  0.5 0.4 0.3 0.2  0.3 0.25 0.2 0.15  0.1  0.1  0  0.05  −0.1  5 10 15 20 25 SubBand No. (b)  0  5 10 15 20 25 SubBand No. (c)  Figure 4.1: The average separation measure for different sub-bands in FG for a patient with left TLE: (a) Average on right side channels, (b) Average on left side channels, and (c) Average on all channels. Frequency sub-bands located between the dashed lines are mostly affected as the seizure occurs.  0 and 1) is considered in the separation measure to scale the mean value difference based on the KL divergence between pˆi,j (Enszr ) and pˆi,j (Ennon ). According to the definition of this exponential term, it approaches to 1 as the dissimilarity between the densities increases. The more similar the densities are, the smaller the second term is. The parameter Γ, which is greater than or equal to 1, is a sensitivity factor empirically set to 10 for all cases according to the following justification. While KL ranges from very small values (near zero) to large numbers (∼40–50) in this work, selecting small values of Γ reduces the sensitivity of si,j to the large values of KL due to the effect of the exponential function. In contrast, choosing large values of Γ confines the second term of si,j into a small range, resulting in less sensitivity of si,j to KL. Therefore, this selection of Γ makes si,j sensitive to different values of KL. The positive values of the separation measure are interesting for determining the regularity band in this work, as the energy mostly increases when a seizure occurs. The higher the separation measure, the more separated are the seizure and non-seizure states. Figure 4.1 presents the average of the separation measure for different subbands in FG for a patient with left TLE. Figure 4.1(a) shows this measure averaged 68  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  Figure 4.2: Determining the regularity band, FR , for the proposed wavelet-based seizure detection algorithm. This is performed only once per patient.  over EEG channels on the right brain hemisphere, whereas Figure 4.1(b) is the average separation measure for left side channels, and Figure 4.1(c) is the measure averaged over all channels. As shown, the changes of the average separation measure for left channels are more significant than those of the right side. This indicates that the seizure focus is in the left hemisphere which is consistent with the clinical information. Also, based on the separation measure magnitude in Figure 4.1(b) and (c), it can be seen that sub-bands F4 to F13 (located between dashed lines), which correspond to the frequency range from 4 to 14 Hz, are mostly affected when the seizure happens in this particular patient. This frequency band can be selected as the regularity band (FR ) in which one looks for rhythmicity as a characteristic of ictal patterns. The regularity band can be easily determined by defining a threshold for the separation measure averaged over all channels, or specifically, over the channels corresponding to the side of the seizure focus, if it is known. Excluding the negative values of the average separation measure, the low 25% of the remaining values are selected, and the threshold is determined as µs + 3σs where µs and σs are the mean value and standard deviation of the selected portion,  69  Chapter 4. Automated Real-Time Seizure Detection Based on WPT respectively. After determining this threshold, the frequency sub-bands representing the average separation measure greater than or equal to it are included in the regularity band. Figure 4.2 summarizes the procedure for determining the regularity band. It is worth mentioning that this is a semi-automated approach; that is, the selected threshold/frequency bands may be tuned by the user to make sure the regularity band is determined properly.  4.2.2 Regularity Index After determination of the regularity band (FR ), the regularity index, as a measure of the rhythmicity, is computed for every EEG epoch in each channel as described below. In a moving-window analysis, for each EEG epoch, the energy of every subband in FG is computed using the corresponding coefficients in the last level of the wavelet packet tree. Suppose, for the current epoch, Ei is the energy of the ith sub-band (Fi ), and Fi∗ and Fm∗ are the sub-bands which have the maximum energy in FG and FR , respectively; that is, i∗ = arg maxi Ei where Fi ⊂ FG , and  m∗ = arg maxm Em where Fm ⊂ FR . Then, a dominant sub-band Fd for this  epoch is determined based on the ratio between Em∗ and Ei∗ by d=   m∗ , i∗ ,  if Em∗ ≥ λ Ei∗  (4.6)  otherwise  where λ ∈ [0, 1] represents the minimum acceptable ratio of the maximum sub-  band energy of the regularity band to that of the general band, which allows Fd to fall in FR . This parameter is empirically set to 0.75 for all patients as a compromise between the algorithm sensitivity and computational complexity due to the crosscorrelation (see below). After determining Fd for each epoch, the regularity index is determined by considering whether this frequency band is a subset of FR or not. 1) If Fd ⊂ FR , i.e., d = m∗ : The regularity index is defined based on the  similarity between the current EEG epoch and a pure sinusoidal waveform as a reference. Suppose yk,j (t) is the time-domain signal resulting from the inverse WPT applied to the wavelet coefficients which correspond to FG and are calculated for the kth epoch in the jth channel, and let Fd be the dominant sub70  Chapter 4. Automated Real-Time Seizure Detection Based on WPT band for this epoch. Also, let xk,j (t, f ) be a pure sinusoidal reference defined as xk,j (t, f ) = sin(2πf t), where f ∈ Fd . Then, the regularity index is computed  as the maximum normalized cross-correlation between yk,j (t) and xk,j (t, f ) by rk,j = max τ,f  ∞ −∞ xk,j (t + τ, f )yk,j (t) dt ∞ ∞ 2 2 −∞ xk,j (t, f ) dt × −∞ yk,j (t) dt  .  (4.7)  To obtain the maximum possible match between the two signals, the frequency of the sinusoid is increased in steps of 0.25 Hz, starting from the lower bound of Fd (i.e., sweeping Fd ). By definition, this index is confined to [0, 1]. The more similar these two signals are, the higher the value of rk,j is. Therefore, an EEG epoch including rhythmic patterns within the regularity band results in a higher value of the regularity index than other epochs. 2) If Fd ⊂ FR , i.e., d = i∗ : In this case, one simple approach is to ignore the  corresponding epoch by setting rk,j = 0. However, this reduces the sensitivity of the algorithm since the method may neglect the epochs of relatively weak rhythmic patterns within FR . To prevent this situation, a value is assigned to rk,j by con-  sidering the maximum sub-band energy of the regularity band (Em∗ ). That is, the smaller Em∗ , the smaller rk,j . Therefore, when Fd ⊂ FR , the regularity index is  defined as an exponential decay by rk,j =  1 Ei∗ − Em∗ exp − 2 Em∗  .  (4.8)  In the above expression, choosing 0.5 as a constant multiplying the exponential term results in the upper limit of ∼0.36 for rk,j , due to the chosen value of λ in  Equation 4.6. In practice, this limit was found appropriate to consider epochs with desired rhythmic patterns without a significant influence on specificity.  4.2.3 Energy Index To reduce the effect of the EEG rhythmic patterns which are not related to the ictal state, it is also needed to consider the energy of EEG waveforms, discriminating epileptic seizures from the background activities. However, it should be noted that the absolute value of energy does not characterize seizure state necessarily. 71  Chapter 4. Automated Real-Time Seizure Detection Based on WPT Therefore, a relative index is employed to reduce the effect of the non-seizure rhythmic activities by considering the background EEG. After determining the dominant sub-band Fd for the kth epoch in the jth channel, a 30-second interval of the EEG ending 10 s before the beginning of this epoch is considered as a reference i.e., a moving reference (see Section 4.3 for the results of changing the position of this moving reference). Then, a raw energy index for this epoch is defined as g˜k,j = ln  Ed  (4.9)  Edref  where Ed and Edref are respectively the energy of the sub-band Fd in this epoch and in the relevant moving reference, calculated using the corresponding wavelet packet coefficients. Edref is simply the average of energies computed for the epochs included in the reference. However, in different patients or different channels of a patient, similar values of this index can represent different EEG states, i.e., seizure or non-seizure. Therefore, the raw energy index may not clearly describe the level of ictal activity unless it is scaled with respect to a reference value. For this purpose, a novel nonlinear scaling function ν : R2 → [0, 1] is defined in this thesis  to scale the given value z with respect to the reference value z0 as below, with the graphical interpretation shown in Figure 4.3.  ν(z, z0 ) =     0,    if z < −η Zm  ν (z + η Z ) / (z0 + η Zm ) ,  0 m     1 + (ν0 − 1) exp  if −η Zm ≤ z < z0  (4.10)  − ν0 (z − z0 ) , if z0 ≤ z  where 0 ≤ η ≤ 1, z0 ≥ −η Zm , and ν0 = min 1, (z0 + η Zm ) / ((1 + η)Zm ) . Figure 4.3(a) presents the scaling function for z0 < Zm , where Zm is a posi-  tive constant. This parameter determines the upper bound of z0 when the scaling function includes an exponential term. In other words, if z0 ≥ Zm , as shown in  Figure 4.3(b), the exponential term is canceled out (ν0 = 1) and the scaling func-  tion behaves exactly as a saturation block. Now, using the scaling function ν, the  72  Chapter 4. Automated Real-Time Seizure Detection Based on WPT ν(z, z0 ) 1  1  (z0 , ν0 ) 0  −ηZm 0  (a)  z  Zm  ν(z, z0 ) 1  0  1  −ηZm 0  (b)  Zm  z0  z  Figure 4.3: Scaling function ν(z, z0 ) : (a) z0 < Zm and (b) z0 ≥ Zm . energy index for the kth EEG epoch in the jth channel is define as gk,j = ν(˜ gk,j , sd,j ),  (4.11)  where sd,j is the separation measure calculated using Equation 4.5 for the dominant sub-band Fd . With this novelty, the raw energy index g˜k,j is scaled with respect to the level of separation between the seizure and non-seizure states, considering Fd . According to the definition of the scaling function ν, sd,j must be greater than or equal to −η Zm if used as a reference value. On the other hand, the negative values  of the separation measure do not correspond to the frequencies desirable in this method (it is expected that the energy increases during ictal segments compared to non-seizure periods). Therefore, when using sd,j as a reference value to scale g˜k,j ,  sd,j is replaced by −η Zm if sd,j < −η Zm , resulting in gk,j = 0 for all values of  g˜k,j according to Equation 4.10. In this work, η Zm = 0.1, which guarantees to  only consider the epochs with Ed /Edref > 0.9 (i.e., g˜k,j > −0.1).  Parameter η is selected such that gk,j has a small positive value when g˜k,j = 0  (the energy of the current epoch is equal to that of the moving reference). By this selection, the method considers the epochs not having enough relative energy but 73  Chapter 4. Automated Real-Time Seizure Detection Based on WPT containing highly rhythmic patterns (i.e., high regularity index), without increasing the false detection rate significantly. If 0 < z0 < Zm , ν(0, z0 ) = η/(1 + η); furthermore, for −η Zm ≤ z0 ≤ 0 and z0 ≥ Zm , the maximum of ν(0, z0 ) is  η/(1 + η) (see Appendix A for details). Therefore, selecting η/(1 + η) ≈ 0.01, η  is set to 0.01. This results in Zm = 10 (as η Zm = 0.1), causing the scaling function to have the form presented in Figure 4.3(a) in most cases due to the typical values of the separation measure.  4.2.4 Combined Seizure Index (CSI) Having calculated the regularity and energy indices, the CSI is computed for every epoch of each EEG channel and monitored to detect epileptic seizures. This index consists of two main components: CSI base and CSI exponent. The CSI base is defined as the multiplication of the regularity and energy indices. That is, for the kth epoch of the jth channel, the CSI base is computed as ξk,j = rk,j × gk,j .  (4.12)  As both the regularity and energy indices are between 0 and 1, this component is confided to [0, 1]. This measure monitors both the rhythmicity and relative energy of EEG epochs and significantly increases as a seizure occurs. However, this component can be be noisy and thereby causes false detections. Accordingly, to increase the specificity of the seizure detection algorithm, another component, i.e. CSI exponent, is also included in the CSI. The CSI exponent is integrated into the CSI to reduce the false detection rate by considering all EEG channels at the same time. In other words, the CSI exponent is a multivariate measure which modifies the CSI base, determined for each channel, based on the consistency among different channels. In this work, the consistency is defined as the simultaneous occurrence of the EEG patterns with noticeable energy within the regularity band (i.e., Fd is a subset of FR ) in different channels. The consistency increases by the occurrence of seizures. This is in accordance with the fact that the seizure generation is associated with recruitment of cortical neurons into a “critical mass” resulting in increasing synchronization of neuronal activities along with a loss/reduction of inhibitory mechanisms and 74  Chapter 4. Automated Real-Time Seizure Detection Based on WPT excess excitations [32, 221]. Previous studies showed significantly high synchronization/entrainment among EEG channels as a seizure occurs [76, 137]. Now, let wk,j be a binary mapping defined as follows  wk,j =   1,  if Fd ⊂ FR  0,  (4.13)  otherwise  where Fd is the dominant sub-band for the kth EEG epoch of the jth channel. Using this mapping as a weighting function, the following consistency measure is defined. 1 θ˜k = J  J j=1  wk,j × gk,j ,  (4.14)  where J is the total number of EEG channels. θ˜k ranges from 0 to 1; the stronger the consistency among channels, the higher θ˜k . As a seizure occurs, the consistency among channels becomes stronger; therefore, monitoring changes of the consistency can be an effective approach to reduce the number of false detections and increase the specificity of the algorithm. For this purpose, (θ˜k − θ˜ref ) is included in the exponent of the CSI, where θ˜ref is the average of θ˜k over the EEG epochs belonging to the moving reference (defined in Section 4.2.3), i.e., Nref ˜ θ˜ref = (1/Nref ) θl ; Nref is the total number of epochs in the reference. l=1  However, since ξk,j (CSI base) ranges from 0 to 1 and (θ˜k − θ˜ref ) is between -1  and 1, to keep the CSI between 0 and 1 (i.e., a normalized index), the CSI exponent for the kth epoch is defined by θk = Ω − (θ˜k − θ˜ref ),  (4.15)  where Ω ≥ 1. The CSI exponent is used to attenuate the CSI base (ξk,j ) where consistency changes are small; in contrast, it is desired that ξk,j is less attenuated  or even magnified at the onset of the seizure (i.e., increase in the consistency). The parameter Ω determines how much attenuating θk is, when the consistency does not change significantly. Increasing Ω results in more attenuation. If Ω > 2, θk always attenuates ξk,j even at the seizure onset, which is undesirable. Thus, in this work Ω was empirically set to 1.5. By this selection, the CSI exponent ranges from 75  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  CSI Base (a)  0.4 0.2 0  700  800  900  1000 1100 1200 1300 1400 1500  (b)  CSI Exponent 2 1.5 1 0.5  700  800  900  1000 1100 1200 1300 1400 1500 CSI  (c)  0.4 0.2 0  700  800  900  1000 1100 1200 1300 1400 1500 Time (sec.)  Figure 4.4: An example of the combined seizure index for an EEG interval of channel C4 −T4 in a patient with right TLE: (a) CSI base, (b) CSI exponent, and (c) CSI. Dashed line indicates the seizure onset.  0.5 to 2.5. Combining this measure with the base component, the CSI, as a novel index proposed in this thesis, is finally calculated for the kth epoch in the jth EEG channel as CSIk,j = (ξk,j )θk  (4.16)  Due to the definition of the CSI, its value ranges from 0 to 1; i.e., it is a normalized index. Figure 4.4 presents the CSI and its components for an EEG interval of the bipolar montage C4 −T4 in a patient with right TLE, where the dashed line indicates  the seizure onset. Once the seizure occurs, the base component increases, while the exponent part decreases; therefore, the combined index increases significantly. Comparing Figure 4.4(a) and (c) reveals that including the CSI exponent reduces undesirable variations of the CSI base, especially before the onset.  76  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  4.2.5 Seizure Alarm According to the behavior of the CSI in seizure and non-seizure periods, seizures can be recognized by detecting significant increases in the mean value of this index. In this study, the Cumulative Sum (CUSUM) procedure developed by Page [148] is employed to detect these changes in the CSI mean. The CUSUM test is a robust statistic which minimizes the delay of detecting a change for any fixed false alarm rate [12, 141]. The one-sided CUSUM algorithm, detecting an increase in the mean value, can be described as follows [148]: Given a set of observations, assign ˜k = k uρ an index uk to the kth observation, monitor the cumulative index U ρ=1  and take an action (e.g., generating an alarm), if ˜k − min U ˜l ≥ U 1≤l<k  where  (4.17)  is the decision boundary. This one-sided CUSUM procedure may be per-  formed in a recursive scheme [12, 120] by Uk = max 0, (uk − γ) + Uk−1  (4.18)  where U0 = 0 and γ is a positive threshold to detect the shift. If Uk ≥ , an alarm is generated and the CUSUM value is reset (Uk+1 = 0). Therefore, replacing uk  by CSIk,j as an index assigned to the kth epoch of the jth channel (observation), one can detect the CSI increase shortly after it happens. In this work, parameters γ and  are determined adaptively for each epoch of every channel based on the  ref CSI history in that channel. Suppose µref k,j and σk,j are respectively the mean  value and standard deviation of the CSI calculated for the moving reference which corresponds to the kth epoch of the jth EEG channel. Then, ref γk,j = max γˆj , µref k,j + 3σk,j  (4.19)  where γˆj is considered as a minimum value for γk,j , to avoid false alarms resulting from small values of γk,j , and is determined using the fixed non-seizure reference utilized in computing the separation measure as follows. Let µnon and σjnon j be respectively the mean and standard deviation of the CSI computed for the jth  77  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  Figure 4.5: Steps of the proposed real-time wavelet-based seizure detection algorithm, after determining the regularity band.  + 3σjnon . In the next step, channel of the non-seizure reference, then γˆj = µnon j k,j  is calculated based on γ values corresponding to the last N epochs as k k,j  =α  γρ,j  (4.20)  ρ=k−N +1  where 0 ≤ α ≤ 1. The smaller the parameter α (smaller ), the higher the sen-  sitivity and the false detection rate. Thus, by α = 0.1 for all cases, a trade-off between the sensitivity and specificity is achieved. Also, N is defined as the num-  ber of epochs lying in the time interval between the last alarm (in channel j) and the present. If this interval is longer than a minute, then N is selected as the number of epochs in a one-minute recording. Finally, rewriting Equation 4.18 as Uk,j = max 0, (CSIk,j − γk,j ) + Uk−1,j ,  (4.21)  an alarm sequence for the jth channel is defined by  ψk,j =   1, 0,  if Uk,j ≥ otherwise 78  k,j  (4.22)  Chapter 4. Automated Real-Time Seizure Detection Based on WPT where ψk,j = 1 indicates a channel alarm. A seizure alarm sequence Ψk is then produced by analyzing alarms from different EEG channels. A seizure alarm is generated (Ψk =1) when at least 3 channel alarms (not in the same channel) occur within 5 s; otherwise, Ψk =0. According to the neurologist’s recommendation, successive seizure detections are assumed as a single detection, provided that their interval is less than 30 s. Figure 4.5 summarizes the different steps of the seizure detection algorithm after determining the regularity band.  4.3 Clinical Results In this section, the results of the proposed real-time epileptic seizure detection method applied to the epilepsy data described in Section 4.1 are presented. In addition, using the EEG data of patients with TLE, the potential of the CSI for lateralizing the seizure focus is studied.  4.3.1 Seizure Detection Results Multichannel scalp EEG data including ∼275 h recordings and 105 seizures in  26 patients were utilized in this study. For each patient, a seizure example and a non-seizure EEG interval were used as the seizure and non-seizure references to calculate the separation measure and determine the regularity band (FR ) for that patient. For all patients, the first seizure recorded during the hospitalization period was selected as the seizure reference (training seizure). In order to define the non-seizure reference for each patient, an EEG segment with the minimum length of 30 min was selected from the first recording of that patient. Given the seizure reference, the whole or a part of the first recording was chosen as the nonseizure reference to have a clear separation between the two references. Beyond the stage of reference selection, the seizure detection algorithm was totally blind to the clinical information. Table 4.2 reports the FR determined for different patients. To evaluate the performance of the proposed seizure detection algorithm, the seizure and non-seizure references, i.e. training data (39.12 h of scalp EEG including 26 seizures), were excluded from the initial epilepsy dataset and the rest of the data were used to test the method (i.e. ∼236 h of scalp EEG with 79 seizures). 79  Chapter 4. Automated Real-Time Seizure Detection Based on WPT Table 4.2: The regularity band (FR ) determined for different patients based on the corresponding extracted seizure and non-seizure references. Patient  Regularity Band (Hz)  Patient  Regularity Band (Hz)  1 2 3 4 5 6 7 8 9 10 11 12 13  2-6 4-9 2-6 3-6 2-6 3-10 3-12 3-10 3-10 4-7 9-13 3-8 10-25  14 15 16 17 18 19 20 21 22 23 24 25 26  3-10 8-20 8-15 3-10 4-10 6-20 4-12 3-8 3-7 3-7 2-7 3-8 7-15  Details of the training and test data are shown in Table 4.1. Since the non-seizure reference could be selected by analyzing the entire duration of the first recording for each patient, the first recordings of all patients were totally excluded from the test data in order to make the algorithm completely blind to the data used for evaluation. Figure 4.6 presents the EEG, CSI, and channel alarm sequences (ψk,j ) for bipolar channels corresponding to the side of the seizure focus in a patient with right TLE as well as the seizure alarm sequence (Ψk ). The seizure onset is around 344 s according to visual analysis of the EEG by the neurologist. As shown in the lower panel of this figure, the seizure is detected shortly after the onset (at 349 s). Applying the algorithm to the training epilepsy data where the moving reference was selected as a window from -40 to -10 s with respect to the current epoch, the method achieved 80.77% sensitivity along with a false detection rate of 0.38/h and a median/average delay of 7 s/8.81 s. To evaluate the effect of the moving reference position on the algorithm performance, another moving reference was also considered with the same length but farther from the current epoch (i.e., from -120 to -90 s), and the method was eval80  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  T4−T6  EEG (µV) 1  1000  0.5  0  T6−O2  340  360  380  0  400  1  340  360  380  0  400  1  200  360  380  0  400  340  360  380  0  400  1  400 200 0 −200  380  400  340  360  380  400  340  360  380  400  340  360  380  400  360  380  400  1  0.5  340  360  380  0  400  340  360  380  0  400  1  C4−T4  360  0.5  340  0 −500 −1000 −1500  1  0.5  340  T4−SP2  340  1  0 −200 −400  Cz−C4  Channel Alarm Sequence ψ  CSI  2000  360  380  0  400  340  360  380  0  400  1  1  1000 500  0.5  0 340  360  380  0  400  340  360  Time (sec.)  330  0  400  340  350  360  340  Time (sec.)  Seizure Alarm Sequence (Close Reference) Ψ  1  0  380  Time (sec.)  370  1  380  390  400  Time (sec.)  Figure 4.6: EEG, CSI, and channel alarms corresponding to different bipolar channels on the focus side of a patient with right TLE as well as the seizure alarm sequence (bottommost). Seizure starts at 344 s.  uated using the same dataset (i.e., training data). A sensitivity of 84.61%, a false positive rate of 0.15/h, and a median/average delay of 13 s/ 14.63 s were obtained from this experiment. The results of the two experiments show that using a moving reference close to the current epoch reduces the detection latency at the cost of increasing the number of false alarms. Also, it is seen that the close moving reference results in less sensitivity, which can be due to the presence of artifacts and noise in the time intervals close to the seizure onset in some recordings. In addition to separate analysis of close and far moving references, this study considered both references together. Let the seizure alarm sequences correspond1  2  ing to the first (close) and second (far) moving reference be Ψk and Ψk , respec1  2  tively. Then, considering Ψk and Ψk as binary sequences, the final seizure alarm  81  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  Channel Alarm Sequence ψ  T4−T6  CSI 1 0.5  T6−O2  0  Cz−C4  340  350  360  370  380  390  0  400  330  340  350  360  370  380  390  400  330  340  350  360  370  380  390  400  330  340  350  360  370  380  390  400  330  340  350  360  370  380  390  400  330  340  360  370  380  390  400  1  0.5 330  340  350  360  370  380  390  0  400  1  1  0.5 0  C4−T4  330  1  0  330  340  350  360  370  380  390  0  400  1  1  0.5 0  T4−SP2  1  330  340  350  360  370  380  390  0  400  1  1  0.5 0  330  340  350  360  370  380  390  0  400  350  Time (sec.)  Time (sec.) Seizure Alarm Sequence (Far Reference) Ψ  1  0  330  340  350  360  2  370  380  390  400  380  390  400  Seizure Alarm Sequence (Both References) Ψ  1  0  330  340  350  360  370  Time (sec.)  Figure 4.7: The CSI, channel alarm sequence, and seizure alarm sequence using far 2  moving reference (Ψk ) for the case presented in Figure 4.6 as well as the final seizure alarm sequence Ψk , generated based on both references (bottommost).  sequence Ψk which is used in the detection procedure is determined by 1  2  Ψk = Ψk ∨ Ψk  (4.23)  where ∨ stands for the logical OR operation. In Figure 4.7, the results of applying  the proposed algorithm to the case presented in Figure 4.6 using the far moving 2  reference (Ψk ) as well as both moving references (Ψk ) are presented. Utilizing a moving reference farther from the current epoch increases the detection delay. Considering both the close and far moving references (i.e., using Ψk ), the proposed seizure detection method was applied to the training dataset. Table 4.3 reports these results for each patient. It can be seen that employing both references together improves the sensitivity significantly (96.15%) and keeps the detection latency low (median/average of 7 s/9.76 s), while the false detection rate remains 82  Chapter 4. Automated Real-Time Seizure Detection Based on WPT Table 4.3: Results of applying the proposed method to training data using Ψk . Patient  Seizure Detected?  False Detection Rate (/h)  Detection Delay (sec.)  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 All  Y Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y 25/26  0 0 1.67 0.93 0.85 0.83 0 0.92 1.58 0.98 0 0 0.97 0 3.0 0 0.4 1.0 0.75 1.0 0 0 0 0 0 2.0 0.53  14 3 15 7 13 4 22 2 17 9 8 7 – 6 7 7 7 2 11 17 5 9 27 6 5 14 7/9.76 (Median/Average)  reasonably low (0.53/h). The quantitative results of applying the proposed seizure detection algorithm (using both references) to the test epilepsy dataset for each patient are reported in Figure 4.8. Overall, the automated method detected 91.14% of the epileptic seizures (72 out of 79) with a false detection rate of ∼0.33/h (i.e., approximately  one false alarm per three hours) and the median/average delay of 7 s/8.89 s with respect to the electrographic seizure onset. 83  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  100 90  False Detection Rate (/h)  3  Sensitivity (%)  80 70 60 50 40 30 20  2.5 2 1.5 1 0.5  10 0  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26  0  all  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26  Patients  (b)  (a)  Average Median  30  Detection Delay (sec.)  all  Patients  25 20 15 10 5 0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  all  Patients  (c)  Figure 4.8: Results of applying the seizure detection method to the test epilepsy data (using Ψk ): (a) Sensitivity (%), (b) False Detection Rate (/h), and (c) Detection Delay (s).  8% 6% 29%  17%  0−5s 5 − 10 s 10 − 15 s 15 − 20 s >20 s  40%  Figure 4.9: Distribution of the detection delay with respect to the electrographic seizure onset for the test seizures detected by the proposed automated algorithm.  84  Chapter 4. Automated Real-Time Seizure Detection Based on WPT Figure 4.9 demonstrates the distribution of the detection latency of the seizures in the test data. According to the results, the majority of the seizures (69%) were detected in less than 10 s after the electrographic onset, while the detection delay was more than 20 s for only 8% of the seizures. Some examples of the seizures detected by the proposed automated waveletbased method are displayed in Figure 4.10 - Figure 4.15, where the arrow indicates the time that the automated method detects the seizure. Figure 4.10 presents an EEG segment from Patient 6 with TLE, where the method detects the change in frequency and amplitude at the seizure onset approximately after 3-4 seconds comparing with visual analysis. Figure 4.11 displays the onset of a detected seizure from Patient 8, suffering from TLE as well. Although the change in the EEG amplitude is not significant, the EEG frequency in the left channels clearly changes when seizure happens. In Figure 4.12, a detected seizure from Patient 12 with TLE is shown, where the seizure onset is accompanied by large amount of muscle artifacts. The sustained rhythmic patterns are clearly visible later in the recording. Another example of detected seizures with the onset contaminated by artifacts is shown in Figure 4.13. Figure 4.14 and Figure 4.15 present seizures from patients with eTLE. In Figure 4.14, a short seizure from Patient 15 is seen which is detected by the proposed automated method shortly after the onset. Figure 4.15 presents another example of extratemporal lobe seizures detected by the algorithm from Patient 13. High frequency rhythmic patterns can be seen especially in channels Fz -Cz , F4 C4 , and FP2 -F4 . Figure 4.16 and Figure 4.17 show two examples of the seizures that the automated algorithm failed to detect. Figure 4.16 presents a seizure from Patient 3 where subtle changes in background EEG occur in especially T3 -C3 , C3 -Cz , SP1 T3 and C4 -Cz . For this case, bifrontal frequent epileptiform discharges have been persistent during interictal state. In Figure 4.17, a seizure from Patient 11 starts with an electrodecrement followed by a sustained rhythmic activity only in few channels on the left side (SP1 -T3 and T3 -C3 ). Subtle rhythmic patterns also occur in some channels including FP1 -F7 , F7 -T3 , and T3 -T5 . The majority of the seizures missed by the proposed automated algorithm were characterized by subtle or short rhythmic patterns, sustained rhythmic activities in few channels, or combination of 85  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  FP1−F3 F3−C3 C3−P3 FP2−F4 F4−C4 C4−P4 FP1−F7 F7−T3 T3−T5 T5−O1 FP2−F8 F8−T4 T4−T6 T6−O2 SP1−T3 T3−C3 SP2−T4 T4−C4 250 µV 1 sec  Figure 4.10: Onset of a detected seizure from Patient 6 with TLE. Sustained rhythmic activities with noticeable change in amplitude and frequency are seen in the channels representing the right temporal area. The arrow indicates the time that the automated method detects the seizure. FP1−F3 F3−C3 C3−P3 FP2−F4 F4−C4 C4−P4 FP1−F7 F7−T3 T3−T5 T5−O1 FP2−F8 F8−T4 T4−T6 T6−O2 SP1−T3 T3−C3 SP2−T4 T4−C4 350 µV 1 sec  Figure 4.11: Onset of a detected seizure from Patient 8 with TLE. Sustained rhythmic activities associated with noticeable change in the frequency are clear in the channels representing the left temporal area. The arrow indicates the time that the automated method detects the seizure.  86  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  FP1−F3 F3−C3 C3−P3 FP2−F4 F4−C4 C4−P4 FP1−F7 F7−T3 T3−T5 T5−O1 FP2−F8 F8−T4 T4−T6 T6−O2 SP1−T3 T3−C3 SP2−T4 T4−C4 350 µV 1 sec  Figure 4.12: A detected seizure from Patient 12 with TLE. The electrographic seizure onset is obscured in muscle artifacts. Sustained rhythmic activities are noticeable later in the recording. The arrow indicates the time that the automated method detects the seizure.  FP1−F3 F3−C3 C3−P3 FP2−F4 F4−C4 C4−P4 FP1−F7 F7−T3 T3−T5 T5−O1 FP2−F8 F8−T4 T4−T6 T6−O2 SP1−T3 T3−C3 SP2−T4 T4−C4 400 µV 1 sec  Figure 4.13: A detected seizure from Patient 20 with TLE. The onset of the seizure is contaminated by artifacts. The arrow indicates the time that the automated method detects the seizure.  87  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  FP1−F3 F3−C3 C3−P3 FP2−F4 F4−C4 C4−P4 FP1−F7 F7−T3 T3−T5 T5−O1 FP2−F8 F8−T4 T4−T6 T6−O2 C3−Cz C4−Cz Fz−Cz 350 µV 1 sec  Figure 4.14: A short seizure from Patient 15 with eTLE which is detected by the automated algorithm shortly after the onset as indicated by the arrow.  FP1−F3 F3−C3 C3−P3 FP2−F4 F4−C4 C4−P4 FP1−F7 F7−T3 T3−T5 T5−O1 FP2−F8 F8−T4 T4−T6 T6−O2 C3−Cz C4−Cz Fz−Cz 150 µV 1 sec  Figure 4.15: A detected seizure from Patient 13 with eTLE. High frequency rhythmic activities can be seen in different channels, especially in Fz -Cz , F4 -C4 , and FP2 -F4 . The arrow indicates the automated detection time.  88  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  FP1−F3 F3−C3 C3−P3 FP2−F4 F4−C4 C4−P4 FP1−F7 F7−T3 T3−T5 FP2−F8 F8−T4 T4−T6 SP1−T3 T3−C3 C3−Cz SP2−T4 T4−C4 C4−Cz 300 µV 1 sec  Figure 4.16: A missed seizure from Patient 3. Subtle activities occur in some channels, especially T3 -C3 , C3 -Cz , SP1 -T3 and C4 -Cz . Bifrontal frequent epileptiform discharges have been persistent during interictal state.  FP1−F3 F3−C3 C3−P3 FP2−F4 F4−C4 C4−P4 FP1−F7 F7−T3 T3−T5 T5−O1 FP2−F8 F8−T4 T4−T6 T6−O2 SP1−T3 T3−C3 SP2−T4 T4−C4 300 µV 1 sec  Figure 4.17: A missed seizure from Patient 11. Sustained rhythmic patterns occur only in few channels from the left side (SP1 -T3 and T3 -C3 ). Some channels including FP1 -F7 , F7 -T3 , and T3 -T5 also show subtle rhythmic patterns.  89  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  FP1−F3 F3−C3 C3−P3 FP2−F4 F4−C4 C4−P4 FP1−F7 F7−T3 T3−T5 T5−O1 FP2−F8 F8−T4 T4−T6 T6−O2 C3−Cz C4−Cz Fz−Cz  300 µV 1 sec  Figure 4.18: False alarm from Patient 15 due to the burst of sharp waves/spikes in frontal and temporal channels. The arrow indicates the alarm time.  these. The present algorithm has not been designed to capture the subtle and short rhythmic patterns in order to reduce the false positive rate. In fact, employing the CUSUM procedure with parameters adaptively set results in generating a channel alarm only when a noticeable increase occurs in the mean value of the CSI. In addition, sustained rhythmic activities appearing only in few channels are ignored by the algorithm due to the large CSI exponent (i.e., low consistency among EEG channels) to prevent false alarms resulting from the non-epileptic rhythmic patterns intermittently seen in some EEG signals. For the proposed method, the false detections resulted mostly from burst of spikes/sharp waves, non-epileptic rhythmic activities appearing in several channels at the same time, and EMG artifacts. Some examples of these false positive cases are shown in Figure 4.18 - Figure 4.20. Figure 4.18 demonstrates a false detection from Patient 15 due to the burst of sharp waves/spikes which are seen in different frontal and temporal channels. As shown in Figure 4.19, burst of non-epileptic rhythmic activities in different channels from Patient 8 makes the algorithm to generate a false alarm. In this case, the frequency range of these rhythmic patterns overlaps with the regularity band determined for the patient. Figure 4.20 presents a  90  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  FP1−F3 F3−C3 C3−P3 FP2−F4 F4−C4 C4−P4 FP1−F7 F7−T3 T3−T5 T5−O1 FP2−F8 F8−T4 T4−T6 T6−O2 SP1−T3 T3−C3 SP2−T4 T4−C4 300 µV 1 sec  Figure 4.19: False detection from Patient 8 resulting from a burst of non-epileptic rhythmic patterns. The arrow indicates the alarm time.  FP1−F3 F3−C3 C3−P3 FP2−F4 F4−C4 C4−P4 FP1−F7 F7−T3 T3−T5 T5−O1 FP2−F8 F8−T4 T4−T6 T6−O2 SP1−T3 T3−C3 SP2−T4 T4−C4  300 µV 1 sec  Figure 4.20: False detection from Patient 16 due to the EMG (chewing) artifacts. The arrow indicates the alarm time.  91  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  100  98  95  10  5  Sensitivity (%)  Sensitivity (%)  90 85 80 20  75  0.75  96  1  92 90 88  70  86  65 50  60 0  0.5  1 1.5 2 False Detection Rate (/h)  2.5  84 0.2  3  0.9  0.4  0.6 0.8 1 1.2 False Detection Rate (/h)  (a) Γ  1.6  100 1.5  90  1.2  1  0.1  0.05  0.01  90  80 70  Sensitivity (%)  Sensitivity (%)  1.4  (b) λ  100  2  60 50 40  80 70 0.3  60  30 20 10  0.25  0.5  94  3 0.7  50 0  0.5  1 1.5 2 False Detection Rate (/h)  2.5  3  0  2  4 6 8 False Detection Rate (/h)  (c) Ω  10  12  (d) α  Figure 4.21: Sensitivity versus false detection rate for different parameters (based on Ψk ): (a) Γ = 1, 5, 10, 20, and 50; (b) λ = 0.25, 0.5, 0.75, and 0.9; (c) Ω = 1, 1.2, 1.5, 2, and 3; (d) α = 0.01, 0.05, 0.1, 0.3, and 0.7.  sample of false detections for Patient 16, resulting from the muscle artifacts (chewing) as another cause of generating false alarms. As mentioned before, generic parameters Γ (Equation 4.5), λ (Equation 4.6), Ω (Equation 4.15), and α (Equation 4.20) were set to 10, 0.75, 1.5, and 0.1 respectively. To investigate the effect of changes in these parameters on the performance of the seizure detection method, the algorithm was applied to a subset of data with different values of these parameters. For this purpose, while changing one parameter, we hold the others unchanged. Figure 4.21 shows graphs of sensitivity versus false detection rate for different parameters, and Figure 4.22 presents the corresponding detection delays. With the goal of achieving a high sensitivity and a low false detection rate associated with a short delay, it can be seen that the values selected for different parameters in this work are appropriate. The detection method proposed in this chapter was also assessed in terms of the  92  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  10 15  Median Delay Average Delay  14  9 Delay (sec.)  Delay (sec.)  13 12 11 10  8.5 8 7.5  9  7  8  6.5  7  Median Delay Average Delay  9.5  1  5  10  20  6  50  Γ  0.25  0.5  (a)  0.75  0.9  (b)  16  30 Median Delay Average Delay  15  25  14 13  Delay (sec.)  Delay (sec.)  λ  12 11 10 9  Median Delay Average Delay  20 15 10 5  8 7  1  1.2  1.5  2  Ω  0 .01 .05 0.1  3  (c)  0.3  α  0.7  (d)  Figure 4.22: Detection delay for different parameters (based on Ψk ): (a) Γ, (b) λ, (c) Ω, and (d) α. Solid and dashed lines present the median and average delay respectively.  run time. A seizure detection method appropriate for real-time clinical applications needs to be computationally efficient. As an important tool used in the proposed method, the WPT is a fast algorithm with computational complexity of O(n log2 n) where n is the epoch dimensionality; however, the normalized cross-correlation with O(n2 ) complexity is the most computationally expensive part of this algorithm. In this work, implementation of the proposed seizure detection algorithm was done using MATLAB 7.1 and a common personal computer: Pentium D, CPU 3.40 GHz, and 3.25 GB of RAM. The typical run time of the proposed algorithm for a multichannel EEG epoch (15 channels × 2 s) was ∼330 ms, which allows  the real-time detection of epileptic seizures. The run time can be further reduced  by employing lower-level programming languages such as C/C++, more powerful processors, as well as multiprocessing techniques.  93  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  4.3.2 Seizure Focus Lateralization in Temporal Lobe Epilepsy Owing to the fact that the lateralization and localization of the primary seizure focus is essential in pre-surgical evaluations of patients with refractory epilepsy [18, 33, 35], other than seizure onset detection, the capability of the proposed waveletbased seizure index, i.e. CSI, in identifying the side of the seizure focus was also assessed in this study. For this experiment, only patients with TLE (22 patients) were considered, resulting in a total of 70 seizures after excluding the training seizures. The sides of seizure focus for these patients were determined by clinicians based on the combination of clinical information, MRI and EEG findings. This information was disclosed only after processing the epilepsy data using the proposed algorithm and extracting the CSI time series for all patients. The CSI time series from channels of both sides of the brain (i.e., side of the seizure focus and opposite side) were then reviewed under supervision of a neurologist to investigate the potential of the CSI in lateralizing the seizure focus. CSI (Opposite Side) FP1−F7  0.5 0  5  10  0  5  10  0  5  10  0  5  10  0  5  10  0  5  10  0  5  10  F7−T3  0 −5 1  0 −5 1  T3−T5  0.5  0 −5 1  T5−O1  0.5  0 −5 1  SP1−T3  0.5  0 −5 1  T3−C3  0.5  0.5 0 −5 1  C3−Cz  C4−Cz  T4−C4  SP2−T4  T6−O2  T4−T6  F8−T4  FP2−F8  CSI (Side Of The Seizure Focus) 1  0.5 0 −5  Time (sec.)  1 0.5 0 −5 1  0  5  10  0  5  10  0  5  10  0  5  10  0  5  10  0  5  10  5  10  0.5 0 −5 1 0.5 0 −5 1 0.5 0 −5 1 0.5 0 −5 1 0.5 0 −5 1 0.5 0 −5  0  Time (sec.)  Figure 4.23: Combined seizure index (CSI) from Patient 6 with right TLE. The CSI for different channels on the side of the seizure focus and the opposite side within a time window from -5 to 10 s with respect to the electrographic seizure onset is shown.  94  Chapter 4. Automated Real-Time Seizure Detection Based on WPT  0.2 0.18  Side of the seizure focus Opposite side  0.16 0.14  CSI  0.12 0.1 0.08 0.06 0.04 0.02 0  1 2 3 4 5 6 7 8 9 10 11 12 14 16 17 18 19 20 22 23 24 25  Patients  Figure 4.24: Average of CSI for the side of the seizure focus and the opposite side in patients with TLE (only seizures from the test dataset are considered).  Analyzing CSI time series, for every seizure a time window from -5 to 10 s with respect to the electrographic seizure onset was considered. Figure 4.23 shows the CSI for different channels in a seizure from Patient 6 with right TLE within the defined time window. In general, the CSI in the channels on the right side, i.e. side of the seizure focus, is significantly greater than that of the channels on the left. In other words, the CSI value can be used to identify the side of the seizure focus. To assess this hypothesis, the average of the CSI values over all seizures of each patient (within the defined time window) was calculated for the channels on the side of the focus comparing to the channels on the opposite side. Before averaging, the CSI values within the aforementioned time window around the onset of each seizure were normalized with respect to the maximum CSI over all channels (i.e. from both sides) in that window. This normalization was done to reduce the effect of the inter-patient and inter-recording variability. Let CSIf oc and CSIopp indicate the average of CSI over all seizures of a specific patient for the side of the seizure  95  Chapter 4. Automated Real-Time Seizure Detection Based on WPT focus and the opposite side, respectively. Considering all patients together, this resulted in two sets, i.e. sets of CSIf oc and CSIopp . Figure 4.24 shows the values of CSIf oc and CSIopp for different patients. As shown, CSIf oc is greater than CSIopp in all cases. To evaluate this difference statistically, the normality of sets of CSIf oc and CSIopp was first verified using the Lilliefors test [111, 112] at the 1% significance level. Then, a one-sided t-test was applied on these sets, revealing that the mean of CSIf oc is significantly greater than the mean of CSIopp (p < 0.001).  4.4 Summary and Conclusion A novel wavelet-based method for real-time epileptic seizure detection was proposed in this chapter. Applying a moving-window analysis, the CSI as a normalized index is computed for each epoch of every channel using the WPT. This novel index is based on the rhythmicity and relative energy of EEG in the desired channel as well as the consistency among different channels. The CSI is then inspected by the one-sided CUSUM test to generate alarms. Although CSI values are not independent and identically distributed, the CUSUM test, as a robust statistic, empirically revealed satisfactory performance in the epileptic seizure detection in this research. Utilizing a test set of ∼236 h of multichannel scalp epileptic EEG includ-  ing 79 seizures in 26 patients, the proposed method detected ∼91% of the epileptic  seizures with a low false positive rate of ∼0.33/h and a median delay of 7 s, where  about 69% of the seizures were detected in less than 10 s after the electrographic  onset, and ∼17% within 10–15 s (i.e., 86% of seizures were identified in less than 15 s after the electrographic onset).  In addition, the performance of the proposed seizure index (CSI) in lateralization of the seizure focus for patients with TLE was assessed in this chapter. Comparing the CSI from the channels on the side of the brain that included the seizure focus with those from the opposite side revealed that the average CSI around the onset for the side of the focus was statistically higher. Chapter 7 compares this novel seizure detection method with some other published techniques, discusses the limitations of this study/method, and provides some directions for future work.  96  Chapter 5  Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals In Chapter 3, a preliminary seizure prediction method based on entropy analysis of EEG zero-crossing intervals was proposed. The results showed that zero-crossing intervals could be used in identification of the underlying dynamics leading to the ictal states. However, the entropy-based method fails to provide a reasonable false prediction rate, limiting its application in practice. In this chapter, two novel methods based on analysis of zero-crossing intervals in scalp EEG are proposed. The first technique uses the Kullback–Leibler divergence (KL) as a distance measure to compare the current dynamics with the interictal and preictal references. The second method monitors the EEG dynamics using novel measures of similarity and dissimilarity based on a variational Bayesian Gaussian Mixture Model (GMM). The performance of these methods is evaluated using a large set of scalp recordings and tested against a random (chance) predictor. Parts of the work presented in this chapter have been submitted to IEEE Transactions on Biomedical Engineering [188] and parts have been published in Proceedings of International IEEE EMBS Conferences in 2010 [183], and 2011 [185].  97  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  5.1 EEG Zero-Crossing Intervals The evolution of partial (focal) epileptic seizures can be explained based on a longterm gradual preseizure change (or a cascade of changes) in the brain dynamics. Indeed, there exists a preictal state defined as the transition from the interictal state to the ictal, which is supported by some clinical evidence, such as the cerebral blood flow increase or changes in the heart rate [139]. In this research, the EEG underlying dynamics have been studied based on positive zero-crossing intervals (see Section 3.3.1). After calculation of the set of zero-crossing intervals for each epoch, the distribution (histogram) of these values is computed and used to identify the changes in the EEG dynamics and predict impending seizures.  5.1.1 Histogram of Zero-Crossing Intervals Let I be the set of positive zero-crossing intervals for a given EEG epoch, as defined by Equation 3.11. Then, the histogram of I is constructed using a new varying-bin-width scheme, proposed in this thesis. In this scheme, the histogram bins are selected such that the spectral content of EEG is reflected in the constructed histogram. Choosing a general frequency band, FG , from 1 to 30 Hz (in agreement with the frequency range reported in the literature for seizure onset [57, 162]), FG is split into non-overlaping frequency sub-bands of 1 Hz. Let [fl , fl+1 ] present the lth sub-band; then, the lth bin of the original histogram is defined as [1/fl+1 , 1/fl ]. Since the sampling frequency Fs is finite, this varying-bin-width approach may result in some bins which are always empty. In other words, the width of some bins of the original histogram is smaller than the time interval between the two consecutive signal samples (i.e., 1/Fs ). This issue can be tackled using a merging approach as follows. Starting from the bin with the smallest width, if its width is less than a predefined minimum acceptable width, termed wmin , this bin is merged with the adjacent bin resulting in a new bin, the width of which is the sum of the two widths. Then, if the resultant bin has also a width smaller than wmin , it is merged to the next bin in the histogram. This process continues until the width of the resulting combined bin is greater than or equal to wmin . Satisfying this constraint, the merging procedure is repeated, starting from the next narrow bin in 98  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals the original histogram. Finally, this approach results in a modified histogram with D0 bins, each of which has a width greater than or equal to wmin . After constructing the modified histogram of I for an EEG epoch, that epoch is presented with a D0 –dimensional vector defined as Φ = [ϕ1 , ϕ2 , . . . , ϕD0 ]T ,  (5.1)  where ϕi = ni /(L − 1), i = 1, 2, . . . , D0 , and ni is the number of positive zero-  crossing intervals falling in the ith bin of the histogram (L is the total number of positive zero-crossings). To implement this varying-bin-width histogram scheme for the discrete EEG (i.e., sampled at Fs ), the lth bin of the original histogram is determined as [Hl , Hl+1 ], where Hl = ⌊Fs /fl+1 ⌋ and Hl+1 = ⌊Fs /fl ⌋ (⌊·⌋  represents the floor function). The minimum acceptable bin width of 3 sample points (wmin ≈ 12 ms, Fs = 256 Hz) is chosen for the merging process, resulting  in D0 = 14 for the modified histogram.  5.1.2 Discriminative Histogram Bins Constructing vector Φ (Equation 5.1), the histogram bins discriminating between the interictal and preictal states are selected based on the distribution of ϕi in the interictal and preictal reference (training) intervals, defined for each patient specifically. Considering a particular seizure in the training dataset, the 5-min EEG segment ending at the onset of the seizure is selected as the preictal reference. Also, up to 15 min of EEG far from the training seizure (at least 60 min before the onset) is chosen as the interictal reference. Computation of ϕi for all epochs of each reference results in two sets of data points for the ith histogram bin. Let Φiint and Φipre be the resulting datasets for the interictal and preictal references, respectively. Then, the Kolmogorov-Smirnov test (KS-test) [124, 189] is employed to compare the distributions of the values in the two datasets, where the null hypothesis is that Φiint and Φipre are from the same continuous distribution. The two-sample KS-test statistic for the ith histogram bin is defined as [189] KSi = max |Pint (ϕi ) − Ppre (ϕi )| , 99  (5.2)  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  Figure 5.1: Determining the discriminative histogram bins for predicting seizures. where Pint (ϕi ) and Ppre (ϕi ) are empirical cumulative distribution functions of sample sets Φiint and Φipre , respectively. The histogram bins rejecting the null hypothesis at the 1% significance level are chosen as the discriminative bins and used in prediction of epileptic seizures. In the case of multiple training seizures, the bins rejecting the null hypothesis for all seizures are selected. Figure 5.1 presents the procedure to determine the discriminative histogram bins.  5.2 Predicting Seizures Based on Kullback–Leibler Divergence Once the discriminative histogram bins are determined, alarms predicting the upcoming seizures can be generated by monitoring the EEG dynamics based on the selected bins. Let D be the number of selected bins (i.e., bins rejecting the null hypothesis) and {i∗l } refer to the corresponding set of selected bins, where  l = 1, 2, . . . , D. In a moving window-analysis, after computing ϕi∗l for the kth EEG epoch (the current epoch in the real-time process), the Probability Density Function (PDF) of ϕi∗l is estimated using the corresponding values for the epochs of the last 5 min (including the kth epoch). To estimate the PDF, the kernel density  100  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals estimation method (defined by Equation 3.12), as a non-parametric approach, with the standard Gaussian kernel is employed in this work. The smoothing parameter of the kernel is determined by Equation 3.13 as described before in Section 3.3.2. Let pˆki∗ be the estimated distribution of ϕi∗l for the kth epoch; l = 1, 2, . . . , D. l  In the next step, the distances between pˆki∗ and two reference distributions of ϕi∗l l  (i.e., interictal and preictal) are calculated. The preictal reference is the training reference used to determine the discriminative bins. For the interictal reference, a reference specific to the recording under process is chosen instead of the fixed reference used for determination of the discriminative bins. This selection is due to the high variability of the interictal patterns over time and to reduce the false alarms resulting from different dynamics appearing in the interictal EEG. This recordingbased reference is defined as the first five-minute period of the recording under process. In case of continuous recordings, this interictal reference is updated every hour. ∗ Suppose pˆint ˆpre i∗ and p i∗ are the estimated distributions of ϕil for the recordingl  l  based interictal reference and the preictal reference respectively; then, the distances pre of the kth epoch to the interictal (DSint i∗ ) and preictal (DSi∗ ) references, for bin l  i∗l , are respectively defined as  l  DSint ˆki∗ i∗ = KL p  pˆint + KL pˆint i∗ i∗  pˆki∗  (5.3)  ˆki∗ DSpre i∗ = KL p  pˆpre + KL pˆpre i∗ i∗  pˆki∗  (5.4)  l  l  l  l  l  and l  l  where KL(p  l  l  l  q) is the KL divergence (relative entropy) [96] between PDFs p(x)  and q(x). In the case of multiple training seizures, the average of DSpre i∗ over all l  preictal references is calculated. pre Having calculated the distances DSint i∗ and DSi∗ , a novel seizure prediction l  l  index for the kth epoch is defined as rk = 1 − exp −  ∆int λ∆pre  (5.5)  pre where λ ≥ 1; ∆int and ∆pre are respectively the average of DSint i∗ and DSi∗ over l  101  l  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals the selected bins ∆  int  1 = D  D  DSint i∗s  ,  ∆  pre  l=1  1 = D  D l=1  DSpre i∗s  (5.6)  Comparing seizure prediction index rk with threshold θc , an alarm sequence is generated by   (rk − θc ) / (1 − θc ) , γk = 0,  if rk ≥ θc  (5.7)  otherwise  The greater rk , the stronger the generated alarm. Considering alarms from all channels for the kth epoch, the top Y values are selected and averaged. Let γk be  the resulting average signal; the seizure prediction alarm Γk is then generated as Γk =   1,  0,  if γk ≥ θa for at least 2 min  (5.8)  otherwise  Therefore, an alarm is generated if the average signal is greater than or equal to θa for the last 2 min. Parameters λ, θc , and θa are determined specifically for each patient by minimizing the following cost function, proposed by previous studies [8, 20], over the training set CF =  (1 − SE)2 +  FPR FPR0  2  (5.9)  where SE refers to the sensitivity (between 0 and 1), FPR is the false prediction rate (per hour) and FPR0 = 1/h.  5.3 Predicting Epileptic Seizures Using Variational Bayesian Mixture of Gaussians In the KL-based method proposed in Section 5.2, each discriminative histogram bin is individually analyzed, and then distance measures computed over all selected bins are averaged (Equation 5.6). This approach can depreciate the performance of the method (see Section 5.6) since it dose not consider the joint distribution of all  102  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals selected bins and treats them as independent random variables. In this section, a novel method based on a variational GMM of the discriminative bins is proposed, where the posterior distributions of the model parameters are estimated through a fully Bayesian framework. Indeed, instead of considering each individual bin, all selected bins are considered together and treated as a single multidimensional data point (for each epoch).  5.3.1 Variational Mixture of Gaussians In this study, to monitor the EEG dynamics and generate alarms (warnings) for upcoming seizures, the discriminative histogram bins are analyzed using the variational GMM-based clustering. Given an observation x, the mixture of Gaussian densities can be written as M  p(x|Θ) = m=1  πm N x|µm , Λ−1 m ,  (5.10)  where Θ = {µm , Λm , πm } represents model parameters; µm and Λm are the  mean and precision matrix of the mth Gaussian density, respectively, and parameters {πm } are mixing coefficients satisfying  m πm  M is the number of Gaussians (model components).  = 1 and 0 ≤ πm ≤ 1, while  One may introduce an M –dimensional latent variable z corresponding to the observed data point x, where zm ∈ {0, 1} and  m zm  = 1 (i.e., one–of–M binary  vector [16]). Then, the mixture distribution can be rewritten in terms of marginalization over the latent variable p(x|Θ) = z  p(x|z, {µm , Λm })p(z|{πm })  where  M  p(x|z, {µm , Λm }) =  m=1  N x|µm , Λ−1 m  zm  (5.11)  (5.12)  M  p(z|{πm }) =  zm . πm  (5.13)  m=1  Based on this definition of the GMM using the latent variable z, the parameters 103  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals of the GMM can be estimated through the maximum likelihood framework using the Expectation–Maximization (EM) algorithm. However, the traditional maximum likelihood GMM suffers from over-fitting and singularities arising when a Gaussian component collapses onto a particular data point (i.e, the Gaussian mean is exactly equal to that data point) [16]. Therefore, the current work is based on the variational GMM, in which the posterior distributions over model parameters are approximated (instead of point estimation of their values) through a fully Bayesian framework [10, 11, 16]. Let X = {x1 , . . . , xN } and Z = {z1 , . . . , zN } be the sets of N observations  and the corresponding latent variables, respectively. Then, defining prior distributions over all parameters, the log marginal likelihood ln p(X) (also known as the model evidence) can be decomposed as [16] ln p(X) = L(q) + KL (q  p) ,  where the functional L(q) is the lower bound of ln p(X), and KL (q  (5.14) p) is the  KL divergence between the variational posterior distribution q(Z, Θ) and the true posterior p(Z, Θ|X), defined as L(q) =  q(Z, Θ) ln z  p(X, Z, Θ) dΘ , q(Z, Θ)  and KL (q  p) = −  q(Z, Θ) ln z  p(Z, Θ|X) dΘ . q(Z, Θ)  (5.15)  (5.16)  By maximizing the functional L(q) with respect to q(Z, Θ), which is equivalent to  minimizing the KL divergence, the true posterior distribution p(Z, Θ|X) is approx-  imated as the optimum distribution q ∗ = arg maxq L(q), where the optimization is  performed by restricting the family of distributions q(Z, Θ) to the factorized form q(Z, Θ) = q(Z)q(Θ) [16].  To simplify the analysis, prior distributions over the model parameters are chosen as the conjugate priors for the conditional distributions of the observed data points and the corresponding latent variables, i.e. p(X|Z, {µm , Λm }) and  p(Z|{πm }). Considering all observed and latent variables, Equations 5.12 and 104  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals 5.13 can be extended as follows to obtain these conditional distributions. N  p(X|Z, {µm , Λm }) =  M  n=1 m=1  and  N  p(Z|{πm }) =  N xn |µm , Λ−1 m  znm  (5.17)  M znm . πm  (5.18)  n=1 m=1  Then, a Gaussian–Wishart prior over {µm , Λm } (i.e., the conjugate prior) is de-  fined as [16]  p({µm , Λm }) = p({µm }|{Λm })p({Λm }) M  = m=1  N µm |µ0 , (β0 Λm )−1 W (Λm |W0 , ν0 )  (5.19)  where W(·) denotes the Wishart distribution; µ0 , β0 (scaling factor), W0 and ν0 are the hyperparameters of the prior.  Similarly, the prior over {πm } is defined as a Dirichlet distribution with the  same hyperparameter α0 for each of the components (i.e., α0 = α0 · 1M ×1 ) [16] p({πm }) = Dir({πm }|α0 )  (5.20)  After defining the priors over the model parameters, the joint distribution of all random variables is computed as p(X, Z, Θ) = p(X|Z, {µm , Λm })p(Z|{πm }) × p({πm })p({µm }|{Λm })p({Λm }) ,  (5.21)  and the posterior distributions are approximated as ln q ∗ (Z) = EΘ (ln p(X, Z, Θ)) + const.  (5.22)  ln q ∗ (Θ) = EZ (ln p(X, Z, Θ)) + const.  (5.23)  where EΘ (·) and EZ (·), respectively, denote the expectation with respect to the  105  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals variational posterior distributions over Θ and Z [16]. The approximated posterior distributions are obtained by substituting Equation 5.21 in Equation 5.22 and Equation 5.23, computing the expectation, absorbing the terms independent of the desirable variable for which the posterior is being calculated into the additive constant, and determining the additive constant by normalizing the corresponding distribution. It is worth noting that the right-hand side of Equation 5.23 can be decomposed into the summation of terms depending only on either {πm } or {µm , Λm }  which implies that q ∗ (Θ) = q ∗ ({πm })q ∗ ({µm , Λm }), although this factorization  is not initially assumed. The posterior distributions can be finally approximated as [16] N  M  ∗  znm , rnm  q (Z) =  (5.24)  n=1 m=1  q ∗ (µm , Λm ) = N µm |µm , (βm Λm )−1 W (Λm |Wm , νm ) ,  (5.25)  and q ∗ ({πm }) = Dir({πm }|α)  (5.26)  where rnm and the hyperparameters of the posterior distributions, i.e. µm , βm , Wm , νm , and α (with components αm ), are calculated iteratively using the update equations given by the variational equivalent of the EM algorithm (see Appendix B for details). Note that, as expected, employing the conjugate priors over the GMM parameters results in the posterior distributions from the same family of distributions as the corresponding priors, i.e. Gaussian–Wishart distribution for {µm , Λm }  and Dirichlet for mixing coefficients.  In this work, the hyperparameters of the prior distributions are selected as follows. Parameter β0 is set to 1, and by symmetry µ0 = 0. Also, ν0 = 20 to satisfy the necessary condition of ν0 > D − 1 for the Wishart distribution (D is the di-  mensionality of the data). Moreover, W0 = 200ID×D and α0 = 0.001 to have posterior distributions that are mainly influenced by the data rather than the priors [16]. Appendix B also provides the related equations for computing the lower bound L(q).  106  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  5.3.2 Similarity and Dissimilarity Indices The seizure prediction method proposed in this section utilizes the variational GMM of the discriminative histogram bins to compute novel similarity and dissimilarity indices, measuring the distance of the current EEG dynamics to the reference preictal and interictal states, respectively. Based on these indices, a new combined index is then defined and compared to a patient-specific threshold to form a cumulative measure. In the next step, an alarm sequence is generated per channel based on this measure. Finally, the channel-based information is used to trigger a seizure prediction alarm (warning) for the upcoming seizure. Details of this approach are described below. Let D be the number of discriminative histogram bins (i.e., bins rejecting the null hypothesis) and {i∗l } indicate their corresponding set, where l = 1, 2, . . . , D. Each EEG epoch can be then represented by  x = [ϕi∗1 , ϕi∗2 , . . . , ϕi∗D ]T .  (5.27)  After computing xk for the kth EEG epoch (current epoch in real-time processing), the current observation set is defined as Xk = {xk−Nk +1 , . . . , xk−1 , xk },  where Nk is the total number of epochs in the last 5 min of the EEG (including the  current epoch). This set of observations is then compared with the interictal (Xint ) and preictal (Xpre ) reference sets. Xpre is simply the set of x computed for all epochs of the preictal reference that is used in the training step. To select Xint , a more local 5–min interictal reference, i.e. closer to the current epoch (instead of the interictal reference defined in Section 5.1.2), is chosen in order to avoid false alarms resulting from high variability of the interictal patterns over time. This interictal reference is updated every hour in the case of long recordings. For discontinuous recordings, the first 5–min of each recording is considered as the reference. The size of Xint and Xpre are defined as Nint and Npre , respectively. One major advantage of the variational GMM over the traditional GMM is a tradeoff between the model complexity and fitting data. This feature provides the possibility of keeping the effective model components, while eliminating those with small expected mixing coefficients E(πm ) (defined by Equation 5.28), which is the basis for comparison between the current epochs and references in the pro107  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals posed method.  αm . M m=1 αm  E(πm ) =  (5.28)  In this work, the mth component of the GMM is considered to be effective if E(πm ) ≥ 0.05.  Measuring the similarity between current observations and preictal reference  set using the variational GMM, the number of model components (M ) is initially set to 2, where X = {Xpre , Xk }. Then, the novel similarity index for the kth epoch  (ˆ sk ) is defined as  sˆk =   1, J  if Me = 1  pre × (1 − ζpre ),  (5.29)  otherwise  where Me is the number of GMM effective components after the convergence; Jpre  and ζpre are the matching and isolation measures, respectively, introduced below. That is, if the number of (effective) components after convergence is one, Xpre and Xk are significantly similar, and therefore, sˆk = 1; otherwise, the similarity index is determined based on Jpre (matching) and ζpre (isolation).  The matching measure Jpre shows how matched the two clusters resulting from  the GMM are with the original sets Xpre and Xk . Suppose Nk′ is the maximum number of data points from Xk which fall in a single cluster after GMM conver′ gence. Also, let Npre be a similar quantity for Xpre . Then,  Jpre =  Q  Nk′ Nk  where Q(A) =  ′ Npre Npre  ×Q  A− 1−  1 Me 1 Me  .  (5.30)  (5.31)  The isolation measure ζpre reveals how isolated Xpre and Xk are. This measure is calculated based on the R nearest neighbors of each data point x ∈ X [150]. Suppose ϑR (x) is the fraction of the R (here, 5) nearest neighbors of x that have  108  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  Figure 5.2: Computation of the similarity index. The operation inside the dashed box is activated only if Me = 1.  the same label as x, then a nearest neighbor norm is computed as [150] ϑR =  1 N  ϑR (x)  (5.32)  x∈X  where N is the size of X. This measure ranges from 0 to 1; the more isolated Xpre and Xk are, the higher ϑR is. If the decision boundary is set to 0.5, the isolation measure ζpre is defined by the following nonlinear transform of ϑR to have a more clear distinction between the isolated and non-isolated (integrated) cases and improve the accuracy of the proposed method. ζpre  ϑR − 0.5 = 1 + exp − 0.1  −1  (5.33)  It is worth mentioning that, in the case of multiple training seizures, the final similarity measure is the average of sˆk over all preictal reference sets (i.e., for each training seizure, one preictal set Xpre is considered). Figure 5.2 summarizes the calculation steps for the similarity index. To compute the dissimilarity index (dˆk ), Xk is compared with Xint similarly. Defining X = {Xint , Xk } and setting the number of GMM components to 2, the 109  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals novel dissimilarity index is defined as dˆk =   0, J  int  if Me = 1  (5.34)  × ζint , otherwise  where Jint and ζint are respectively the matching and isolation measures computed  using Equation 5.30 and Equation 5.33 when Xpre is replaced by Xint (i.e., the matching and isolation measures calculated using Xint ). According to Equation 5.34, if there exists only one (effective) component after convergence, Xint and Xk are significantly similar and dˆk = 0. Otherwise, the dissimilarity index is determined using the matching and isolation measures. By definition, both sˆk and dˆk are between 0 and 1.  5.3.3 Seizure Prediction Alarm Having calculated the similarity and dissimilarity indices, a novel combined index for the kth epoch is defined as Ck = median cˆk−Nk +1 , . . . , cˆk−1 , cˆk ,  (5.35)  cˆk = (ˆ sk × dˆk )0.5  (5.36)  where  and Nk is the number of epochs in the last 5 min. In the preictal interval, Ck increases since both sˆk and dˆk increase, i.e. the observed data points get closer to the preictal reference and more distant from interictal. Then, the following new cumulative measure, comparing the combined index with a threshold ηc , is defined Uk = max 0, εk 1 +  1 (1 − H(εk )) + Uk−1 , ηc2  (5.37)  where εk = Ck − ηc , 0 ≤ ηc ≤ 1, and H(·) is the step function. It is worth not-  ing that the proposed cumulative measure is equivalent to the standard cumulative  sum [120, 148] when εk ≥ 0. However, if εk < 0, εk is magnified by (1 + 1/ηc2 )  and the sum decreases significantly. This reduces the number of false alarms, es-  pecially when ηc is small. Finally, an alarm sequence is generated for the given 110  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  Figure 5.3: Steps of the seizure prediction method based on the variational GMM. The “Histogram extraction” block is the same as the one defined in Figure 5.1.  channel by γk = 1 − exp(−ηs Uk ),  (5.38)  where 0 ≤ ηs ≤ 1. Now, considering all EEG channels together, the γ values from all channels at the same epoch are sorted in descending order, and the first Y  values are averaged. Let γk be the resulting average for the kth epoch; the seizure prediction alarm Γk is then generated as Γk =   1, 0,  if γk ≥ ηa for the last 2 min  (5.39)  otherwise  In other words, an alarm forewarning of an upcoming seizure is generated if γk remains above ηa for at least 2 min. Parameters ηc , ηs , and ηa are determined specifically for each patient during the training step by minimizing Equation 5.9. Figure 5.3 summarizes the steps of proposed seizure prediction method.  111  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  5.4 An Analytical Chance Predictor To assess the performance of a seizure prediction method, it is necessary to test it against chance [139]. For this purpose, a recently developed statistical framework [195], in which the count of the random warnings (alarms) in any time interval follows a Poisson probability distribution, is employed in this thesis. According to this statistical approach, the chance predictor is constructed such that it provides the same portion of time spent in warning as the method under evaluation. A successful algorithm will provide higher sensitivity than the chance predictor under this condition. The sensitivity of such a chance predictor is shown to be [195] SEc = 1 − exp − λw τw + (1 − exp (−λw τw0 )) ,  (5.40)  where τw is the prediction horizon (the maximum acceptable prediction interval), and τw0 is the intervention time (or “detection interval”) which represents the “minimum desired prediction interval”. λw is the Poisson rate parameter, defined in terms of the portion of time under warning (ρw ) as follows λw = −  1 ln (1 − ρw ) . τw  (5.41)  The statistical framework proposed in [195] compares the sensitivity of the candidate method with that of the chance predictor after matching ρw to assess the significance of any improvements over chance and reports a p-value. Indeed, the related p-value calculated by Equation 5.42 shows how superior the method under evaluation is to chance [195]. Ja  p−value = 1 −  j=0 Jb  + j=0  nszr SEc j (1 − SEc )nszr −j j nszr SEc j (1 − SEc )nszr −j j  (5.42)  where Ja = ntrue − 1, Jb = ⌊2nszr SEc − ntrue ⌋ (⌊·⌋ indicates the floor function),  nszr is the total number of seizures, and ntrue is the total number of true alarms. The above p-value is computed for each patient separately. To compare the  112  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals performance of a method with that of the chance predictor over a population of patients, however, the significance of the median sensitivity improvement should be assessed instead, since the ρw varies among patients [195]. For this purpose, in this work, the set of sensitivities of the method under assessment for all patients is compared with the set of sensitivities resulting from the chance predictor using the two-sided Wilcoxon rank sum test [189], with the null hypothesis that these two sets include independent samples from identical continuous distributions with equal medians.  5.5 Epilepsy Data With ethics approval, a large scalp EEG dataset provided by the EEG department of Vancouver General Hospital from patients with temporal lobe (TLE) and extratemporal lobe (eTLE) epilepsy was utilized in this study. This dataset included ∼289 h of multichannel EEG with a total of 68 seizures in 17 patients (13 patients  with TLE and 4 patients with eTLE). Patients included 11 females and 6 males, with an average age of ∼36 years. EEG data were acquired in the seizure investi-  gation unit based on the International 10-20 system, bandpass-filtered between 0.1 and 100 Hz, and sampled at 256 Hz. Table 5.1 reports the EEG data in details. For each patient, the available data were split into separate training and test sets. In this work, a bipolar-montage scheme including up to 18 channels was used. To apply a moving-window analysis, each EEG recording was segmented into non-overlapping 15-second epochs.  5.6 Results This section presents the results of the two proposed seizure prediction techniques (i.e. the KL-based and variational GMM-based methods), applied to the scalp EEG dataset introduced in Section 5.5, and compares the performance of these algorithms with that of the analytical chance (random) predictor described in Section 5.4. To evaluate the proposed methods, surface EEG recordings from each patient were divided into separate training and test sets. The training set was used to extract the interictal and preictal references (Section 5.1.2) and determine the discriminative histogram bins. Moreover, parameters ηc , ηs , and ηa (variational GMM-based 113  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals Table 5.1: Epilepsy EEG Data.  Patient 1 2 3 4 5 6∗ 7∗ 8 9 10 11 12 13∗ 14 15 16 17∗ ∗  Age Gender (yr)  Train LR No. (h) Szr  18 26 25 25 47 68 24 24 43 26 26 54 36 42 58 35 38 All  1.0 0.9 2.0 3.0 1.3 1.7 2.3 5.4 2.5 1.9 1.3 6.0 4.5 9.0 13.0 12.0 6.0 73.8  F F F F M F M F M F F M M F M F F  1 1 2 1 1 1 1 2 1 1 1 1 1 2 2 2 1 22  Test LR No. (h) Szr 4.2 2.2 5.1 4.1 4.3 2.0 7.7 9.0 3.5 2.1 6.7 32.0 15.9 23.0 45.0 33.0 15.0 214.8  3 2 4 2 2 1 6 6 2 1 3 3 1 3 3 3 1 46  Total LR No. (h) Szr 5.2 3.1 7.1 7.1 5.6 3.7 10.0 14.4 6.0 4.0 8.0 38.0 20.4 32.0 58.0 45.0 21.0 288.6  4 3 6 3 3 2 7 8 3 2 4 4 2 5 5 5 2 68  Patients with extraTemporal Lobe Epilepsy (eTLE). LR: Length of Recordings; Szr: Seizures.  method) and λ, θc , and θa (KL-based method) were determined for each patient by minimizing the cost function defined in Equation 5.9 for the training dataset of that patient. The parameter Y was initially set to 3 for all patients (both methods). In case of CF >0 for the training set of a patient, Y was readjusted and the training  step was repeated for that patient to get a desirable performance on the training set. For the proposed method based on the variational GMM, this procedure resulted in Y = 4 for patients 8, 12, and 14. For all other patients Y was kept as 3. For the  prediction method based on the KL divergence, Y was set to 4 for patients 5, 8, 12, 14 and 15, while Y = 3 for the other patients.  In the assessment of the prediction methods, an alarm (warning) was consid-  ered to be true if a seizure happened within 40 min (i.e., prediction horizon, τw ) 114  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals after the alarm; otherwise, it was labeled as a false alarm. Selection of the 40-min prediction horizon was based on the training data and is consistent with the range of values commonly used in the previous works [139]. The successive alarms with an interval less than 40 min were assumed as a single alarm. The prediction time was defined as the time difference between the alarm and the electrographic seizure onset. Alarms generated within 2 min (i.e., intervention time, τw0 ) before the seizure onset were ignored, since there would not be sufficient time in order to prevent/control seizures in this case. In this work, the false prediction rate was computed by dividing the total number of false alarms (warnings), nf alse , by the total recording duration, Trec , after excluding the prediction horizon periods (τw per seizure), i.e. corrected false prediction rate [8, 139], FPR =  nf alse , Trec − (nszr × τw )  (5.43)  where nszr is the total number of seizures. In the rest of this section, the results of the two prediction methods are presented.  5.6.1 Method Based on KL Divergence The quantitative results of the KL-based method are shown in Table 5.2 for each patient. This table also compares the performance of the algorithm with the analytical chance predictor and reports relevant quantities. As can be seen, the KL-based method achieved the sensitivity of 80.43% along with the false prediction rate of 0.250/h and an average/median prediction time of 25.9 min/26.9 min for the test data. Overall, although the method based on the KL divergence could predict 37 out of 46 test epileptic seizures, it generated a relatively high number of false warnings (46 alarms), which can limit the clinical application of the method. As results show, although the sensitivity of KL-based method is higher than that of the random predictor for all patients and this superiority is statistically significant over the whole population of patients (p ≈2.4 × 10−5 ), this method performs significantly better than chance for only 6 patients with 10% significance  level. The reason for this insignificant improvement for most of the remaining 11 patients is the high false alarm rate which increases the portion of time under warn115  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals Table 5.2: Seizure prediction results for the method based on the KL divergence. Training Set FPR APT (/h) (min.)  SE (%)  Test Set FPR APT (/h) (min.)  Patient  SE (%)  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  100 100 100 100 100 100 100 100 100 100 100 100 100 50 100 50 100  0 0 0 0 0 1.00 0 0.244 1.681 0.784 0 0.187 0 0.391 0.257 0.562 0.750  22.3 37.4 26.4 17.6 9.2 39.67 6.8 21.4 29.8 23.5 32.9 7.0 7.1 39.6 16.9 39.6 39.6  66.67 100 100 100 100 100 100 83.34 100 100 66.67 33.34 100 66.67 66.67 33.34 100  0.455 1.195 0.825 0 1.00 0 0.274 0.795 0 0 0 0.067 0.065 0.524 0.256 0.161 0.279  31.3 39.8 24.7 28.7 22.0 13.3 25.2 34.6 3.1 18.7 13.6 39.7 26.9 34.9 23.2 19.0 6.8  All  90.90  0.388  24.1  80.43  0.250  25.9  Chance Predictor SEc p-value (%) 39.18 90.81 56.77 22.27 69.11 10.35 40.11 59.65 2.77 14.05 6.48 5.94 6.67 35.56 17.23 10.56 17.74  0.5652 1.000 0.1388 0.0496 0.5731 0.1035 0.0042 0.4119 0.0008 0.1405 0.0121 0.1678 0.0667 0.5570 0.0788 0.2845 0.1774 2.4 × 10−5  SE: Sensitivity; FPR: False Prediction Rate; APT: Average Prediction Time; SEc : Chance Predictor Sensitivity.  ing (ρw ) for those patients. However, for a few patients with low or even zero false prediction rate, the method still cannot pass the statistical test at the mentioned significance level. In case of Patients 6 and 10, due to very short recordings available (2 and 2.1 h respectively), the KL-based method does not perform significantly better than chance although the method predicts all test seizures and generates no false alarms. For Patients 12 and 16, the false positive rate is low for the test data, but the method superiority to chance is not statistically significant as the sensitivity is also low (33.34%). Figure 5.4 (a)–(d) present the average distance to the recording-based interictal reference (∆int ) and the preictal reference (∆pre ) as well as the seizure prediction 116  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals index rk (λ = 4.05) and the alarm sequence γk for channel F7 -T3 of Patient 9 from ∼50 min before an electrographic seizure onset to ∼10 min after. As shown, ap-  proaching to the seizure, ∆pre decreases gradually and noticeably drops at about  7 min before the onset, when ∆int also increases significantly. Therefore, rk surpasses the threshold θc (0.35), and alarms are generated. Figure 5.4 (e) shows the average of the top 3 channel alarms (i.e., Y = 3) for the same interval of the same  patient and reveals that the method is able to predict the upcoming seizure 2.1 min  earlier (θa = 0.5). In Figure 5.5, similar measures for an interictal interval of the same patient (and the same channel) are shown. ∆int remains low (in comparison to Figure 5.4 (a)) during the interictal interval. At the same time, while ∆pre shows some fluctuations, its overall value is high. As a result, rk remains below the threshold. This situation can be seen in all channels; therefore, the algorithm does not generate any alarms. Figure 5.6 shows a case that the KL-based method fails to predict the impending seizure. Channel-based measures (for T4 -T6 ) and γk are shown for an EEG interval from ∼45 min before to 1 min after the electrographic onset of a seizure from Patient 1 (θc = 0.4, λ = 4, θa = 0.6, and Y = 3). As can be seen, when ∆int  increases before the onset, ∆pre does not decreases; hence, rk does not pass the threshold, and no alarms are generated.  117  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  25  20  20  15  15  ∆int  ∆pre  25  10  10  5 0  5  −40  −30  −20  −10  0  0  10  −40  −30  Time (min)  −20  (a) 1  0.8  0.8  10  0  10  0.6  γk  rk  0.6  θc  0.4  0.2 0  0  (b)  1  0.4  −10  Time (min)  0.2  −40  −30  −20  −10  0  0  10  −40  Time (min)  −30  −20  −10  Time (min)  (c)  (d) 1 0.8  θa  γk  0.6 0.4 0.2 0  −40  −30  −20  −10  0  10  Time (min)  (e)  Figure 5.4: Different measures calculated for an EEG interval from Patient 9 using the method based on the KL divergence (θc = 0.35, λ = 4.05, and θa = 0.5): (a) ∆int , (b) ∆pre , (c) rk , and (d) γk , for channel F7 -T3 ; (e) γk obtained using the top 3 channel alarms (Y = 3). Time axis is scaled with respect to the electrographic seizure onset.  118  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  5  22 20  4  18  ∆int  ∆pre  3  16  2  14 1 0 0  12 10  20  30  40  10 0  50  10  20  Time (min)  (a)  50  0.8  0.6  0.6  40  50  γk  0.8  rk  1  θc  0.4  0.2 0 0  40  (b)  1  0.4  30  Time (min)  0.2  10  20  30  40  0 0  50  10  20  Time (min)  30  Time (min)  (c)  (d) 1 0.8  θa  γk  0.6 0.4 0.2 0 0  10  20  30  40  50  Time (min)  (e)  Figure 5.5: Different measures calculated for an interictal EEG interval from Patient 9 using the method based on the KL divergence (θc = 0.35, λ = 4.05, and θa = 0.5): (a) ∆int , (b) ∆pre , (c) rk , and (d) γk , for channel F7 -T3 ; (e) γk obtained using the top 3 channel alarms (Y = 3).  119  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  5  14 12  4  10  ∆int  ∆pre  3 2  8 6 4  1 0  2 −40  −30  −20  −10  0  0  −40  −30  Time (min)  (a) 1  0.8  0.8  0  −10  0  0.6  γk  0.6  rk  −10  (b)  1  θc 0.4  0.4  0.2  0.2  0  −20  Time (min)  −40  −30  −20  −10  0  0  −40  −30  Time (min)  −20  Time (min)  (c)  (d) 1 0.8  θa  γk  0.6 0.4 0.2 0  −40  −30  −20  −10  0  Time (min)  (e)  Figure 5.6: Different measures calculated for an EEG interval from Patient 1 using the method based on the KL divergence (θc = 0.4, λ = 4, and θa = 0.6), where the method misses the impending seizure: (a) ∆int , (b) ∆pre , (c) rk , and (d) γk , for channel T4 -T6 ; (e) γk obtained using the top 3 channel alarms (Y = 3). Time axis is scaled with respect to the electrographic seizure onset.  120  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  5.6.2 Method Based on Variational GMM In this section, results of the proposed seizure prediction method based on the variational GMM are presented. Table 5.3 presents the quantitative results of the algorithm for all patients and compares it with the analytical Poisson-based random predictor. Overall, the automated method predicted 91.3% of the epileptic seizures (42 out of 46) in the test dataset with a false prediction rate of 0.136/h (i.e., a total of 25 false alarms) and the average/median prediction time of 22.3 min/22.0 min. The method shows a statistically significant superiority over the chance predictor (p = 3.3 × 10−7 ) when comparing the median of their sensitivities across all  patients through the Wilcoxon rank sum test. Investigating the performance of the method for each individual patient, the sensitivity is higher than that of the chance predictor for all 17 patients, where this improvement over chance is statistically significant (p < 0.1) for 13 patients. In case of Patient 2, although the method achieves 100% sensitivity and does not generate any false alarms for the test set, its performance is not significantly better than the chance predictor because the length of the recordings available from this patient is very short (2.2 h for test and 3.1 h in total). This situation can also be seen for Patients 6 and 10 with, respectively, 2 and 2.1 h of test recordings. For Patient 5, although the test recording is longer (4.3 h), the method cannot pass the statistical test as it misses one of the two test seizures. Among the other patients for whom the proposed method passes the the statistical test, there are a few cases showing less compelling p-values. For example, the variational GMM-based method results in 100% sensitivity and a false prediction rate of 0.065/h for Patient 13, where the statistical test p-value is ∼0.07. This is partly due to the fact that there is only one seizure in the test dataset of this patient which reduces the power of the statistical test. As these results confirm, the proposed seizure prediction method based on the variational GMM performs significantly better than the method based on the KL divergence. Not only does the variational GMM-based method reveal higher sensitivity, but also the number false alarms that it generates is almost half as many as the KL-based method produces. In addition, unlike the KL-based method which does not perform significantly better than chance in most of the cases (11 patients),  121  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals Table 5.3: Seizure prediction results for the method based on the variational GMM. Training Set FPR APT (/h) (min.)  SE (%)  Test Set FPR APT (/h) (min.)  Patient  SE (%)  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  100 100 100 100 100 100 100 100 100 100 100 100 100 50 50 100 100  0 0 0 0 0 0 0 0 0.56 0 0 0.187 0.261 0.130 0.171 0.187 0.187  17.1 10.9 20.9 5.8 3.7 37.6 3.3 16.6 10.3 19.0 5.1 5.0 2.3 39.6 16.1 30.8 39.1  66.67 100 100 100 50 100 100 100 100 100 100 100 100 66.67 66.67 100 100  0 0 0 0 0 0 0 0.198 0 0 0.214 0.167 0.065 0.190 0.116 0.225 0.070  22.0 23.4 26.2 29.3 38.1 34.6 23.0 28.0 2.9 15.5 21.5 23.3 30.5 10.2 7.6 26.0 3.1  All  90.90  0.152  17.6  91.30  0.136  22.3  Chance Predictor SEc p-value (%) 16.70 34.54 32.94 22.75 14.12 26.95 28.82 36.92 2.54 11.60 25.0 13.43 7.02 12.49 7.60 17.28 4.56  0.0744 0.1192 0.0118 0.0518 0.2624 0.2696 0.0006 0.0025 0.0006 0.1161 0.0156 0.0024 0.0702 0.0429 0.0165 0.0052 0.0456 3.3 × 10−7  SE: Sensitivity; FPR: False Prediction Rate; APT: Average Prediction Time; SEc : Chance Predictor Sensitivity.  the variational GMM-based method is statistically superior to chance in 13 patients (i.e., almost twice the number of patients for whom the KL-based method statistically outperforms the chance predictor). For the remaining 4 patients, as explained before, the variational GMM-based method cannot pass the statistical test mainly due to the very short recordings and/or low number of seizures available. One major reason for the superiority of the variational GMM-based method to the KL-based method would be the analysis of all discriminative bins together (i.e., multidimensional data points) instead of processing each bin individually and monitoring average measures of distance. Figure 5.7 (a)–(d) present different measures calculated using the variational 122  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals GMM-based method for channel Fz -Cz of Patient 7 for the interval from ∼50 min before to 12 min after the electrographic seizure onset. As shown, overall, the sim-  ilarity index (ˆ sk ) increases noticeably ∼17 min before the onset. The dissimilarity index (dˆk ) also increases in the average as approaching to the seizure, although it fluctuates considerably. As a result, the combined index shows a significant increase and surpasses threshold ηc (here, 0.3) during the preictal interval, and alarms are generated (ηs = 0.3). Figure 5.7 (e) shows γk for the same interval of the same patient (for Y = 3), revealing that the proposed algorithm is able to predict the  upcoming seizure ∼14 min earlier (ηa = 0.5).  Figure 5.8 presents another example of these measures calculated for an EEG  interval from channel F7 -T3 of Patient 9 (from ∼50 min before to ∼10 min after the electrographic onset), where Y = 3, ηc = 0.45, ηs = 0.3, and ηa = 0.25.  As can be seen, the similarity and dissimilarity indices increase significantly for channel F7 -T3 as approaching to the onset, resulting in the alarm sequence shown in Figure 5.8 (d) for this channel. A prediction alarm is finally generated about ∼3 min before the onset.  Figure 5.9 shows the current observation set (Xk ) with respect to the interictal  (Xint ) and preictal (Xpre ) reference sets for the case presented in Figure 5.8 at 45, 25, 5, and 2 min before the onset. The two most discriminative bins (i.e., bins resulting in the lowest p-values for KS-test) are only shown in this figure. For visualization purpose, each data point has been detrended by removing the mean of {Xint , Xpre } and normalized by the standard deviation of {Xint , Xpre } for each  dimension. As clearly shown in this figure, the set of current observations moves away from the interictal set (i.e., increasing dissimilarity index) and gets closer to the preictal set (i.e., increasing similarity index) as approaching to the seizure onset. The performance of the variational GMM-based method on an interictal interval of Patient 9 is shown in Figure 5.10. As can be seen, the dissimilarity index remains at low values (in comparison to the preictal case shown in Figure 5.8 for the same patient), although it fluctuates a bit which can be due to the high variability in the interictal patterns. The similarity index is also very low during the interictal period. As a result, the combined index remains below the threshold ηc and the channel alarm sequence for F7 -T3 is zero for the whole period. Similar 123  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  1  0.8  0.8  0.6  0.6  dˆk  sˆk  1  0.4  0.4  0.2  0.2  0  −40  −30  −20  −10  0  0  10  −40  −30  Time (min)  (a)  0  10  0.8  0.6  0.6  0  10  γk  0.8  Ck  1  ηc  0.4  0.2 0  −10  (b)  1  0.4  −20  Time (min)  0.2  −40  −30  −20  −10  0  0  10  −40  −30  Time (min)  −20  −10  Time (min)  (c)  (d) 1 0.8  γk  0.6  ηa  0.4 0.2 0  −40  −30  −20  −10  0  10  Time (min)  (e)  Figure 5.7: Different measures calculated using the method based on the variational GMM for an EEG interval from Patient 7 (ηc = 0.3, ηs = 0.3, and ηa = 0.5): (a)–(d) present respectively dˆk , sˆk , Ck , and γk for channel Fz -Cz , and (e) shows γk obtained using the top 3 channel alarms (Y = 3). Time axis is scaled with respect to the electrographic seizure onset.  124  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  1  0.8  0.8  0.6  0.6  dˆk  sˆk  1  0.4  0.4  0.2  0.2  0  −40  −30  −20  −10  0  0  10  −40  −30  Time (min)  −20  (a) 1  0.8  0.8  0  10  γk  Ck  0.4  0.2  0.2  −40  10  0.6  ηc  0.4  0  0  (b)  1  0.6  −10  Time (min)  −30  −20  −10  0  0  10  −40  Time (min)  −30  −20  −10  Time (min)  (c)  (d) 1 0.8  γk  0.6 0.4  ηa  0.2 0  −40  −30  −20  −10  0  10  Time (min)  (e)  Figure 5.8: Different measures calculated using the variational GMM-based method for an EEG interval from Patient 9 (ηc = 0.45, ηs = 0.3, and ηa = 0.25): (a)–(d) present respectively dˆk , sˆk , Ck , and γk for channel F7 -T3 , and (e) shows γk obtained using the top 3 channel alarms (Y = 3). Time axis is scaled with respect to the electrographic seizure onset.  125  Current Observations Interictal Reference Preictal Reference  2  Discriminative Bin No. 2  Discriminative Bin No. 2  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  1  0  −1 −1  0  1  Current Observations Interictal Reference Preictal Reference  2  1  0  −1  2  −1  Discriminative Bin No. 1  0  Current Observations Interictal Reference Preictal Reference  1  0  −1 −1  0  2  (b)  Discriminative Bin No. 2  Discriminative Bin No. 2  (a)  2  1  Discriminative Bin No. 1  1  2  Current Observations Interictal Reference Preictal Reference  2  1  0  −1 −1  Discriminative Bin No. 1  0  1  2  Discriminative Bin No. 1  (c)  (d)  Figure 5.9: Current observation set (Xk ) in comparison to the interictal (Xint ) and preictal (Xpre ) reference sets for channel F7 -T3 of Patient 9 (the case presented in Figure 5.8) at different times with respect to the electrographic seizure onset: (a) -45 min, (b) -25 min, (c) -5 min, and (d) -2 min. Only the two most discriminative bins are shown (i.e. two-dimensional data points).  situation can be seen in other channels as well; therefore, the method does not generate any alarms. Figure 5.11 presents an example of cases that the proposed variational GMMbased method fails to predict the impending seizure. As the figure shows, although sˆk increases significantly during the preictal period, the Ck remains at low values  and does not pass the threshold, since the increase in the similarity index is not accompanied at the same time by a noticeable increase in the dissimilarity index for channel T4 -T6 . Similar behavior can be seen for other channels, and therefore,  the method misses the upcoming seizure.  126  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  1  0.8  0.8  0.6  0.6  sˆk  dˆk  1  0.4  0.4  0.2  0.2  0 0  10  20  30  40  0 0  50  10  20  Time (min)  (a) 1  0.8  0.8  40  50  γk  Ck  50  0.6  ηc  0.4  0.4  0.2  0.2  0 0  40  (b)  1  0.6  30  Time (min)  10  20  30  40  0 0  50  10  20  Time (min)  30  Time (min)  (c)  (d) 1 0.8  γk  0.6 0.4  ηa  0.2 0 0  10  20  30  40  50  Time (min)  (e)  Figure 5.10: Different measures calculated using the variational GMM-based method for an interictal interval from Patient 9 (ηc = 0.45, ηs = 0.3, and ηa = 0.25): (a)–(d) present respectively dˆk , sˆk , Ck , and γk for channel F7 -T3 , and (e) shows γk obtained using the top 3 channel alarms (Y = 3).  127  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  1  0.8  0.8  0.6  0.6  dˆk  sˆk  1  0.4  0.4  0.2  0.2  0  −40  −30  −20  −10  0  0  −40  −30  Time (min)  (a)  0  0.8  0.8  0.6  0.6  −10  0  Ck  γk  1  0.4  ηc  0.2 0  −10  (b)  1  0.4  −20  Time (min)  0.2  −40  −30  −20  −10  0  0  −40  −30  Time (min)  −20  Time (min)  (c)  (d) 1 0.8  γk  0.6  ηa  0.4 0.2 0  −40  −30  −20  −10  0  Time (min)  (e)  Figure 5.11: Different measures calculated using the variational GMM-based method for a missed seizure from Patient 1 (ηc = 0.25, ηs = 0.05, and ηa = 0.5): (a)–(d) present respectively dˆk , sˆk , Ck , and γk for channel T4 T6 , and (e) shows γk obtained using the top 3 channel alarms (Y = 3). Time axis is scaled with respect to the electrographic seizure onset.  128  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals  ηc 100  40 0.1  90  Average Median  0.05 0.01  35  0.2  Prediction Time (min)  Sensitivity (%)  80 0.3  70 60  0.4  50  0.5  40 0.6  30 20  25 20 15 10  0.7  10 0  30  5  0.8 0.9 0  0.2  0.4  0.6  0.8  1  0  1.2  .01.05 0.1  0.2  0.3  0.4  False Prediction Rate (/h)  (a)  0.5  ηc  0.6  0.7  0.8  0.9  (b)  ηs 100  0.15  0.4  40  0.5  0.25 0.35 0.45  35  Prediction Time (min)  80  Sensitivity (%)  0.3  0.2  90  0.1  70 60 0.05 50 40 30  0.03  30 25  Average Median  20 15  20 10  10 0 0  0.01 0.1  0.2  0.3  0.4  5  0.5  .01.03.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5  ηs  False Prediction Rate (/h)  (c)  (d)  ηa 100  40  90  0.2  60  Prediction Time (min)  Sensitivity (%)  80 0.3  70 0.5 0.6  0.4  50 0.7 40  0.8  30 20  Average Median  0.01  0.05  0.1  0.9  35  30  25  20  10 0 0  0.2  0.4  0.6  0.8  15  1  False Prediction Rate (/h)  (e)  .01.05 0.1  0.2  0.3  0.4  0.5  ηa  0.6  0.7  0.8  0.9  (f)  Figure 5.12: Performance of the variational GMM-based prediction method on the test data for different values of the method parameters: (a), (c), and (e) show graphs of sensitivity versus false prediction rate for ηc , ηs , and ηa , respectively; (b), (d), and (f) present the corresponding average (blue ) and median (green ◦) prediction time for ηc , ηs , and ηa .  129  Chapter 5. Epileptic Seizure Prediction: Analysis of EEG Zero-Crossing Intervals To investigate the effect of changes in parameters ηc , ηs , and ηa on the performance of the proposed variational GMM-based method, the method was applied to the test dataset with different values of parameters. When changing one parameter, the others were kept unchanged (as set through the training step). Figure 5.12 presents graphs of sensitivity versus false prediction rate as well as the prediction time for different values of these parameters.  5.7 Summary and Conclusion In this chapter, prediction of epileptic seizures based on the monitoring of the changes in the EEG positive zero-crossing intervals was elaborated. Two novel techniques were proposed: the method based on the KL divergence and the method based on the variational GMM. The performance of the proposed methods was evaluated using a large scalp EEG dataset from 17 patients and was compared to that of an analytical chance predictor. Overall, the method based on the variational GMM revealed a significantly better performance (91.3% sensitivity, false prediction rate of 0.136/h, and average prediction time of 22.3 min) than the KL-based method (80.43% sensitivity, false prediction rate of 0.250/h, and average prediction time of 25.9 min) for the test data. Also, the variational GMM-based technique showed a statistically significant superiority to chance over the whole population of the patients as well as most individual patients. According to the results presented, the proposed method based on the variational GMM would be an appropriate tool for reliable prediction of epileptic seizures. In Chapter 7, the limitations of this method and the current study are discussed and some future approaches to further assess/improve the method performance are suggested. Also, this method is compared with some previously published epileptic seizure prediction techniques.  130  Chapter 6  Low-Noise Scalp EEG Analysis: A Pilot Study Towards Establishment of Novel EEG Benchmarks EEG has been the most utilized tool in analysis of brain function and diagnosis of various neurological disorders. For example, as thoroughly explained and discussed throughout this thesis, EEG is the major measure used for long-term monitoring of patients with epilepsy as well as detecting and predicting epileptic seizures. EEG is employed for monitoring the anesthesia in the operating room and sedation in the intensive care unit [176, 224]. EEG has also been widely used to study brain activity and neural synchronization [159, 213]. However, scalp EEG is highly susceptible to environment noise, which distorts the signal and buries subtle but informative patterns. In this chapter, a novel study of surface EEG acquired in a unique underground low-noise environment is presented as a step towards the ultimate objective of conducting new EEG research and establishing novel low-noise EEG benchmarks. The EEG is generally described in terms of activity in different frequency bands: the δ-band (0-4 Hz), the θ-band (4-7 Hz), the α-band (8-12 Hz), the β-  131  Chapter 6. Low-Noise Scalp EEG Analysis band (12-30 Hz), and the γ-band (30-100 Hz), which have been widely studied in EEG-related research. As a case in point, in the last decade, intra-operative EEG monitoring has become increasingly used to assess the depth of hypnosis of patients in response to hypnotic agents such as propofol. A particular such monitor is the NeuroSenseTM , based on wavelet analysis primarily in the γ-band (see [224] for details of the algorithm). Although this is still subject to debate, the γ-band has also been associated with the somatosensory cortex [13, 63, 127, 206, 207], with a decrease in γ activity linked to cognitive decline, and an increased θ/γ ratio associated with memory impairment [134]. Since power line interference will result in significant 50 or 60 Hz corruption of the EEG right in the γ-band, any EEG studies including the γ-band must be performed using recordings not contaminated by this Electromagnetic Interference (EMI). As a typical solution for the problem, the EEG is usually preprocessed through a 50 or 60 Hz notch filter. While effective at removing the resulting EMI, such a notch filter is also bound to remove some valuable information about the γband. An alternative approach is to record EEG in the electromagnetically shielded environments which not only can prevent power line interference but also reduces the effects from other external electromagnetic sources such as mobile phones, nowadays widely used by people. Investigating the mobile phone effects on EEG and brain activities has been the objective of several studies in the last decade [27– 29, 64, 74, 118, 212]. Some studies have shown that EMI from mobile phones can affect human α rhythms [27–29, 74, 212]. Previous research has also suggested that exposure to mobile phones can influence EEG in other frequency bands including δ, β and γ [27, 212]. Moreover, it has been reported that extremely low frequency (<300 Hz) magnetic fields may have effects upon human cognitive and perceptual tasks and alter EEG in different frequency bands, such as β [26]. To avoid EMI and record clean EEG signals, a number of studies have used conventional Faraday cages/rooms [110, 129, 216], which need to be precisely designed and calibrated. In a recent study [216], the 50 Hz power line interference was seen in EEGs recorded inside a Faraday cage with electrode cap in water, even when all electrical equipment and power sources were inactivated. Although this contamination was reported to originate from the amplifiers or the hospital environment, it could also be due to the improper calibration of the Faraday cage. 132  Chapter 6. Low-Noise Scalp EEG Analysis This pilot study investigates the potential of an ultra-shielded capsule located at the low-noise underground laboratory (LSBB1 ), Rustrel, France [47, 214], for acquiring clean EEG signals that can be used in novel studies of brain activity, including establishing novel low-noise EEG benchmarks. Some quantitative assessments of EEG recordings, acquired in the LSBB shielded capsule using a laptop computer and the NeuroSenseTM patient module, are presented in this chapter. The main objectives in this study are: 1) to establish whether by acquiring EEG recordings in the LSBB capsule one can do away with notch filters, 2) to assess the interference from the laptop and the patient module, and 3) to evaluate the effect of the capsule on recognition of the backward counting task, as a mental activity, using EEG. The details of EEG analysis based on the power spectrum as well as the S transform are discussed and the results are presented. The work presented in this chapter has been published in IEEE Transactions on Biomedical Engineering [186] and the Proceedings of the 3rd International Conference of inter-Disciplinary Underground Science and Technology (i-DUST) [184].  6.1 EEG Data A NeuroSenseTM patient module PM-701 connected to a laptop running on battery power was used to acquire the scalp EEG of 3 volunteers sitting in a reclined position. The PM-701 is a two-channel (4 electrodes) EEG recording system for bilateral monitoring, has a bandwidth of 0.125-300 Hz with the noise less than 2µVpp from 0.125 to 100 Hz, and provides a raw EEG sampled at 900 Hz. During the data acquisition, the wavelet-based ocular artifact removal filter of the PM-701 [223] was always on, while all other filters on the module were turned off, and the 900 Hz sampled raw EEG data were recorded using the NeuroSense NS-701 software running under Windows Vista on the laptop connected to the PM-701 via a USB cable DC-701. The PM-701 was powered by the laptop via the USB cable and no external power source was required by the system. The resulting data were then analyzed using MATLAB. The EasyPrepTM EK-701 electrodes were used to acquire bilateral EEG as depicted in Figure 6.1. For comparison purposes, the EEG signals were first recorded in a hospital en1  Laboratoire Souterrain a` Bas Bruit de Rustrel, http://lsbb.oca.eu/  133  Chapter 6. Low-Noise Scalp EEG Analysis  Figure 6.1: The montage used to acquire the EEG signals. The electrode “R” is used as reference while the electrode “G” is the ground.  vironment, namely the orthodontal surgery suite at the Car´emeau University Hospital in Nˆımes, France. During the data acquisition, each subject was asked to relax or count backward by seven, while the room lights were on or off. That is, each recording in the hospital consisted of four situations. For each subject, two recordings were acquired with the average length of 7.5 (±0.97) min. In the next step, the EEG was acquired on the same three subjects in the 1268 m3 shielded capsule at the LSBB. Three setups were studied: 1. Subject, PM-701 and laptop in capsule. 2. Subject and PM-701 in capsule, laptop outside. 3. Subject in capsule, PM-701 and laptop outside. In each setup, two recordings were acquired for each subject, i.e. a total of six recordings per subject in the capsule. For each recording, the subjects were asked to relax or count backward by seven under three different conditions: 24 V lights on, 24 V lights off, and total power blackout, i.e. neither power nor ventilation in that section of the tunnel. In other words, each recording in the capsule included six situations. The average length of each recording was 14.2 (±1.07) min.  6.2 Data Analysis and Results To analyze the effects of the shielded capsule, EEG recordings of 3 subjects in the two environments (i.e., hospital and capsule) were studied. Figure 6.2 (a) presents a three-second raw EEG segment of the right channel recorded in the hospital from 134  Chapter 6. Low-Noise Scalp EEG Analysis  Subject 1, Hospital, Right Channel Lights on, Relaxed Raw Notch Filtered  80  80  60  60  40  40  Raw EEG (µV)  EEG (µV)  Subject 1, Capsule, Right Channel Lights on, Relaxed  20 0  20 0  −20  −20  −40  −40  −60 0  1  2  −60 0  3  Time (sec.)  1  2  3  Time (sec.)  (a)  (b)  Figure 6.2: EEG segments of 3 s of the right channel from Subject 1, while relaxed with lights on: (a) Hospital; (b) Capsule.  Subject 1, overlayed by the notch-filtered EEG, when the subject is relaxed and lights are on. Figure 6.2 (b) shows another three-second EEG interval from the right channel of the same subject, while the subject is relaxed in the capsule with light-on condition. As can be seen, whereas the raw EEG recorded in the hospital is highly corrupted by the 50 Hz noise, the power line interference is not seen in the EEG recorded in the capsule.  6.2.1 Power Spectral Analysis Study of the power spectra of the EEG recordings from both environments clearly shows the advantage of the LSBB shielded capsule in acquiring clean EEG signals. Figure 6.3 displays Power Spectral Densities (PSDs) of the left channel EEG from Subject 2 for the no-light/relaxed situation: i) acquired in the surgical suite at the hospital with and without notch filter and ii) acquired in the capsule. In the hospital, the presence of the 50 Hz power line interference and its harmonics at 100 and 150 Hz are striking. Clearly, for assessment of the γ-band activity, notch filtering is required. However, as the results of notch filtering show, the filtered signal is distorted with loss of information. On the other hand, the EEG acquired in the capsule clearly shows that there is no interference. Upon investigation of the interference from the laptop and NeuroSense patient  135  Chapter 6. Low-Noise Scalp EEG Analysis Subject 2, Left Channel Lights off, Relaxed 10  Power Spectral Density (dB)  5 0 −5 −10 −15 −20 −25  Hospital (WITH notch filter) Hospital (WITHOUT notch filter) Capsule  −30 −35 0  10  20  30  40  50  60  70 80 90 Frequency (Hz)  100  110  120  130  140  150  160  Figure 6.3: The power spectra of the the left channel EEG for Subject 2, nolight/relaxed: i) in the hospital with and without notch filtering and ii) in the capsule.  module, the spectral densities from the three aforementioned setups for acquiring EEG in the capsule (i.e. module and laptop in capsule, laptop outside, and laptop and module outside) were statistically compared. For this purpose, a geodesic distance recently proposed by Georgiou [50–52] was employed. Given two PSD functions P1 (ζ) and P2 (ζ) (ζ ∈ [−π, π]), the geodesic distance between the two  power spectra, dg (P1 , P2 ), is defined as π  dg (P1 , P2 ) =  log −π  P1 (ζ) P2 (ζ)  2  dζ − 2π  π  log −π  P1 (ζ) dζ P2 (ζ) 2π  2  .  (6.1)  dg (·, ·) provides a pseudo-metric on the cone of PSD functions [51] Ω = {P : P (ζ) ≥ 0 for ζ ∈ [−π, π], P ∈ L1 [−π, π]} ,  (6.2)  where L1 refers to Lebesgue space of integrable functions. The reason that dg (·, ·)  is considered as a pseudo-metric is because it is insensitive to scaling, i.e. dg (P1 , P2 ) = dg (P1 , λP2 ) for any λ > 0 [51].  136  Chapter 6. Low-Noise Scalp EEG Analysis Analyzing the EEG acquired using different setups, each EEG recording was segmented into non-overlapping epochs with the length of 2-3 min depending on the length of the recording, and the power spectrum corresponding to each epoch was obtained. Then, the distance between the PSDs of each two epochs was calculated using Equation 6.1. Considering the kth recording with total of nk epochs, this resulted in a set of nk × (nk − 1)/2 numbers, showing the PSD intra-recording  distance values for that recording. Choosing relatively long epochs reduces the chance of undesirable large distances which result from the difference between local EEG events and are not due to the effects of the laptop or patient module. If exists, the influence of the laptop and/or patient monitor appears globally in the EEG, and therefore it would be seen in long periods of EEG. To compare the PSDs of setups i and j, two sets of distances were considered: inter- and intra-setup distance sets. The intra-setup distance set, also considered as the reference set, was defined as the union of the intra-recording distance sets corresponding to the EEG recordings of the two setups. On the other hand, the inter-setup distance set was obtained by computing the distances between the PSD of each EEG epoch from setup i and the PSDs of all epochs of setup j, i.e. Ni × Nj  values where Ni and Nj indicate the total number of epochs in setups i and j respectively. Finally, the inter- and intra-setup distance sets were statistically compared using a one-sided t-test with the significance level of 5% and the alternative hypothesis that the mean of geodesic distance between two setups (inter-setup distance) is greater than the mean of the reference set (intra-setup distance). That is, the alternative hypothesis represents the case that the power spectra of the two setups are significantly different, since their average distance is greater than the average PSD distance within the recordings of each setup. The statistical test was done for each subject separately. In addition, considering all subjects together, the test was performed using the overall inter-setup (B i,j )  137  Chapter 6. Low-Noise Scalp EEG Analysis Table 6.1: Results of the one-sided t-test (p-values), comparing the PSDs of different setups for the three subjects. Subject 1 2 3 All  Channel Right Left Right Left Right Left Right Left  Setups Compared 1-3 2-3  1-2  0.2301 0.5047 0.3854 0.8148 0.2423 0.6021 0.4066 0.4701  0.8413 0.3671 0.1553 0.1071 0.1226 0.1084 0.3902 0.3482  0.5941 0.8383 0.7449 0.1293 0.1035 0.3645 0.6640 0.6496  Setup 1: subject, PM-701 and laptop in capsule; Setup 2: subject and PM-701 in capsule, laptop outside; Setup 3: subject in capsule, PM-701 and laptop outside.  and intra-setup (W i,j ) distance sets defined for setups i and j as 3 l Bi,j  B i,j = l=1 3  l Wi,j ,  W i,j =  (6.3)  l=1 l and W l were the inter- and intra-setup distance sets for the lth subject. where Bi,j i,j  Table 6.1 reports the p-values of the t-test, when comparing different setups. According to the results, the null hypothesis cannot be rejected in any cases (i.e., p > 0.05 for all cases), showing that there is no statistical evidence that PSDs of the three setups are significantly different. This indicates that neither the laptop nor the patient module PM-701 interfered with the acquired EEG data.  6.2.2 Time-Frequency Analysis In order to evaluate the influence of the shielded capsule on the recognition of mental tasks (here, backward counting) using EEG as a non-stationary signal, the S transform [200], also known as the Stockwell transform, was employed to quan-  138  Chapter 6. Low-Noise Scalp EEG Analysis tify the frequency content of EEG signals versus time (i.e., EEG time-frequency representation). To reduce the computational burden, the EEG recordings were down-sampled to 256 Hz, while processed by the S transform. The S transform is an extension of the short-time Fourier transform in which a Gaussian window is used and is a variant of the Continuous Wavelet Transform (CWT) given by ∞  W (τ, a) =  t−τ 1 ϕ∗ a |a|  x(t) −∞  dt .  (6.4)  In Equation 6.4 the transform can be viewed as a correlation between the function x(t) and a reference or mother wavelet ϕ(t), which is scaled or dilated by the factor a and is translated by the factor τ . The S transform uses a particular complex mother wavelet – hence the conjugate. Following Gibson et al. [55], for completeness, the relation of the S transform to the common CWT will be elucidated below. The S transform defined in [200], is given by ∞  S(τ, f ) = −∞  x(t)|f |  e−  (t−τ )2 f 2 2  √  2π  e−2πif t dt,  (6.5)  where τ corresponds to time t, and f corresponds to the frequency. If we factor out e−2πif τ , let a = 1/f , and factor out the term  S(τ, f ) =  1 −2πi τ a e |a|  ∞  x(t) −∞  |f |, we obtain   −  (t−τ )2 2a2  1 e e  √ |a| 2π  (t−τ ) −2πi a  where the term in the square brackets is of the form √1 ϕ∗ |a|  t−τ a      dt,  (6.6)  when ϕ is chosen  to be the complex Morlet wavelet given by 1 2 1 ϕ(t) = √ e− 2 t e2πit . 2π  (6.7)  Thus, the S transform is a CWT defined as 1 S(τ, ) = a  1 −2πi τ a W (τ, a). e |a| 139  (6.8)  Chapter 6. Low-Noise Scalp EEG Analysis This can be interpreted as the cross-correlation of the function x(t) with the complex Morlet wavelet multiplied by an amplitude correction and a dilated complex sinusoidal modulation, with τ /a corresponding to tf , when using the foregoing correspondence of τ with time and 1/a with frequency. Thus, the S transform is a particular type of a CWT, with the complex Morlet wavelet used as the mother wavelet multiplied by a frequency dependent amplitude correction and the Fourier kernel in scale space. The advantage of adding this multiplicative factor to the wavelet transform is that meaning is given to the absolute phase of the transform as pointed out by Stockwell et al. [200]. To study the influence of the LSBB capsule on identifying the mental activities using the S transform, only EEG acquired under the light-off or blackout condition was included to minimize the visual stimulus effects [153, 204, 205]. To reduce the influence of some factors including skin conductivity and the placement and impedance of electrodes on the EEG amplitude and to make different EEG segments/epochs comparable, before applying the S transform, each segment/epoch x(t) was first detrended by removing its mean (x) and normalized by its root mean square (xrms ) as [224] x(t) =  x(t) − x . xrms  (6.9)  Figure 6.4 and Figure 6.5 present the S transform magnitude in the γ-band (30100 Hz) for thirty-second EEG segments from Subject 1 (right channel), acquired in the hospital and capsule under different conditions. In each panel, the magnitude values have been normalized with respect to the maximum value in the frequency range of 0-100 Hz. Figure 6.4 (a) and (c) clearly show the 50 Hz power line interference and its harmonic at 100 Hz for the no-light/relaxed and no-light/counting situations in the hospital respectively, when notch filters are off. The normalized magnitude of the S transform for the same EEG segments while preprocessed by notch filters are also shown in Figure 6.4 (b) and (d), respectively. As can be seen, notch filtering results in significant distortion of the signal. This effect can be better studied by comparing no-light/relaxed and no-light/counting situations in the hospital with similar cases in the capsule, presented in Figure 6.5. While the timefrequency representation of the notch-filtered EEG segments in the hospital shows loss of information around 50 and 100 Hz, noticeable activities are seen in the 140  Chapter 6. Low-Noise Scalp EEG Analysis  Subject 1, Hospital, Right Channel Lights off, Relaxed, WITHOUT notch filter  Subject 1, Hospital, Right Channel Lights off, Relaxed, WITH notch filter  100  1  100  90  1  90 0.8  0.8 80  0.6  70 60  0.4  Frequency (Hz)  Frequency (Hz)  80  50  0.6  70 60  0.4  50 0.2  0.2  40 30 0  40  5  10  15 20 Time (sec.)  25  30  30 0  0  5  10  (a)  15 20 Time (sec.)  25  30  (b)  Subject 1, Hospital, Right Channel Lights off, Counting, WITHOUT notch filter  Subject 1, Hospital, Right Channel Lights off, Counting, WITH notch filter  100  1  100  90  1  90 0.8  0.8 80  0.6  70 60  0.4  Frequency (Hz)  Frequency (Hz)  80  50  0.6  70 60  0.4  50 0.2  0.2  40 30 0  0  40  5  10  15 20 Time (sec.)  25  30  30 0  0  (c)  5  10  15 20 Time (sec.)  25  30  0  (d)  Figure 6.4: The normalized magnitude of the S transform in the γ-band (30-100 Hz) for 30-second EEG segments from the right channel of Subject 1, acquired in the hospital under no-light condition: (a) Relaxed without notch filter; (b) Relaxed with notch filter; (c) Counting without notch filter; (d) Counting with notch filter. In each panel, the corresponding S transform magnitude has been normalized with respect to the maximum over 0-100 Hz.  same regions for the raw signals acquired in the capsule. Moreover, comparing the S transform of the relaxed and counting situations in the capsule under no-light (see Figure 6.5 (a) and (c)) and blackout (see Figure 6.5 (b) and (d)) conditions reveals that the overall energy of the signal in the γ-band is higher for the counting task. That is, the mental task may induce γ-band activities, which is in agreement with some recent studies [41, 218]. On the other hand, the difference between relaxed and counting conditions is not noticeable in the hospital. To better investigate the effect of the LSBB capsule on identification of the mental tasks, this study mainly 141  Chapter 6. Low-Noise Scalp EEG Analysis  Subject 1, Capsule, Right Channel Lights off, Relaxed  Subject 1, Capsule, Right Channel Blackout, Relaxed  100  1  100  90  1  90 0.8  0.8 80  0.6  70 60  0.4  Frequency (Hz)  Frequency (Hz)  80  50  0.6  70 60  0.4  50 0.2  0.2  40 30 0  40  5  10  15 20 Time (sec.)  25  30  30 0  0  5  10  (a)  15 20 Time (sec.)  25  30  (b)  Subject 1, Capsule, Right Channel Lights off, Counting  Subject 1, Capsule, Right Channel Blackout, Counting  100  1  100  90  1  90 0.8  0.8 80  0.6  70 60  0.4  Frequency (Hz)  Frequency (Hz)  80  50  0.6  70 60  0.4  50 0.2  0.2  40 30 0  0  40  5  10  15 20 Time (sec.)  25  30  30 0  0  (c)  5  10  15 20 Time (sec.)  25  30  0  (d)  Figure 6.5: The normalized magnitude of the S transform in the γ-band (30-100 Hz) for 30-second EEG segments from the right channel of Subject 1, acquired in the capsule under different situations: (a) Lights off, relaxed; (b) Blackout, relaxed; (c) Lights off, counting; (d) Blackout, counting. In each panel, the corresponding S transform magnitude has been normalized with respect to the maximum over 0-100 Hz.  focuses on the analysis of the β-band, known to be associated with active thinking and attention, solving problems and mathematical tasks [92, 166]. Figure 6.6 shows the normalized magnitude of the S transform in the frequency range of 0-30 Hz for the same EEG segments as in Figure 6.4 and Figure 6.5. As the results show, there is no noticeable difference between the relaxed and counting states in the hospital in the β-band (12-30 Hz). In the capsule, however, a significant energy increase can be seen in this frequency range for both the no-light and blackout situations as the mental activity occurs. 142  Frequency (Hz)  143  0  5  10  15  20  25  30  0  5  10  15  20  25  10  (a)  15 20 Time (sec.)  25  5  10  (d)  15 20 Time (sec.)  25  Subject 1, Hospital, Right Channel Lights off, Counting  5  30  30  0  0.2  0.4  0.6  0.8  1  0  0.2  0.4  0.6  0.8  1  Frequency (Hz) Frequency (Hz) 0  5  10  15  20  25  30  0  5  10  15  20  25  30  10  (b)  15 20 Time (sec.)  25  5  10  (e)  15 20 Time (sec.)  25  Subject 1, Capsule, Right Channel Lights off, Counting  5  Subject 1, Capsule, Right Channel Lights off, Relaxed  30  30  0  0.2  0.4  0.6  0.8  1  0  0.2  0.4  0.6  0.8  1  0  5  10  15  20  25  30  0  5  10  15  20  25  30  10  (c)  15 20 Time (sec.)  25  5  10  (f)  15 20 Time (sec.)  25  Subject 1, Capsule, Right Channel Blackout, Counting  5  Subject 1, Capsule, Right Channel Blackout, Relaxed  30  30  0  0.2  0.4  0.6  0.8  1  0  0.2  0.4  0.6  0.8  1  right channel of Subject 1, acquired in different situations: (a) Hospital, lights off, relaxed; (b) Capsule, lights off, relaxed; (c) Capsule, blackout, relaxed; (d) Hospital, lights off, counting; (e) Capsule, lights off, counting; (f) Capsule, blackout, counting. In each panel, the corresponding S transform magnitude has been normalized with respect to the maximum over 0-100 Hz.  Figure 6.6: The normalized magnitude of the S transform in frequency range of 0-30 Hz for 30-second EEG segments from the  Frequency (Hz)  Subject 1, Hospital, Right Channel Lights off, Relaxed  Frequency (Hz) Frequency (Hz)  30  Chapter 6. Low-Noise Scalp EEG Analysis  Chapter 6. Low-Noise Scalp EEG Analysis To quantitatively evaluate the effect of the capsule on recognizing mental tasks based on EEG, the β-band energy of the counting state was analyzed in two ways. In the first approach, the ratio of the β-band energy in the counting state to that in the relaxed state, termed as counting-relaxed β-band energy ratio, was calculated and compared between the two environments (capsule and hospital). In the second approach, the ratio of the β-band energy to that of 0-12 Hz (in the counting state), termed as the relative β-band energy, was compared between the capsule and hospital. For these analyses, each EEG recording was segmented into 5-second epochs with 50% overlap, and each epoch was detrended and scaled using Equation 6.9. The energy of a desired frequency band, F, for the mth epoch (with the time range  of Tm ) was then computed as  EF (m) =  F  Tm  |Sm (τ, f )|2 dτ df,  (6.10)  where |Sm (·, ·)| denotes the magnitude of the S transform for the mth epoch, normalized to the maximum magnitude over the interval to which that epoch belongs in order to make the energy values comparable among different recordings/intervals. As a case in point, if EF (m) is calculated for epochs belonging to the no-light counting interval, the normalization is done with respect to the maximum S transform magnitude over all epochs of this interval. In the first analysis approach, the counting-relaxed β-band energy ratio was computed for each environment as follows. For each recording, the average of β-band energy over all epochs of the relaxed state, termed ER , under a specific  condition (i.e. no-light or blackout) was first calculated. Then, for the mth epoch  of the counting interval of that recording (under the same condition), the β-band energy ratio was defined as ψm =  Eβ (m) , ER  (6.11)  where Eβ (m) refers to the β-band energy of the mth epoch, computed using Equation 6.10. The counting-relaxed β-band energy ratio for that recording is then determined by Ψ=  1 M  M  ψm , m=1  144  (6.12)  Chapter 6. Low-Noise Scalp EEG Analysis  Subject 2 β−Band Energy Ratio: Counting / Relaxed  β−Band Energy Ratio: Counting / Relaxed  Subject 1 Hospital, no−light Capsule, no−light Capsule, blackout  2.5  2  1.5  1  0.5  0  Right  2  Hospital, no−light Capsule, no−light Capsule, blackout  1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0  Left  Right  Left  Channel  Channel  (a)  (b)  β−Band Energy Ratio: Counting / Relaxed  Subject 3 Hospital, no−light Capsule, no−light Capsule, blackout  3.5 3 2.5 2 1.5 1 0.5 0  Right  Left Channel  (c)  Figure 6.7: The average of Ψ, the counting-relaxed β-band energy ratio, in both environments: (a) Subject 1; (b) Subject 2; (c) Subject 3.  where M is the total number of epochs in the counting interval. Figure 6.7 presents the counting-relaxed β-band energy ratio for the three subjects in both environments under no-light (hospital and capsule) and blackout (capsule) conditions. For each environment, the average of Ψ over the recordings in that environment is shown for each channel. Overall, the average energy ratio in the capsule is greater than that of the hospital for all subjects. To statistically assess this difference for each channel, the set of Ψ values from different recordings of all subjects under no-light or blackout condition in the capsule was compared to the set of values similarly obtained from different recordings of all subjects under the no-light condition in the hospital. This comparison was performed through a one-sided t-test with the significance level of 5% and the alternative hypothesis that the mean of Ψ 145  Chapter 6. Low-Noise Scalp EEG Analysis Table 6.2: Results of the one-sided t-test (p-values), comparing the mean of Ψ (recording counting-relaxed β-band energy ratio) in the two environments with the alternative hypothesis that the mean of Ψ in the capsule is greater than the mean of Ψ in the hospital.  Channel  Hospital (no-light) vs. Capsule (no-light)  Hospital (no-light) vs. Capsule (blackout)  Right Left  0.011 0.023  0.005 0.002  in the capsule is greater than the mean of Ψ in the hospital for a particular channel. The results of the test (p-values) are shown in Table 6.2 for different conditions and channels. According to the results, the mean of Ψ is significantly greater in the capsule in all cases (p < 0.05). In the second analysis approach, the ratio of the β-band energy to the energy of 0-12 Hz in the counting state (relative β-band energy) was studied in both environments. Let EL (m) be the energy of 0-12 Hz for the mth epoch in the counting interval under a particular condition (no-light or blackout). Then, the relative βband energy for the mth epoch was defined as φm =  Eβ (m) . EL (m)  (6.13)  For each recording, the relative β-band energy was computed as Φ=  1 M  M  φm ,  (6.14)  m=1  where M is the total number of epochs in the counting interval of the recording. Figure 6.8 shows the average of relative β-band energy (Φ) over different recordings of each subject under the no-light (hospital and capsule) and blackout (capsule) conditions. As the graphs reveal, the average relative energy for the β-band is higher in the capsule. Similar to the first approach, this difference between the two environments was also statistically evaluated. For this purpose, a one-sided t-test with the significance level of 5% was used to test the null hypothesis that means  146  Chapter 6. Low-Noise Scalp EEG Analysis  Subject 1  Subject 2  1.8  Relative β−Band Energy  1.6 Relative β−Band Energy  2.5  Hospital, no−light Capsule, no−light Capsule, blackout  1.4 1.2 1 0.8 0.6 0.4  Hospital, no−light Capsule, no−light Capsule, blackout  2  1.5  1  0.5  0.2 0  Right  0  Left  Right  Left  Channel  Channel  (a)  (b) Subject 3 Hospital, no−light Capsule, no−light Capsule, blackout  Relative β−Band Energy  1.2 1 0.8 0.6 0.4 0.2 0  Right  Left Channel  (c)  Figure 6.8: The average of Φ, the ratio of the β-band energy to the energy of 0-12 Hz in the counting state (relative β-band energy), in both environments: (a) Subject 1; (b) Subject 2; (c) Subject 3.  of Φ in the both environment are equal against the alternative that the mean of Φ in the capsule is greater. The set of Φ values obtained from different recordings of all subjects under the no-light condition in the hospital was compared to the set of values similarly extracted from different recordings of all subjects under no-light or blackout condition in the capsule. Table 6.3 shows the p-values of the test for different conditions and channels. As results reveal, although the average of Φ is greater in the capsule for all subjects (Figure 6.8), this superiority is not statistically significant (the null hypothesis is rejected in some cases, i.e. p > 0.05). One possible explanation for this issue would be the increase of θ-band energy during the mental task (back147  Chapter 6. Low-Noise Scalp EEG Analysis Table 6.3: Results of the one-sided t-test (p-values), comparing the mean of Φ (recording relative β-band energy) in the two environments with the alternative hypothesis that the mean of Φ in the capsule is greater than the mean of Φ in the hospital.  Channel  Hospital (no-light) vs. Capsule (no-light)  Hospital (no-light) vs. Capsule (blackout)  Right Left  0.322 0.042  0.195 0.017  ward counting) [133, 165, 167]. Indeed, since the counting task as an arithmetic mental activity can enhance the energy of θ-band in addition to the β-band, the relative β-band energy may not be an appropriate measure to compare between the two environments. The other possible reason that the relative β-band energy is not significantly different (in some cases) between the hospital and capsule can be sweating artifacts. It is worth noting that subjects sweated profusively during the experiment due to the temperature in the capsule. This induced low-frequency artifacts on the EEG signals which can affect the relative β-band energy measure. To investigate the influence of the capsule on the γ-band, a similar analysis was performed to compare the counting-relaxed γ-band energy ratio between the two environments. For this purpose, the counting-relaxed γ-band energy ratio for each recording was computed as for the counting-relaxed β-band energy ratio. Let Υ represent the counting-relaxed γ-band energy ratio for a specific recording (i.e., similar to Ψ that is defined by Equation 6.12). Figure 6.9 presents the average of Υ over different recordings of each subject in both environments under no-light (hospital and capsule) and blackout (capsule) conditions. For each environment, this average is shown for right and left channels. In addition, Table 6.4 shows the results of statistical comparison between the two environments through applying a one-sided t-test with significance level of 5% and the alternative hypothesis that the mean of Υ in the capsule is greater than the mean of Υ in the hospital for a particular channel. According to these results, although the average of the counting-relaxed γ-band energy ratio in some cases is noticeably higher in the capsule than the hospital,  148  Chapter 6. Low-Noise Scalp EEG Analysis  Subject 1  Subject 2 Hospital, no−light Capsule, no−light Capsule, blackout  2  γ−Band Energy Ratio: Counting / Relaxed  γ−Band Energy Ratio: Counting / Relaxed  2.5  1.5  1  0.5  0  Right  Hospital, no−light Capsule, no−light Capsule, blackout  1.5  1  0.5  0  Left  Right  Left  Channel  Channel  (a)  (b)  γ−Band Energy Ratio: Counting / Relaxed  Subject 3 Hospital, no−light Capsule, no−light Capsule, blackout  5  4  3  2  1  0  Right  Left Channel  (c)  Figure 6.9: The average of Υ, the counting-relaxed γ-band energy ratio, in both environments: (a) Subject 1; (b) Subject 2; (c) Subject 3.  this superiority is not statistically significant (for all cases except one, p > 0.05). Explaining this issue, it is worth noting that the backward counting as a mental activity may influence the γ-band as previously reported [41, 218]; however, as a mathematical task, it mostly affects the β-band energy [92, 166], and that is the rationale behind focusing on β-band in this pilot study. To accurately investigate the influence of the capsule on the γ-band, appropriate experiments affecting γband activities, such as experiments including visual/audio stimuli and/or cognitive tasks [159], need to be set up in the future.  149  Chapter 6. Low-Noise Scalp EEG Analysis Table 6.4: Results of the one-sided t-test (p-values), comparing the mean of Υ (recording counting-relaxed γ-band energy ratio) in the two environments with the alternative hypothesis that the mean of Υ in the capsule is greater than the mean of Υ in the hospital.  Channel  Hospital (no-light) vs. Capsule (no-light)  Hospital (no-light) vs. Capsule (blackout)  Right Left  0.244 0.088  0.435 0.028  6.3 Summary and Conclusion This chapter presented a pilot study of EEG recorded in a unique low-noise underground laboratory (LSBB) to assess the potential of this environment for acquiring clean EEG signals. The EEG recordings acquired from three volunteers in the LSBB capsule and a hospital environment were analyzed, and corresponding results were compared. The preliminary results confirmed that clean EEG signals can be acquired in the LSBB capsule without the need for notch filtering. In addition, using different setups for acquiring EEG in the capsule, statistical analysis of power spectral densities based on a geodesic distance measure revealed that the laptop computer and patient module did not introduce any noise on recorded signals. Moreover, this novel study showed that the backward counting task as a mental activity can be better detected using the EEG acquired in the capsule due to the higher level of β-band activities. The counting-relaxed β-band energy ratio was calculated using the S transform and compared between the hospital and capsule, revealing significantly higher values in the capsule (p < 0.05). Exploring the relative β-band energy (ratio of β-band energy to that of 0-12 Hz in counting state) revealed that the average of this measure was also higher in the capsule for all subjects. Since the counting task mainly affects the EEG β-band, the influence of the capsule on the γ-band activities could not be properly assessed in this study. Further studies need to be designed for this purpose. Overall, these results demonstrate the potential of the LSBB capsule for novel 150  Chapter 6. Low-Noise Scalp EEG Analysis EEG studies, including establishing novel low-noise EEG benchmarks that would be helpful in better investigation of brain function and mechanisms deriving various brain disorders such as epilepsy. In particular, LSBB EEG leads to the possibility of discovering new signals, previously suppressed/buried by EMI in conventional EEG. In the next chapter, the limitations of this study are discussed, and some future plans to better assess the LSBB capsule capabilities are proposed.  151  Chapter 7  Conclusion and Future Work This thesis introduced novel EEG-based techniques for real-time detection and prediction of epileptic seizures and studied the potential of a unique low-noise environment for acquiring clean scalp EEG which can be used to establish low-noise EEG benchmarks. This can be helpful in better understanding brain function and mechanisms leading to different neurological disorders, such as epilepsy. In this chapter, the thesis contributions are reviewed. The limitations of the research and methods are discussed, and some directions for future work are proposed to address these limitations. Parts of the discussions presented in this chapter have been published in (or submitted to) IEEE Transactions on Biomedical Engineering [182, 186, 188] and Journal of Clinical Neurophysiology [187].  7.1 Epileptic Seizure Detection The novel wavelet-based Combined Seizure Index (CSI) was introduced in this thesis to detect the electrographic onset of epileptic seizures in real-time analysis. This normalized index is calculated for each EEG epoch in every channel and consists of two major components, namely, the base and exponent. The CSI base measures the rhythmicity and relative energy of the EEG epoch in a given channel, and the CSI exponent is a multivariate measure that denoises/cleans the base component by considering the consistency among different channels. Throughout the development of the CSI, two novel tools in analysis of the  152  Chapter 7. Conclusion and Future Work epileptic seizures were also proposed in this thesis: the separation measure and the nonlinear scaling function. The separation measure is a nonlinear tool, based on the distribution of EEG energy logarithm, to quantify the degree of separation between the seizure and non-seizure states in a given frequency band. Based on this measure, the regularity band, which is defined as the frequency band mostly affected in transition form non-seizure to seizure state, is determined and used to calculate the regularity and energy indices as the bases of the CSI. The nonlinear scaling function uses the separation measure, corresponding to a specific frequency sub-band, as a reference value to scale the raw relative energy measure (logarithm of the ratio of the current epoch energy to that of a moving reference) and construct the final energy index. By this novelty, an implicit artifact removal procedure is integrated into the CSI. The CSI is the basis of the novel real-time epileptic seizure detection method proposed in this thesis. This wavelet-based method was evaluated using a test dataset consisting of ∼236 h of scalp EEG recordings from 26 patients suffering  from epilepsy with a total of 79 seizures, resulting in an overall sensitivity of ∼91%  along with a false detection rate of ∼0.33/h and a median detection latency of 7 s  (Figure 4.8). Apart from the selection of the seizure and non-seizure references and fine-tuning the regularity band, the proposed method is fully automated. Although this method has been primarily developed for surface EEG to be more clinically  applicable, its extension to the intracranial recordings is straightforward and can be achieved by some minor changes such as changing the general frequency band and the relevant parameters. Changing the position of the moving reference with respect to the current epoch, one may control the performance of the algorithm as reported in Section 4.3.1. According to the assessment done, the false detections of the proposed method resulted mostly from simultaneous appearance of non-epileptic rhythmic patterns in different channels, burst of spike activities/sharp waves, and EMG artifacts stemming from the contractions of the face, scalp or neck muscles, where the corresponding EEG frequency content overlapped with the frequency range of interest, i.e. the regularity band. In addition, the results show that most of the epileptic seizures missed by this algorithm either occurred as subtle or short rhythmic patterns or were manifested as sustained rhythmic activities confined to only few 153  Chapter 7. Conclusion and Future Work channels. The method proposed in this work is patient-specific and relies on training data (seizure and non-seizure references) to determine required parameters. Comparing to generic seizure detection approaches, this patient-specific method has its own advantages and limitations. Since the method is particularly trained for the patient undergoing the diagnosis/monitoring, it is more flexible than generic methods and can improve seizure detection performance. However, as the algorithm is trained with a sample seizure (reference), it may fail to detect seizures not resembling the training seizure (especially if the frequency content of these seizures is very different). As opposed to some of the previously published patient-specific methods which require intensive training (e.g. [19, 190]) limiting their clinical applicability, the seizure detection method proposed in this thesis relies on a straightforward and computationally efficient training stage. Moreover, the method provided satisfactory results even using a relatively small training dataset (the training data were selected using the first recording and the first seizure). Therefore, from a practical point of view, the proposed method has the potential of being employed in the routine clinical environment. It is also worth noting that although generic seizure detection methods do not need training when applied to a particular patient, they must be developed/trained using a very large dataset including various seizure types and non-seizure patterns to be sufficiently general for clinical applications. Nonetheless, some of the previously published general-purpose methods trained using large datasets may still require tuning for different patients (e.g. [162]). The proposed real-time seizure detection method is a novel extension of the wavelet-based approach which was reported in Section 3.2.2 as a preliminary work that was done throughout this research. The preliminary algorithm is also based on the analysis of the rhythmicity and energy of the EEG epochs by deriving the regularity and energy (amplitude) indices. However, to derive the energy index, it does not utilize the signal history (i.e., moving reference), and the index is calculated by considering a typical seizure amplitude and incorporating a simple scaling function (saturation). Also, in calculating the regularity index, only the central frequency of the dominant sub-band is considered, instead of the whole subband, and the reg154  Chapter 7. Conclusion and Future Work ularity band is determined by visual analysis of the EEG in the seizure intervals without defining a general frequency band. In addition, the preliminary method does not consider the consistency among EEG channels, and to detect seizures, it compares the combined index by a predefined patient-specific threshold, instead of employing more sophisticated change detection methods such as the Cumulative Sum (CUSUM). As reported in Section 3.2.3, the preliminary method resulted in 82.5% sensitivity, the false detection rate of 0.88/h and the median/average detection delay of 10.5 s/14.09 s for a set of scalp recordings from 14 patients. Applying the current method (based on the CSI) to the same dataset revealed 90.47% sensitivity along with the false detection rate of 0.48/h and the median/average latency of 7 s/7.3 s. Comparing these results confirms that the seizure detection performance has been improved significantly by developing the current algorithm. In fact, in the current method, defining the general frequency band and employing the separation measure in order to more accurately determine the regularity band enhance the algorithm accuracy. Also, incorporating a moving reference in the development of the energy index and utilizing the proposed nonlinear scaling procedure improve the sensitivity and specificity of the seizure detection. Moreover, including the exponent part in the CSI decreases the false detection rate by considering the consistency among different channels. Finally, the detection latency is reduced significantly by employing the CUSUM procedure whose parameters are set adaptively based on the history of the CSI. Comparing the proposed method with other published epileptic seizure detection methods tested on scalp recordings verifies its competence. However, this is a superficial comparison due to the different EEG datasets used in these studies. Table 7.1 compares the results of the method introduced in this thesis with those of some other techniques (details of these methods have been reviewed in Section 2.1), confirming that the proposed method presents a highly acceptable performance as it detects seizures with high sensitivity and specificity shortly after the seizure onset, while the computational cost is low enough for the real-time implementation. In this research, the capability of the proposed seizure index, i.e. CSI, in lateralizing the seizure focus in patients with TLE was also assessed due to the im155  Chapter 7. Conclusion and Future Work Table 7.1: Results of some epileptic seizure detection methods based on scalp EEG in comparison to the proposed method.  Method  Sensitivity (%)  False Detection Rate (/h)  Gotman [58] Gabor [45] Shoeb et al. [190] a Saab & Gotman [162] Meier et al. [128] b Kuhlmann et al. [94] Kelly et al. [87] c Proposed Method  73 92.8 94 76 96 81 80 91.14  0.84 1.35 0.25 0.34 0.5 0.60 0.1 0.33  a b c  Detection Delay (sec.) Median Average  — — —  — —  10  —  —  1.6  16.9  — — 8.89  — 7  8  Tested on a short dataset with high seizure occurrence rate. Significant overlap between training and test data. Offline method.  portance of the focus lateralization/localozation in pre-surgical evaluations. The results demonstrated that the average of CSI around the seizure onset on the side of the focus was statistically greater than that of the opposite side (p <0.001). This advantage makes the CSI more appropriate for clinical practice. Although the current work shows the potential of the proposed automated seizure detection technique to be used in routine clinical environments, further studies need to be accomplished to improve the method and address the limitations. The surface EEG recordings used in this work were only collected in the seizure investigation unit at Vancouver General Hospital; therefore, a necessary future step is to evaluate the proposed method using EEG data from several other sources to decrease the chance of biased data. Another limitation of the data used in this research was the limited duration of interictal recordings available for some patients, which could make the false positive rate reported for these cases less reliable. Therefore, future data analysis has to be based on longer interictal EEG recordings to have more accurate assessment of the algorithm specificity. The future datasets should also include recordings from more eTLE patients to better investigate the performance of the method on seizures emanating from regions rather  156  Chapter 7. Conclusion and Future Work than temporal lobes. One future enhancement of the current method would be adding a self-tuning process to make the algorithm capable of determining the regularity band adaptively for each channel based on the previous seizures. Since most of the false detections for the proposed method result from the overlap between the regularity band and the EEG frequency spectrum corresponding to the non-epileptic events, this extension would improve the specificity of the method. Also, using an adaptive regularity band would enhance the performance of the algorithm for patients with multiple seizure types. Another possible approach to decrease the number of false detections would be to learn the morphology of the frequent non-epileptic patterns causing false alarms. As mentioned before, the nonlinear scaling of the raw relative energy with respect to the separation measure (as a reference) behaves as an implicit artifact removal procedure for the proposed method. However, utilizing more specific techniques, e.g. [5, 223], to remove the artifacts and clean EEG would reduce the false alarms and improve the performance of the method. Since the seizure patterns are patient-specific, these artifact removing approaches may also need to be patientspecific. For this purpose, any undesirable frequent patterns could be defined as the artifact. Another future enhancement for the proposed method would be decreasing the detection delay. One may develop a method to specifically learn the EEG patterns that are very close to the electrographic onset and extract a corresponding signature for this part of the EEG signal. A possible approach would be fitting a parametric model, e.g. an AR model, to the patterns of interest using maximum likelihood framework and utilizing the resultant model as the signature of these patterns. Then, the distance of the current EEG epoch to the patterns of interest can be measured based on this signature and used in generating alarms. For example, the decision boundary for the CUSUM procedure could be tuned using this distance. One of the advantages of the proposed wavelet-based seizure index is the ability to lateralize the seizure focus in TLE. One future plan would be to develop some techniques based on the CSI to lateralize and localize the focus in other types of seizures including those from the extratemporal areas. 157  Chapter 7. Conclusion and Future Work  7.2 Epileptic Seizure Prediction Prediction of epileptic seizures based on the analysis of the EEG positive zerocrossing intervals was thoroughly investigated in this thesis. Two novel seizure prediction methods methods were proposed: the method based on the variational Bayesian Gaussian Mixture Model (GMM) and the method based on the Kullback– Leibler divergence (KL). Both methods were evaluated using a test scalp EEG dataset including ∼215 h of multichannel recordings with total of 46 partial seizures  in 17 epileptic patients. In addition, each method was tested against an analytical Poisson-based random (chance) predictor to better assess its performance.  In the prediction method based on the KL divergence, after selecting the histogram bins discriminating between the preictal and interictal references, the distance between the distribution of each individual bin (estimated using the epochs of the last 5-min) and the preictal and interictal reference distributions of the same bin is computed using the KL divergence. Then, for each of the references (preictal and interictal), the distance values are averaged over all selected bins, resulting in average measures of distance to preictal and interictal references. For each channel, the ratio of the average distances are computed and exponentially transformed to form a channel seizure prediction index which is later compared with a predefined threshold (learned using the training set) to generate a channel alarm sequence. This channel-based information is then combined to generate a seizure prediction alarm. This method resulted in 80.43% sensitivity, a false prediction rate of 0.250/h, and an average prediction time of 25.9 min for the test data (Table 5.2). Despite the promising results, the KL-based method performed significantly better than the chance predictor for only 6 patients (out of 17), although it was statistically superior to chance over the whole population of patients. The reason for the insignificant improvement over chance for most of the remaining 11 patients was the relatively high number of false alarms this method generated; also, for some cases the low number of seizures/short recordings caused the method not to pass the statistical test. The novel patient-specific epileptic seizure prediction method based on the variational GMM of the zero-crossing intervals in scalp EEG is the other method proposed in this thesis. The underlying idea is to monitor the changes in the  158  Chapter 7. Conclusion and Future Work EEG dynamics by analyzing the similarity and dissimilarity between the current EEG epochs and appropriate ictal and interictal references. For this purpose, after constructing the histogram of positive zero-crossing intervals for each epoch and choosing specific bins (i.e., discriminative bins), a multidimensional data point is formed. In a sliding-window analysis, the set of data points from the last 5 min (current observations) are compared to preictal and interictal reference sets using novel indices of similarity and dissimilarity based on the variational GMM. This comparison in each channel leads to an alarm sequence, and the channel-based information is finally used to generate an alarm anticipating a forthcoming seizure. When applied to the test surface EEG recordings from 17 patients, the algorithm predicted 42 out of 46 seizures (91.3%) with an average prediction time of 22.3 min and a false prediction rate of 0.136/h (Table 5.3). Tested against the chance predictor, the variational GMM-based method revealed statistically significant superiority for most patients (13 patients) as well as over the whole population of the patients (p <0.0001). As discussed in detail in Section 5.6.2, the reason that the improvement of the method over the random predictor was not statistically significant for 4 patients was the very short recordings/low number of seizures available for those patients. Comparing the results of the two proposed seizure prediction method shows that the method based on the variational GMM is significantly superior to the KLbased method. One major reason for this better performance would be the analysis of all discriminative bins together (i.e., multidimensional data points) instead of processing each bin individually and monitoring average measures of distance. Although the variational GMM-based method proposed in this thesis has been originally developed for scalp EEG in order to be more clinically practical and noninvasive, it can also be applied to the intracranial recordings after some straightforward changes in the algorithm such as modifying the general frequency band and histogram bins. In fact, due to the lower level of noise and artifacts in depth EEG data, one can anticipate a better performance for the proposed method when applied to this type of recordings. One of the causes leading to generation of false alarms for the variational GMM-based method were the artifacts. Although employing the zero-crossing approach makes the method more robust against the amplitude noise and arti159  Chapter 7. Conclusion and Future Work Table 7.2: Results of some epileptic seizure prediction methods in comparison to the proposed method based on the variational GMM. Method  Epilepsy Data  SE (%)  FPR (/h)  APT (min)  Le Van Quyen et al. [103] Iasemidis et al. [76] a Hively and Protopopescu [72] b Chisci et al. [23] Park et al. [149] Variational GMM-Based Method  sEEG iEEG sEEG iEEG iEEG sEEG  96 82.6 87.5 100 97.5 91.30  – 0.17 0.021 0–0.6 0.27 0.136  7 100.3 35 5–92  – 22.3  iEEG: intracranial EEG; sEEG: scalp EEG; SE: Sensitivity; FPR: False Prediction Rate; APT: Average Prediction Time. a FPR not corrected. b No separate test data used for evaluation.  facts [68, 101], this could not be sufficient to completely overcome/remove various artifacts contaminating the scalp EEG. Indeed, some specific types of artifacts such as rhythmic movements of the head, muscle contractions, or electrode failures could affect the zero crossings and consequently depreciate the performance of the method. In addition, since in this study recordings from both awake and asleep states were analyzed, some false alarms could be generated due to the change in the state of vigilance/wakefulness of the patients [171, 173], considering the fact that the method parameters (e.g. thresholds) were kept fixed beyond the training step. In the proposed seizure prediction algorithm, updating the interictal reference during the processing of the recordings had a significant effect in reducing the number of false alarms; however, in order to improve the performance of the method, it needs to be more adaptive. The performance of the variational GMM-based method compares favorably with previously published seizure prediction methods, although it is only a general comparison due to the different epilepsy data (scalp or interictal) and criteria (e.g. different prediction horizon) used for evaluation. Table 7.2 presents the results of some of these algorithms, details of which have been reviewed in Section 2.2, in comparison to the variational GMM-based method. The results presented in this thesis clearly demonstrate the capability of the 160  Chapter 7. Conclusion and Future Work proposed patient-specific method based on the variational GMM to be used as a practical seizure prediction system. More studies need to be performed to address the limitations of the current work and to further improve the method. One limitation of this study was that the recordings acquired from some patients were too short (i.e., only a few hours) and discontinuous. Also, the number of seizures available for some patients was low. Therefore, one future step is to apply the method to long-term continuous recordings from more patients with multiple seizures. For this purpose, the method needs to be tested on more scalp EEG data including some public epilepsy data, such as the European database1 [174] which recently has become available or the international epilepsy database [114] which could be available in the near future. Another limitation of the current work was that the method was only tested on the data acquired from patients during the hospitalization period. Indeed, to verify its reliability, a seizure prediction method has to be applied to the data collected during the routine daily activities when the patients are on medication. Hence, another future plan of this research would be to apply the seizure prediction algorithm on continuous ambulatory data acquired from outpatients 24 hours a day. As mentioned above, some of the false alarms generated by the proposed variational GMM-based method resulted from artifacts. In the future, the method performance can be improved by integrating some artifact removal procedures into the system such as methods based on the independent component analysis and wavelet transform [5]. Also, the artifact removing process could include learning the common types of artifacts for each EEG channel/patient. In addition, it would be helpful to take into account some procedures to make the method more adaptive, e.g. learning new preictal patterns from recent seizures. Adjusting the system thresholds according to the state of vigilance can be also considered in future work.  7.3 Low-Noise EEG Study Part of the research conducted for this thesis was to investigate the effects of an ultra-shielded capsule located at a unique low-noise underground laboratory 1  www.epilepsy-database.eu  161  Chapter 7. Conclusion and Future Work (LSBB), Rustrel, France, when used as an environment for recording scalp EEG signals. The preliminary findings of this novel study confirmed the hypothesis that EEG signals acquired in the capsule do not require notch filtering. While the 50 Hz power line interference and its harmonics were clearly seen in EEGs recorded in the hospital, the analysis of the signals in time and frequency domains did not show this type of electromagnetic interference (EMI) in the capsule. Comparison of the notch-filtered EEG in the hospital with the raw EEG recorded in the capsule also verified the significant loss of information in the γ-band due to the notch filtering. In addition, the statistical analysis of the power spectra of the EEG acquired using different setups in the capsule showed that neither the patient module nor the laptop introduced any noise on the acquired EEG signals. Comparing the interand intra-setup Power Spectral Density (PSD) geodesic distances using a one-sided t-test did not present any statistical evidence that the PSDs of the three setups were significantly different (i.e., p > 0.05 for all cases). Comparison of EEGs acquired in the hospital and capsule also revealed that the counting task as a mental activity can be better recognized using the EEG recorded in the capsule. The results showed that the average counting-relaxed β-band energy ratio was greater in the capsule for all subjects. This superiority was verified through the statistical test of this measure calculated for different EEG recordings across all subjects, showing significantly higher values in the capsule (p < 0.05). In fact, these results confirmed the capability of the capsule in blocking the EMIs, emanating from the external sources and affecting the EEG such that the counting task becomes less identifiable. Moreover, comparing the relative β-band energy between the two environments showed that average of this measure was higher in the capsule for all subjects, although the overall difference was not statistically significant in some cases due to the θ-band activities possibly induced during the mental task and/or sweating artifacts. According to those results, this first pilot study does confirm the potential of the LSBB capsule for novel EEG data studies taking advantage of this unique lownoise environment to detect physiologically-based minute EEG patterns normally buried in noise. One might consider using a research-grade rather than a clinical grade EEG system with many more channels capable of faster sampling as indeed 162  Chapter 7. Conclusion and Future Work fast brain oscillations may be of interest [59, 77, 169, 222]. More informative studies need to be designed to address the limitations of the current work and to further assess the advantages of acquiring EEG signals in the shielded capsule. One of the limitations of this study was that subjects sweated profusively during the experiment due to the temperature in the capsule, inducing artifacts on the EEG signals. Also, the subjects were not sitting very comfortably and thus were not completely relaxed. The other limitation was that subjects were not asked to open or close their eyes while counting. Another limitation of the current study was that the size of dataset used to statistically investigate the influence of the capsule was not large enough, affecting power of the statistical tests. In the future, this study needs to be enhanced by addressing these limitations and including more subjects. Another improvement to the current study will be selection of other mental tasks and possibly motor tasks. Although the superiority of the LSBB capsule in detection of mental activities has been shown in this study using the backward counting, this advantage can be better investigated using more difficult arithmetic tasks such as subtracting or dividing. Moreover, to assess the effect of the capsule on recognition of induced γ-band activities, future studies can include visual/audio and cognitive tasks. For better evaluation of the designated tasks, multichannel EEG recordings covering different scalp regions can be utilized.  163  Bibliography [1] Proposal for revised clinical and electroencephalographic classification of epileptic seizures. Epilepsia, 22:489–501, 1981. From the Commission on Classification and Terminology of the International League Against Epilepsy. → pages 2, 3, 4 [2] A. Aarabi, R. Fazel-Rezai, and Y. Aghakhani. A fuzzy rule-based system for epileptic seizure detection in intracranial EEG. Clinical Neurophysiology, 120(9):1648–1657, 2009. → pages 21 [3] H. Adeli, S. Ghosh-Dastidar, and N. Dadmehr. A wavelet-chaos methodology for analysis of EEGs and EEG subbands to detect seizure and epilepsy. IEEE Transactions on Biomedical Engineering, 54(2):205–211, 2007. → pages 18 [4] P. D. Adelson, E. Nemoto, M. Scheuer, M. Painter, J. Morgan, and H. Yonas. Noninvasive continuous monitoring of cerebral oxygenation periictally using near-infrared spectroscopy: A preliminary report. Epilepsia, 40(11):1484–1489, 1999. → pages 23 [5] M. T. Akhtar, W. Mitsuhashi, and C. J. James. Employing spatially constrained ICA and wavelet denoising, for automatic removal of artifacts from multichannel EEG data. Signal Processing, 92:401–416, 2012. → pages 157, 161 [6] A. Alkan, E. Koklukaya, and A. Subasi. Automatic seizure detection in EEG using logistic regression and artificial neural network. Journal of Neuroscience Methods, 148(2):167–176, 2005. → pages 22 [7] R. G. Andrzejak, F. Mormann, T. Kreuz, C. Rieke, A. Kraskov, C. E. Elger, and K. Lehnertz. Testing the null hypothesis of the nonexistence of a preseizure state. Physical Review E, 67:010901, 2003. → pages 36 164  Bibliography [8] R. G. Andrzejak, D. Chicharro, C. E. Elger, and F. Mormann. Seizure prediction: Any better than chance? Clinical Neurophysiology, 120: 1465–1478, 2009. → pages 32, 36, 102, 115 [9] S. Arthurs, H. P. Zaveri, M. G. Frei, and I. Osorio. Patient and caregiver perspectives on seizure prediction. Epilepsy & Behavior, 19:474–477, 2010. → pages 10, 11 [10] H. Attias. Inferring parameters and structure of latent variable models by variational Bayes. In The 15th Conference of Uncertainty in Artificial Intelligence, pages 21–30, 1999. → pages 104 [11] H. Attias. A variational Bayesian framework for graphical models. In Advances in Neural Information Processing Systems, pages 209–215. MIT Press, 2000. → pages 104 [12] M. Basseville. Detecting changes in signals and systems—A survey. Automatica, 24(3):309–325, 1988. → pages 54, 77 [13] M. Bauer, R. Oostenveld, M. Peeters, and P. Fries. Tactile spatial attention enhances gamma-band activity in somatosensory cortex and reduces low-frequency activity in parieto-occipital areas. Journal of Neuroscience, 26(2):490–501, 2006. → pages 132 [14] C. Baumgartner, W. Serles, F. Leutmezer, E. Pataraia, S. Aull, T. Czech, U. Pietrzyk, A. Relic, and I. Podreka. Preictal SPECT in temporal lobe epilepsy: Regional cerebral blood flow is increased prior to electroencephalography- seizure onset as process. Journal of Nuclear Medicine, 39(6):978–982, 1998. → pages 23 [15] G. K. Bergey and P. J. Franaszczuk. Epileptic seizures are characterized by changing signal complexity. Clinical Neurophysiology, 112(2):241–249, 2001. → pages 23 [16] C. M. Bishop. Pattern Recognition and Machine Learning. Springer, 2006. ISBN 9780387310732. → pages 103, 104, 105, 106, 189, 191 [17] C. S. Burrus, R. A. Gopinath, and H. Guo. Introduction to wavelets and wavelet transforms: A primer. Prentice-Hall, Upper Saddle River, NJ, 1998. ISBN 0134896009. → pages 37, 38 [18] M. Caparos, V. Louis-Dorr, F. Wendling, L. Maillard, and D. Wolf. Automatic lateralization of temporal lobe epilepsy based on scalp EEG. Clinical Neurophysiology, 117:2414–2423, 2006. → pages 94 165  Bibliography [19] A. M. Chan, F. T. Sun, E. H. Boto, and B. M. Wingeier. Automated seizure onset detection for accurate onset time determination in intracranial EEG. Clinical Neurophysiology, 119:2687–96, 2008. → pages 154 [20] W. Chaovalitwongse, L. D. Iasemidis, P. M. Pardalos, P. R. Carney, D.-S. Shiau, and J. C. Sackellares. Performance of a seizure warning algorithm based on the dynamics of intracranial EEG. Epilepsy Research, 64:93–113, 2005. → pages 102 [21] M. Ch´avez, M. Le Van Quyen, V. Navarro, M. Baulac, and J. Martinerie. Spatio-temporal dynamics prior to neocortical seizures: Amplitude versus phase couplings. IEEE Transactions on Biomedical Engineering, 50(5): 571–583, 2003. → pages 31 [22] J.-H. Chien, D.-S. Shiau, J. J. Halford, K. M. Kelly, R. T. Kern, M. C. K. Yang, J. Zhang, J. C. Sackellares, P. M. Pardalosi, and UDC. A signal regularity-based automated seizure prediction algorithm using long-term scalp EEG recordings. Cybernetics and Systems Analysis, 47(4):586–597, 2011. → pages 34 [23] L. Chisci, A. Mavino, G. Perferi, M. Sciandrone, C. Anile, G. Colicchio, and F. Fuggetta. Real time epileptic seizure prediction using AR models and support vector machines. IEEE Transactions on Biomedical Engineering, 57(5):1124–1132, 2010. → pages 24, 160 [24] J. Cloyd, W. Hauser, A. Towne, R. Ramsay, R. Mattson, F. Gilliam, and T. Walczak. Epidemiological and medical aspects of epilepsy in the elderly. Epilepsy Research, 68S:S39–S48, 2006. → pages 2 [25] M. B. Connolly, F. W. Sharbrough, and P. K. Wong. Electrical fields and recording techniques. In J. S. Ebersole and T. A. Pedley, editors, Current Practice of Clinical Electroencephalography, chapter 4, pages 72–99. Lippincott Williams & Wilkins, 3 edition, 2003. ISBN 0781716942. → pages 7, 8 [26] C. M. Cook, A. W. Thomas, and F. S. Prato. Human electrophysiological and cognitive effects of exposure to ELF magnetic and ELF modulated RF and microwave fields : A review of recent studies. Bioelectromagnetics, 23:144–157, 2002. → pages 132 [27] R. J. Croft, J. S. Chandler, A. P. Burgess, R. J. Barry, J. D. Williams, and A. R. Clarke. Acute mobile phone operation affects neural function in humans. Clinical Neurophysiology, 113:1623–1632, 2002. → pages 132 166  Bibliography [28] R. J. Croft, D. L. Hamblin, J. Spong, a. W. Wood, R. J. McKenzie, and C. Stough. The effect of mobile phone electromagnetic fields on the alpha rhythm of human electroencephalogram. Bioelectromagnetics, 29(1):1–10, 2008. → pages [29] R. J. Croft, S. Leung, R. J. McKenzie, S. P. Loughran, S. Iskra, D. L. Hamblin, and N. R. Cooper. Effects of 2G and 3G mobile phones on human alpha rhythms: Resting EEG in adolescents, young adults, and the elderly. Bioelectromagnetics, 31(6):434–444, 2010. → pages 132 [30] M. D’Alessandro, R. Esteller, G. Vachtsevanos, A. Hinson, J. Echauz, and B. Litt. Epileptic seizure prediction using hybrid feature selection over multiple intracranial EEG electrode contacts: A report of four patients. IEEE Transactions on Biomedical Engineering, 50(5):603–615, 2003. → pages 33 [31] R. S. Delamont, P. O. Julu, and G. A. Jamal. Changes in a measure of cardiac vagal activity before and after epileptic seizures. Epilepsy Research, 35(2):87–94, 1999. → pages 23 [32] M. A. Dichter and G. F. Ayala. Cellular mechanisms of epilepsy: (a. Science, pages 157–164. → pages 75 [33] J. S. Ebersole. Noninvasive localization of epileptogenic foci by EEG source modeling. Epilepsia, 41(Suppl 3):S24–S33, 2000. → pages 94 [34] J. S. Ebersole. Cortical generators and EEG voltage fields. In J. S. Ebersole and T. A. Pedley, editors, Current Practice of Clinical Electroencephalography, chapter 2, pages 12–31. Lippincott Williams & Wilkins, 3 edition, 2003. ISBN 0781716942. → pages 6, 7 [35] J. S. Ebersole and S. V. Pacia. Localization of temporal lobe foci by ictal EEG patterns. Epilepsia, 37(4):386–399, 1996. → pages 94 [36] J. Engel. Intracerebral recordings: Organization of the human epileptogenic region. Journal of Clinical Neurophysiology, 10(1):90–98, 1993. → pages 5 [37] J. Engel. Report of the ILAE classification core group. Epilepsia, 47(9): 1558–1568, 2006. → pages 4 [38] P. Federico, D. F. Abbott, R. S. Briellmann, a. S. Harvey, and G. D. Jackson. Functional MRI of the pre-ictal state. Brain, 128:1811–1817, 2005. → pages 23 167  Bibliography [39] R. Fisher, V. Salanova, T. Witt, R. Worth, T. Henry, R. Gross, K. Oommen, I. Osorio, and et al. Electrical stimulation of the anterior nucleus of thalamus for treatment of refractory epilepsy. Epilepsia, 51(5):899–908, 2010. → pages 10 [40] R. S. Fisher, W. v. E. Boas, W. Blume, C. Elger, P. Genton, P. Lee, and J. Engel. Epileptic seizures and epilepsy: Definitions proposed by the International League Against Epilepsy (ILAE) and the International Bureau for Epilepsy (IBE). Epilepsia, 46(4):470–472, 2005. → pages 2 [41] S. P. Fitzgibbon, K. J. Pope, L. Mackenzie, C. R. Clark, and J. O. Willoughby. Cognitive tasks augment gamma EEG power. Clinical Neurophysiology, 115(8):1802–1809, 2004. → pages 141, 149 [42] L. Forsgren and D. Hesdorffer. Epidemiology and prognosis of epilepsy. In S. Shorvon, E. Perucca, and J. Engel, editors, The Treatment of Epilepsy, chapter 2, pages 21–31. Wiley-Blackwell, third edition, 2009. ISBN 9781405183833. → pages 1, 2 [43] P. J. Franaszczuk and G. K. Bergey. An autoregressive method for the measurement of synchronization of interictal and ictal EEG signals. Biological cybernetics, 81(1):3–9, 1999. → pages 22 [44] P. J. Franaszczuk, G. K. Bergey, P. J. Durka, and H. M. Eisenberg. Time-frequency analysis using the matching pursuit algorithm applied to seizures originating from the mesial temporal lobe. Electroencephalography and Clinical Neurophysiology, 106(6):513–521, 1998. → pages 23 [45] A. J. Gabor. Seizure detection using a self-organizing neural network: Validation and comparison with other detection strategies. Electroencephalography and Clinical Neurophysiology, 107:27–32, 1998. → pages 20, 156 [46] A. J. Gabor, R. R. Leach, and F. U. Dowla. Automated seizure detection using a self-organizing neural network. Electroencephalography and Clinical Neurophysiology, 99:257–266, 1996. → pages 19, 66 [47] S. Gaffet, Y. Guglielmi, J. Virieux, G. Waysand, A. Chwala, R. Stolz, C. Emblanch, M. Auguste, D. Boyer, and A. Cavaillou. Simultaneous seismic and magnetic measurements in the low-noise underground laboratory (LSBB) of Rustrel, France, during the 2001 January 26 Indian 168  Bibliography earthquake. Geophysical Journal International, 155:981–990, 2003. → pages 133 [48] T. Gandhi, B. K. Panigrahi, M. Bhatia, and S. Anand. Expert model for detection of epileptic activity in EEG signature. Expert Systems with Applications, 37(4):3513–3520, 2010. → pages 20 [49] B. Gangadhar, D. Dutt, N. Janakiramaiah, and P. Sadasivan. Automation of seizure duration estimation during ECT: Use of fractal dimension. In International IEEE EMBS Conference, pages 3.37–3.38, 1995. → pages 41 [50] T. Georgiou. Distances and Riemannian metrics for spectral density functions. IEEE Transactions on Signal Processing, 55(8):3995–4003, 2007. → pages 136 [51] T. T. Georgiou. An intrinsic metric for power spectral density functions. IEEE Signal Processing Letters, 14(8):561–563, 2007. → pages 136 [52] T. T. Georgiou. What is a natural notion of distance between power spectral density functions? In European Control Conference, pages 358–361, Greece, 2007. → pages 136 [53] S. Ghosh-Dastidar, H. Adeli, and N. Dadmehr. Mixed-band wavelet-chaos-neural network methodology for epilepsy and epileptic seizure detection. IEEE Transactions on Biomedical Engineering, 54(9): 1545–1551, 2007. → pages 19 [54] S. Ghosh-Dastidar, H. Adeli, and N. Dadmehr. Principal component analysis-enhanced cosine radial basis function neural network for robust epilepsy and seizure detection. IEEE Transactions on Biomedical Engineering, 55(2):512–518, 2008. → pages 19 [55] P. C. Gibson, M. P. Lamoureux, and G. F. Margrave. Letter to the editor: Stockwell and wavelet transforms. Journal of Fourier Analysis and Applications, 12:713–721, 2006. → pages 139 [56] E. S. Goldensohn and D. P. Purpura. Intracellular potentials of cortical neurons during focal epileptogenic discharges. Science, 139:840–842, 1963. → pages 5 [57] J. Gotman. Automatic recognition of epileptic seizures in the EEG. Electroencephalography and Clinical Neurophysiology, 54:530–540, 1982. → pages 5, 14, 16, 44, 63, 65, 98 169  Bibliography [58] J. Gotman. Automatic seizure detection: Improvements and evaluation. Electroencephalography and Clinical Neurophysiology, 76:317–324, 1990. → pages 6, 14, 16, 156 [59] J. Gotman. High frequency oscillations. In 5th International Workshop on Seizure Prediction, page 24, Dresden, Germany, 2011. → pages 163 [60] J. Gotman and D. J. Koffler. Interictal spiking increases after seizures but does not after decrease in medication. Electroencephalography and Clinical Neurophysiology, 72:7–15, 1989. → pages 24 [61] L. Guo, D. Rivero, J. Dorado, J. R. Rabu˜nal, and A. Pazos. Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks. Journal of Neuroscience Methods, 191:101–109, 2010. → pages 20 [62] C. A. Gurnett and W. E. Dodson. Definitions and classification of epilepsy. In S. Shorvon, E. Perucca, and J. Engel, editors, The Treatment of Epilepsy, chapter 1, pages 3–20. Wiley-Blackwell, third edition, 2009. ISBN 9781405183833. → pages 3, 4 [63] K. Hagiwara, T. Okamoto, H. Shigeto, K. Ogata, Y. Somehara, T. Matsushita, J.-i. Kira, and S. Tobimatsu. Oscillatory gamma synchronization binds the primary and secondary somatosensory areas in humans. NeuroImage, 51:412–420, 2010. → pages 132 [64] D. Hamblin, A. W. Wood, R. J. Croft, and C. Stough. Examining the effects of electromagnetic fields emitted by GSM mobile phones on human event-related potentials and performance during an auditory task. Clinical Neurophysiology, 115:171–178, 2004. → pages 132 [65] M. A. F. Harrison, M. G. Frei, and I. Osorio. Accumulated energy revisited. Clinical Neurophysiology, 116:527–531, 2005. → pages 25 [66] M. A. F. Harrison, I. Osorio, M. G. Frei, S. Asuri, and Y.-C. Lai. Correlation dimension and integral do not predict epileptic seizures. Chaos, 15:033106, 2005. → pages 28 [67] S. M. Hass, M. G. Feri, and I. Osorio. Strategies for adapting automated seizure detection algorithms. Medical Engineering & Physics, 29:895–909, 2007. → pages 16  170  Bibliography [68] G. Henderson, E. Ifeachor, N. Hudson, C. Goh, N. Outram, S. Wimalaratna, C. Del Percio, and F. Vecchio. Development and assessment of methods for detecting dementia using the human electroencephalogram. IEEE Transactions on Biomedical Engineering, 53 (8):1557–1568, 2006. → pages 52, 160 [69] C. W. Hesse and C. J. James. Tracking and detection of epileptiform activity in multichannel ictal EEG using signal subspace correlation of seizure source scalp topographies. Medical & Biological Engineering & Computing, 43:764–770, 2005. → pages 18 [70] T. Higuchi. Approach to an irregular time series on the basis of the fractal theory. Physica D, 31(2):277–283, 1988. → pages 19 [71] M. W. Hill, M. Wong, A. Amarakone, and S. M. Rothman. Rapid cooling aborts seizure-like activity in rodent hippocampal-entorhinal slices. Epilepsia, 41(10):1241–1248, 2000. → pages 10 [72] L. M. Hively and V. A. Protopopescu. Channel-consistent forewarning of epileptic events from scalp EEG. IEEE Transactions on Biomedical Enginnering, 50(5):584–593, 2003. → pages 28, 160 [73] L. M. Hively, P. C. Gailey, and V. A. Protopopescu. Detecting dynamical change in nonlinear time series. Physics Letters A, 258:103–114, 1999. → pages 28 [74] R. Huber, V. Treyer, A. A. Borb´ely, J. Schuderer, J. M. Gottselig, H.-P. Landolt, E. Werth, T. Berthold, N. Kuster, A. Buck, and P. Achermann. Electromagnetic fields, such as those from mobile phones, alter regional cerebral blood flow and sleep and waking EEG. Journal of Sleep Research, 11:289–295, 2002. → pages 132 [75] L. D. Iasemidis, J. C. Sackellares, H. P. Zaveri, and W. J. Williams. Phase space topography and the Lyapunov exponent of electrocorticograms in partial seizures. Brain Topography, 2(3):187–201, 1990. → pages 26 [76] L. D. Iasemidis, D.-S. Shiau, W. Chaovalitwongse, J. Sackellares, P. M. Pardalos, J. C. Principe, P. R. Carney, A. Prasad, B. Veeramani, and K. Tsakalis. Adaptive epileptic seizure prediction system. IEEE Transactions on Biomedical Engineering, 50(5):616–627, 2003. → pages 26, 75, 160  171  Bibliography [77] J. Jacobs, P. LeVan, R. Chander, J. Hall, F. Dubeau, and J. Gotman. Interictal high-frequency oscillations (80-500 Hz) are an indicator of seizure onset areas independent of spikes in the human epileptic brain. Epilepsia, 49(11):1893–1907, 2008. → pages 163 [78] C. J. James, R. D. Jones, P. J. Bones, and G. J. Carroll. Detection of epileptiform discharges in the EEG by a hybrid system comprising mimetic, self-organized artificial neural network, and fuzzy logic stages. Clinical Neurophysiology, 110(12):2049–2063, 1999. → pages 6, 20 [79] N. B. Janson, A. N. Pavlov, A. B. Neiman, and V. S. Anishchenko. Reconstruction of dynamical and geometrical properties of chaotic attractors from threshold-crossing interspike intervals. Physical Review E, 58:R4–R7, 1998. → pages 52 [80] J. G. R. Jefferys and R. Robert. The biology of epilepsy. In A. Hopkins, editor, Epilepsy, chapter 2, pages 19–82. Demos, New York, 1987. ISBN 0939957043. → pages 5 [81] K. K. Jerger, T. I. Netoff, J. T. Francis, T. Sauer, L. Pecora, S. L. Weinstein, and S. J. Schiff. Early seizure detection. Journal of Clinical Neurophysiology, 18(3):259–268, 2001. → pages 31 [82] W. Jia, N. Kong, F. Li, X. Gao, S. Gao, G. Zhang, Y. Wang, and F. Yang. An epileptic seizure prediction algorithm based on second-order complexity measure. Physiological Measurement, 26:609–625, 2005. → pages 28 [83] S. Kalitzin, D. Velis, P. Suffczynski, J. Parra, and F. L. da Silva. Electrical brain-stimulation paradigm for estimating the seizure onset site and the time to ictal transition in temporal lobe epilepsy. Clinical Neurophysiology, 116(3):718–728, 2005. → pages 33 [84] H. Kantz and T. Schreiber. Nonlinear Time Series Analysis. Cambridge University Press, 2 edition, 2004. ISBN 0521821509. → pages 26 [85] A. Katz, D. A. Marks, G. McCarthy, and S. S. Spencer. Does interictal spiking change prior to seizures? Electroencephalography and Clinical Neurophysiology, 79:153–156, 1991. → pages 24 [86] M. J. Katz. Fractals and the analysis of waveforms. Computers in Biology and Medicine, 18(3):145–156, 1988. → pages 19 172  Bibliography [87] K. M. Kelly, D. S. Shiau, R. T. Kern, J. H. Chien, M. C. K. Yang, K. A. Yandora, J. P. Valeriano, J. J. Halford, and J. C. Sackellares. Assessment of a scalp EEG-based automated seizure detection system. Clinical Neurophysiology, 121:1832–1843, 2010. → pages 16, 34, 156 [88] D. H. Kerem and A. B. Geva. Forecasting epilepsy from the heart rate signal. Medical & Biological Engineering & Computing, 43:230–239, 2005. → pages 23 [89] N. Khalid, M. Atkins, and G. Kirov. The effects of etomidate on seizure duration and electrical stimulus in seizure-resistant patients during electroconvulsive therapy. Journal of ECT, 22:184–188, 2006. → pages 41, 42 [90] H. Khamis, A. Mohamed, and S. Simpson. Seizure state detection of temporal lobe seizures by autoregressive spectral analysis of scalp EEG. Clinical Neurophysiology, 120(8):1479–1488, 2009. → pages 22 [91] Y. U. Khan and J. Gotman. Wavelet based automatic seizure detection in intracerebral electroencephalogram. Clinical Neurophysiology, 114: 898–908, 2003. → pages 16, 66 [92] J. D. Kropotov. Quantitative EEG, event-related potentials and neurotherapy. Academic Press, first edition, 2009. ISBN 9780123745125. → pages 142, 149 [93] A. D. Krystal, M. West, R. Prado, H. Greenside, S. Zoldi, and R. D. Weiner. EEG effects of ECT: Implications for rTMS. Depression and Anxiety, 12:157–165, 2000. → pages 42 [94] L. Kuhlmann, A. N. Burkitt, M. J. Cook, K. Fuller, D. B. Grayden, L. Seiderer, and I. M. Y. Mareels. Seizure detection using seizure probability estimation: Comparison of features used to detect seizures. Annals of Biomedical Engineering, 37(10):2129–2145, 2009. → pages 17, 156 [95] L. Kuhlmann, D. Freestone, A. Lai, A. N. Burkitt, K. Fuller, D. B. Grayden, L. Seiderer, S. Vogrin, I. M. Y. Mareels, and M. J. Cook. Patient-specific bivariate-synchrony-based seizure prediction for short prediction horizons. Epilepsy Research, 91:214–231, 2010. → pages 31 [96] S. Kullback and R. A. Leibler. On information and sufficiency. Annals of Mathematical Statistics, 22(1):79–86, 1951. → pages 67, 101 173  Bibliography [97] Y. C. Lai, M. A. Harrison, M. G. Frei, and I. Osorio. Inability of Lyapunov exponents to predict epileptic seizures. Physical Review Letters, 8(6): 068102 1–4, 2003. → pages 27 [98] Y. C. Lai, M. A. F. Harrison, M. G. Frei, and I. Osorio. Controlled test for predictive power of Lyapunov exponents: Their inability to predict epileptic seizures. Chaos, 14(3):630–642, 2004. → pages 27 [99] H. H. Lange, J. P. Lieb, J. Engel, and P. H. Crandall. Temporo-spatial patterns of pre-ictal spike activity in human temporal lobe epilepsy. Electroencephalography and Clinical Neurophysiology, 56:543–555, 1983. → pages 24 [100] A. Lazo and P. Rathie. On the entropy of continuous probability distributions. IEEE Transactions on Information Theory, 24(1):120–122, 1978. → pages 54 [101] M. Le Van Quyen, J. Martinerie, M. Baulac, and F. Valera. Anticipating epileptic seizures in real time by a non-linear analysis of similarity between EEG recordings. NeuroReport, 10:2149–2155, 1999. → pages 29, 52, 160 [102] M. Le Van Quyen, C. Adam, J. Martinerie, M. Baulac, S. Clemenceau, and F. Varela. Spatio-temporal characterizations of non-linear changes in intracranial activities prior to human temporal lobe seizures. European Journal of Neuroscience, 12:2124–2134, 2000. → pages 29 [103] M. Le Van Quyen, J. Martinerie, V. Navaro, P. Boon, M. D. Hav´e, C. Adam, B. R. F. Varela, and M. Baulac. Anticipation of epileptic seizures from standard EEG recordings. Lancet, 357:183–188, 2001. → pages 29, 160 [104] M. Le Van Quyen, J. Martinerie, V. Navarro, M. Baulac, and F. J. Valera. Characterizing neurodynamic changes before seizures. Journal of Clinical Neurophysiology, 18:191–208, 2001. → pages 24 [105] M. Le Van Quyen, J. Soss, V. Navaro, R. R. M. Chavez, M. Baulac, and J. Martinerie. Preictal state identification by synchronization changes in long-term intracranial EEG recordings. Clinical Neurophysiology, 116: 559–568, 2005. → pages 31 [106] K. Lehnertz and C. Elger. Can epileptic seizures be predicted? Evidence from nonlinear time series analysis of brain electrical activity. Physical Review Letters, 80:5019–5022, 1998. → pages 27 174  Bibliography [107] K. Lehnertz and C. . E. Elger. Spatio-temporal dynamics of the primary epileptogenic area in temporal lobe epilepsy characterized by neuronal complexity loss. Electroencephalography and Clinical Neurophysiology, 95:108–117, 1995. → pages 27 [108] K. Lehnertz, F. Mormann, T. Kreuz, R. Andrzejak, C. Rieke, P. David, and C. E. Elger. Seizure prediction by nonlinear EEG analysis. IEEE Engineering in Medicine and Biology Magazine, 22:57–63, 2003. → pages 5 [109] A. Lempel and J. Ziv. On the complexity of finite sequences. IEEE Transactions on Information Theory, 22(1):75–81, 1976. → pages 28 [110] J.-F. Lepage, D. Saint-Amour, and H. Th´eoret. EEG and neuronavigated single-pulse TMS in the study of the observation/execution matching system: Are both techniques measuring the same process? Journal of Neuroscience Methods, 175(1):17–24, 2008. → pages 132 [111] H. W. Lilliefors. On the Kolmogorov-Smirnov test for normality with mean and variance unknown. Journal of the American Statistical Association, 62 (318):399–402, 1967. → pages 96 [112] H. W. Lilliefors. On the Kolmogorov-Smirnov test for the exponential distribution with mean unknown. Journal of the American Statistical Association, 64(325):387–389, 1969. → pages 96 [113] B. Litt, R. Esteller, J. Echauz, M. Dalessandro, R. Shor, T. Henry, P. Pennell, C. Epstein, R. Bakay, M. Dichter, and G. Vachtsevanos. Epileptic seizures may begin hours in advance of clinical onset: A report of five patients. Neuron, 30:51–64, 2001. → pages 25 [114] B. Litt, G. Worrell, Z. Ives, S. M. Stead, J. Echauz, J. Frommeyer, B. Brinkmann, S. Donnelly, V. Vasoli, and L. Simmons. The international epilepsy electrophysiology database (US component). In 5th International Workshop on Seizure Prediction, page 23, Dresden, Germany, 2011. → pages 161 [115] A. Longtin. Nonlinear forcasting of spike trains from sensory neurons. nternational Journal of Bifurcation and Chaos, 3(3):651–661, 1993. → pages 52 [116] A. Longtin and D. M. Racicot. Spike train patterning and forecastability. BioSystems, 40:111–118, 1997. → pages 52 175  Bibliography [117] F. Lopes da Silva, W. Blanes, S. N. Kalitzin, J. Parra, P. Suffczynski, and D. N. Velis. Epilepsies as dynamical diseases of brain systems: Basic models of the transition between normal and epileptic activity. Epilepsia, 44(Suppl. 12):72–83, 2003. → pages 23 [118] S. P. Loughran, A. W. Wood, J. M. Barton, R. J. Croft, B. Thompson, and C. Stough. The effect of electromagnetic fields emitted by mobile phones on human sleep. Neuroreport, 16(17):1973–1976, 2005. → pages 132 [119] B. Luber, M. S. Nobler, J. R. Moeller, G. P. Katzman, J. Prudic, D. P. Devanand, G. S. Dichter, and H. A. Sackeim. Quantitative EEG during seizures induced by electroconvulsive therapy: Relations to treatment modality and clinical features. II. Topographic analyses. Journal of ECT, 16(3):229–243, 2000. → pages 42 [120] J. M. Lucas. A modified V mask control scheme. Technometrics, 15(4): 833–847, 1973. → pages 54, 55, 77, 110 [121] S. Mallat. A wavelet tour of signal processing. Academic Press, 1999. ISBN 9780124666061. → pages 37, 41, 47, 63 [122] E. M. Manno. New management strategies in the treatment of status epilepticus. Mayo Clinic Proceedings, 78:508–518, 2003. → pages 4 [123] J. Martinerie, C. Adam, M. Le Van Quyen, M. Baulac, S. Clemenceau, B. Renault, and F. J. Varela. Epileptic seizures can be anticipated by non-linear analysis. Nature Medicine, 4:1173–1176, 1998. → pages 27 [124] F. J. Massey. The Kolmogrov-Simirnov test for goodness of fit. Journal of American Statistical Assosiation, 46(253):68–78, 1951. → pages 99 [125] P. Mayur. Ictal electroencephalographic characteristics during electroconvulsive therapy: A review of determination and clinical relevance. Journal of ECT, 22:213–217, 2006. → pages 41 [126] P. M. Mayur, B. N. Gangadhar, N. Janakiramaiah, and D. K. Subbakrishna. Motor seizure monitoring during electroconvulsive therapy. British Journal of Psychiatry, 174:270–272, 1999. → pages 41 [127] K. J. Meador, P. G. Ray, J. R. Echauz, D. W. Loring, and G. J. Vachtsevanos. Gamma coherence and conscious perception. Neurology, 59:847–854, 2002. → pages 132  176  Bibliography [128] R. Meier, H. Dittrich, A. Schulze-Bonhage, and A. Aertsen. Detecting epileptic seizures in long-term human EEG: A new approach to automatic online and real-time detection and classification of polymorphic seizure patterns. Journal of Clinical Neurophysiology, 25(3):119–131, 2008. → pages 17, 156 [129] V. Menon, J. M. Ford, K. O. Lim, G. H. Glover, and a. Pfefferbaum. Combined event-related fMRI and EEG evidence for temporal-parietal cortex activation during target detection. Neuroreport, 8(14):3029–3037, 1997. → pages 132 [130] R. Miles, R. K. S. Wong, and R. D. Traub. Afterdischarges in the hippocampus : Contribution of local synaptic interactions. Neuroscience, 12(4):1179–1189, 1984. → pages 5 [131] G. R. Minasyan, J. B. Chatten, M. J. Chatten, and R. N. Harner. Patient-specific early seizure detection from scalp electroencephalogram. Journal of Clinical Neurophysiology, 27:163–178, 2010. → pages 21 [132] P. Mirowski, D. Madhavan, Y. Lecun, and R. Kuzniecky. Classification of patterns of EEG synchronization for seizure prediction. Clinical Neurophysiology, 120:1927–1940, 2009. → pages 32 [133] H. Mizuhara, C. A. L.-q. Wang, and K. Kobayashi. A long-range cortical network emerging with theta oscillation in a mental task. NeuroReport, 15 (8):1233–1238, 2004. → pages 148 [134] D. Moretti, C. Fracassi, M. Pievani, C. Geroldi, G. Binetti, O. Zanetti, K. Sosta, P. Rossini, and G. Frisoni. Increase of theta/gamma ratio is associated with memory impairment. Clinical Neurophysiology, 120(2): 295–303, 2009. → pages 132 [135] F. Mormann, K. Lehnertz, P. David, and C. E. Elger. Mean phase coherence as a measure for phase synchronization and its application to the EEG of epilepsy patients. Physica D, 144:358–369, 2000. → pages 30 [136] F. Mormann, R. G. Andrzejak, T. Kreuz, C. Rieke, P. David, C. E. Elger, and K. Lehnertz. Automated detection of a preseizure state based on a decrease in synchronization in intracranial electroencephalogram recordings from epilepsy patients. Physical Review E, 67:021912, 2003. → pages 30  177  Bibliography [137] F. Mormann, T. Kreuz, R. G. Andrzejak, P. David, K. Lehnertz, and C. E. Elger. Epileptic seizures are preceded by a decrease in synchronization. Epilepsy Research, 53:173–185, 2003. → pages 75 [138] F. Mormann, T. Kreuz, C. Rieke, R. G. Andrzejak, A. Kraskov, P. David, C. E. Elger, and K. Lehnertz. On the predictability of epileptic seizures. Clinical Neurophysiology, 116:569–587, 2005. → pages 31 [139] F. Mormann, R. G. Andrzejak, C. E. Elger, and K. Lehnertz. Seizure prediction: The long and winding road. Brain, 130:314–333, 2007. → pages 10, 23, 26, 27, 35, 51, 98, 112, 115 [140] M. Morrell. Brain stimulation for epilepsy: Can scheduled or responsive neurostimulation stop seizures? Current Opinion in Neurology, 19: 164–168, 2006. → pages 10 [141] G. V. Moustakides. Optimal stopping times for detecting changes in distributions. Annals of Statistics, 14(4):1379–1387, 1986. → pages 77 [142] V. Novak, A. L. Reeves, P. Novak, P. A. Low, and F. W. Sharbrough. Time-frequency mapping of R-R interval during complex partial seizures of temporal lobe origin. Journal of the Autonomic Nervous System, 77: 195–202, 1999. → pages 23 [143] H. Ocak. Automatic detection of epileptic seizures in EEG using discrete wavelet transform and approximate entropy. Expert Systems with Applications, 36:2027–2036, 2009. → pages 17 [144] N. S. O’Neill, M. Javidan, and Z. J. Koles. Identification of the temporal components of seizure onset in the scalp EEG. The Canadian Journal of Neurological Sciences, 28:245–253, 2001. → pages 10, 19 [145] I. Osorio, M. G. Frei, and S. B. Wilkinson. Real-time automated detection and quantitative analysis of seizures and short-term prediction of clinical onset. Epilepsia, 39:615–627, 1998. → pages 6, 15, 66 [146] E. O’Sullivan-Greene, I. Mareels, A. Burkitt, and L. Kulhmann. Observability issues in networked clocks with applications to epilepsy. In The 48th IEEE Conference on Decision and Control (CDC), pages 3527–3532, Shanghai, China, 2009. → pages 33 [147] E. O’Sullivan-Greene, I. Mareels, D. Freestone, L. Kulhmann, and A. Burkitt. A paradigm for epileptic seizure prediction using a coupled 178  Bibliography oscillator model of the brain. In 31st Annual International IEEE EMBS Conference, pages 6428–6431, Minneapolis, Minnesota, USA, 2009. → pages 33 [148] E. S. Page. Continuous inspection schemes. Biometrika, 41:100–115, 1954. → pages 54, 77, 110 [149] Y. Park, L. Luo, K. K. Parhi, and T. Netoff. Seizure prediction with spectral power of EEG using cost-sensitive support vector machines. Epilepsia, 52 (10):1761–1770, 2011. → pages 25, 160 [150] E. Pauwels and G. Frederix. Finding salient regions in images: Nonparametric clustering for image segmentation and grouping. Computer Vision and Image Understanding, 75:73–85, 1999. → pages 108, 109 [151] A. Pavlov, O. Sosnovtseva, E. Mosekilde, and V. Anishchenko. Chaotic dynamics from interspike intervals. Physical Review E, 63:036205 1–5, 2001. → pages 52 [152] D. B. Percival and A. T. Walden. Wavelet methods for time series analysis. Cambridge University Press, 2000. ISBN 9780521640688. → pages 37, 39, 65 [153] G. Pfurtscheller and F. H. Lopes Da Silva. Event-related EEG/MEG synchronization and desynchronization: Basic principles. Clinical Neurophysiology, 110:1842–1857, 1999. → pages 140 [154] G. E. Polychronaki, P. Y. Ktonas, S. Gatzonis, A. Siatouni, P. a. Asvestas, H. Tsekou, D. Sakas, and K. S. Nikita. Comparison of fractal dimension estimation algorithms for epileptic seizure onset detection. Journal of Neural Engineering, 7(4):046007 1–18, 2010. → pages 19 [155] D. Purves, G. J. Augustine, D. Fitzpatrick, L. C. Katz, A. Lamantia, and J. O. McNamara. Neuroscience. Sinauer Associates, 1997. ISBN 0878937471. → pages 5 [156] H. Qu and J. Gotman. A seizure warning system for longterm epilepsy monitoring. Neurology, 45:2250–2254, 1995. → pages 15 [157] H. Qu and J. Gotman. A patient-specific algorithm for the detection of seizure onset in long-term EEG monitoring: Possible use as a warning device. IEEE Transactions on Biomedical Engineering, 44(2):115–122, 1997. → pages 15 179  Bibliography [158] J. J. Rasimas, S. R. Stevens, and K. G. Rasmussen. Seizure length in electroconvulsive therapy as a function of age, sex, and treatment number. Journal of ECT, 23:14–16, 2007. → pages 41, 42 [159] M. K. Rieder, B. Rahm, J. D. Williams, and J. Kaiser. Human gamma-band activity and behavior. International Journal of Psychophysiology, 79(1): 39–48, 2011. → pages 6, 131, 149 [160] Z. Rogowski, I. Gath, and E. Bental. On the prediction of epileptic seizures. Biological Cybernetics, 42:9–15, 1981. → pages 24 [161] I. Ros´en. Basic neurophysiological mechanisms in epilepsy. Acta Psychiatrica Scandinavica, 69:27–34, 1984. → pages 5 [162] M. E. Saab and J. Gotman. A system to detect the onset of epileptic seizures in scalp EEG. Clinical Neurophysiology, 116:427–442, 2005. → pages 5, 6, 9, 16, 17, 44, 63, 65, 66, 98, 154, 156 [163] S. Sabesan, N. Chakravarthy, K. Tsakalis, P. Pardalos, and L. Iasemidis. Measuring resetting of brain dynamics at epileptic seizures: Application of global optimization and spatial synchronization techniques. Journal of Combinatorial Optimization, 17:74–97, 2009. → pages 54 [164] Y. Salant, I. Gath, and O. Henriksen. Prediction of epileptic seizures from two-channel EEG. Medical & Biological Engineering & Computing, 36: 549–556, 1998. → pages 24 [165] G. Sammer, C. Blecker, H. Gebhardt, M. Bischoff, R. Stark, K. Morgen, and D. Vaitl. Relationship between regional hemodynamic activity and simultaneously recorded EEG-theta associated with mental arithmetic-induced workload. Human Brain Mapping, 28:793–803, 2007. → pages 148 [166] S. Sanei and J. A. Chambers. EEG signal processing. John Wiley & Sons Ltd., 2007. ISBN 9780470025819. → pages 6, 142, 149 [167] K. Sasaki, T. Tsujimoto, S. Nishikawa, N. Nishitani, and T. Ishihara. Frontal mental theta wave recorded simultaneously with magnetoencephalography and electroencephalography. Neuroscience Research, 26:79–81, 1996. → pages 148 [168] T. Sauer. Reconstruction of dynamical systems from interspike intervals. Physical Review Letters, 72:3811–3814, 1994. → pages 52 180  Bibliography [169] H. Scheer, G. Curio, and M. Burghoff. Measurement of high frequency EEG signals with very low noise amplifiers: Brain oscillations above 600 Hz measured non-invasively. In IFMBE Proceedings, volume 22, pages 1302–1304, 2008. → pages 163 [170] B. Schelter, M. Winterhalder, T. Maiwald, A. Brandt, A. Schad, A. Schulze-Bonhage, and J. Timmer. Testing statistical significance of multivariate time series analysis techniques for epileptic seizure prediction. Chaos, 16:013108, 2006. → pages 32, 36 [171] B. Schelter, M. Winterhalder, T. Maiwald, A. Brandt, A. Schad, J. Timmer, and A. Schulze-Bonhage. Do false predictions of seizures depend on the state of vigilance? A report from two seizure prediction methods and proposed remedies. Epilepsia, 47(12):2058–2070, 2006. → pages 11, 160 [172] B. Schelter, M. Winterhalder, H. Feldwisch genannt Drentrup, J. Wohlmuth, J. Nawrath, A. Brandt, A. Schulze-Bonhage, and J. Timmer. Seizure prediction: The impact of long prediction horizons. Epilepsy Research, 73:213–217, 2007. → pages 10 [173] B. Schelter, H. Feldwisch-Drentrup, M. Ihle, A. Schulze-Bonhage, and J. Timmer. Seizure prediction in epilepsy: From circadian concepts via probabilistic forecasting to statistical evaluation. In 33rd Annual International IEEE EMBS Conference, pages 1624–1627, Boston, Massachusetts USA, 2011. → pages 160 [174] A. Schulze-Bonhage. The European database. In 5th International Workshop on Seizure Prediction, page 22, Dresden, Germany, 2011. → pages 161 [175] A. Schulze-Bonhage, F. Sales, K. Wagner, R. Teotonio, A. Carius, A. Schelle, and M. Ihle. Views of patients with epilepsy on seizure prediction devices. Epilepsy & Behavior, 18:388–396, 2010. → pages 10, 11 [176] H. Schwilden, J. Sch¨uttler, and H. Stoeckel. Closed-loop feedback control of methohexital anesthesia by quantitative EEG analysis in humans. Anesthesiology, 67:341–347, 1987. → pages 6, 131 [177] D. W. Scott. On optimal and data-based histograms. Biometrika, 66(3): 605–610, 1979. → pages 67  181  Bibliography [178] D. W. Scott. Multivariate Density Estimation: Theory, Practice, and Visualization. John Wiley & Sons, New York, 1992. ISBN 0471547700. → pages 66, 67 [179] A. Shahidi Zandi, R. Tafreshi, G. A. Dumont, C. R. Ries, B. A. MacLeod, and E. Puil. Electroconvulsive therapy: A model for seizure detection by a wavelet packet algorithm. In 29th Annual International IEEE EMBS Conference, pages 1916–1919, Lyon, France, 2007. → pages iv, vi, 37 [180] A. Shahidi Zandi, G. A. Dumont, M. Javidan, R. Tafreshi, B. A. MacLeod, C. R. Ries, and E. Puil. A novel wavelet-based index to detect epileptic seizures using scalp EEG signals. In 30th Annual International IEEE EMBS Conference, pages 919–922, Vancouver, British Columbia, Canada, 2008. → pages iv, vi, 37 [181] A. Shahidi Zandi, G. A. Dumont, M. Javidan, and R. Tafreshi. An entropy-based approach to predict seizures in temporal lobe epilepsy using scalp EEG. In 31st Annual International IEEE EMBS Conference, pages 228–231, Minneapolis, Minnesota, USA, 2009. → pages iv, vi, 37 [182] A. Shahidi Zandi, M. Javidan, G. A. Dumont, and R. Tafreshi. Automated real-time epileptic seizure detection in scalp EEG recordings using an algorithm based on wavelet packet transform. IEEE Transactions on Biomedical Engineering, 57(7):1639–1651, 2010. → pages iv, v, 62, 152 [183] A. Shahidi Zandi, R. Tafreshi, M. Javidan, and G. A. Dumont. Predicting temporal lobe epileptic seizures based on zero-crossing interval analysis in scalp EEG. In 32nd Annual International IEEE EMBS Conference, pages 5537–5540, Buenos Aires, Argentina, 2010. → pages iv, vi, 97 [184] A. Shahidi Zandi, G. Dumont, M. Yedlin, P. Lapeyrie, C. Sudre, and S. Gaffet. Analysis of scalp EEG recorded in a low-noise environment. In i-DUST 2010, pages 03002 1–8, Apt, France, 2011. → pages iv, v, 133 [185] A. Shahidi Zandi, G. A. Dumont, M. Javidan, and R. Tafreshi. Epileptic seizure prediction using variational mixture of Gaussians. In 33rd Annual International IEEE EMBS Conference, pages 7549–7552, Boston, Massachusetts USA, 2011. → pages iv, v, 97 [186] A. Shahidi Zandi, G. A. Dumont, M. J. Yedlin, P. Lapeyrie, C. Sudre, and S. Gaffet. Scalp EEG acquisition in a low-noise environment: A quantitative assessment. IEEE Transactions on Biomedical Engineering, 58(8):2407–2417, 2011. → pages iv, v, 133, 152 182  Bibliography [187] A. Shahidi Zandi, G. A. Dumont, M. Javidan, and R. Tafreshi. Detection of epileptic seizures in scalp electroencephalogram: An automated real-time wavelet-based approach. Journal of Clinical Neurophysiology, 29(1):1–16, 2012. → pages iv, v, 62, 152 [188] A. Shahidi Zandi, R. Tafreshi, M. Javidan, and G. A. Dumont. Predicting epileptic seizures in scalp EEG based on a variational Bayesian Gaussian mixture model of zero-crossing intervals. IEEE Transactions on Biomedical Engineering, submitted, 2012. → pages iv, v, 97, 152 [189] D. J. Sheskin. Handbook of Parametric and Nonparametric Statistical Procedures. Chapman & Hall/CRC, third edition, 2004. ISBN 1584884401. → pages 99, 113 [190] A. Shoeb, H. Edwards, J. Connolly, B. Bourgeois, S. T. Treves, and J. Guttag. Patient-specific seizure onset detection. Epilepsy & Behavior, 5 (4):483–498, 2004. → pages 17, 66, 154, 156 [191] S. Shorvon. Handbook of Epilepsy Treatment. Blackwell, second edition, 2005. ISBN 1405131349. → pages 2, 4, 5 [192] S. D. Shorvon. Aetiology of epilepsy. In S. Shorvon, E. Perucca, and J. Engel, editors, The Treatment of Epilepsy, chapter 3, pages 33–53. Wiley-Blackwell, third edition, 2009. ISBN 9781405183833. → pages 2 [193] B. W. Silverman. Density Estimation for Statistics and Data Analysis. Chapman & Hall/CRC, 1986. ISBN 0412246201. → pages 53 [194] J. Smith. Automated EEG analysis with microcomputers. Medical Instrumentation, 14(6):319–321, 1980. → pages 52 [195] D. E. Snyder, J. Echauz, D. B. Grimes, and B. Litt. The statistics of a practical seizure warning system. Journal of Neural Engineering, 5: 392–401, 2008. → pages 25, 36, 112, 113 [196] S. S. Spencer, P. Guimaraes, A. Katz, J. Kim, and D. Spencer. Morphological patterns of seizures recorded intracranially. Epilepsia, 33 (3):537–545, 1992. → pages 63 [197] M. R. Sperling. Intracranial electroencephalography. In J. S. Ebersole and T. A. Pedley, editors, Current Practice of Clinical Electroencephalography, chapter 20, pages 639–680. Lippincott Williams & Wilkins, 3 edition, 2003. ISBN 0781716942. → pages 9 183  Bibliography [198] V. Srinivasan, C. Eswaran, and N. Sriraam. Approximate entropy-based epileptic EEG detection using artificial neural networks. IEEE Transactions on Information Technology in Biomedicine, 11:288–295, 2007. → pages 20 [199] A. G. Stein, H. G. Eder, D. E. Blum, A. Drachev, and R. S. Fisher. An automated drug delivery system for focal epilepsy. Epilepsy Research, 39 (2):103–114, 2000. → pages 10 [200] R. G. Stockwell, L. Mansinha, and R. P. Lowe. Localization of the complex spectrum: The S transform. IEEE Transactions on Signal Processing, 44(4):998–1001, 1996. → pages 138, 139, 140 [201] A. Subasi, E. Erc¸elebi, A. Alkan, and E. Koklukaya. Comparison of subspace-based methods with AR parametric methods in epileptic seizure detection. Computers in Biology and Medicine, 36(2):195–208, 2006. → pages 22 [202] P. Suffczynski, S. Kalitzin, F. da Silva, J. Parra, D. Velis, and F. Wendling. Active paradigms of seizure anticipation: Computer model evidence for necessity of stimulation. Physical Review E, 78:051917 1–9, 2008. → pages 33 [203] R. Tafreshi, G. A. Dumont, D. Gross, C. R. Ries, E. Puil, and B. A. MacLeod. Seizure detection by a novel wavelet packet method. In 28th Annual International IEEE EMBS Conference, pages 6141–6144, New York City, New York, USA, 2006. → pages 40 [204] C. Tallon-Baudry, O. Bertrand, C. Delpuech, and J. Pernier. Stimulus specificity of phase-locked and non-phase-locked 40 Hz visual responses in human. Journal of Neuroscience, 16(13):4240–4249, 1996. → pages 140 [205] C. Tallon-Baudry, O. Bertrand, F. Peronnet, and J. Pernier. Induced gamma-band activity during the delay of a visual short-term memory task in humans. Journal of Neuroscience, 18(11):4244–4254, 1998. → pages 140 [206] F. Tecchio, C. Babiloni, F. Zappasodi, F. Vecchio, V. Pizzella, G. L. Romani, and P. M. Rossini. Gamma synchronization in human primary somatosensory cortex as revealed by somatosensory evoked neuromagnetic fields. Brain Research, 986:63–70, 2003. → pages 132 [207] F. Tecchio, S. Graziadio, G. Barbati, R. Sigismondi, F. Zappasodi, C. Porcaro, G. Valente, M. Balsi, and P. M. Rossini. Somatosensory 184  Bibliography dynamic gamma-band synchrony: A neural code of sensorimotor dexterity. NeuroImage, 35:185–193, 2007. → pages 132 ¨ [208] G. Tezel and Y. Ozbay. A new approach for epileptic seizure detection using adaptive neural network. Expert Systems with Applications, 36(1): 172–180, 2009. → pages 20 [209] M. Tito, M. Cabrerizo, M. Ayala, A. Barreto, I. Miller, P. Jayakar, and M. Adjouadi. Classification of electroencephalographic seizure recordings into ictal and interictal files using correlation sum. Computers in Biology and Medicine, 39(7):604–614, 2009. → pages 18 [210] M. Tito, M. Cabrerizo, M. Ayala, P. Jayakar, and M. Adjouadi. Seizure detection: An assessment of time- and frequency-based features in a unified two-dimensional decisional space using nonlinear decision functions. Journal of Clinical Neurophysiology, 26(6):381–391, 2009. → pages 18 [211] R. D. Traub, W. D. Knowles, R. Miles, and R. K. S. Wong. Synchronized afterdischarges in the hippocampus: Simulation studies of the cellular mechanism. Neuroscience, 12(4):1191–1200, 1984. → pages 5 [212] E. Valentini, G. Curcio, F. Moroni, M. Ferrara, L. De Gennaro, and M. Bertini. Neurophysiological effects of mobile phone electromagnetic fields on humans: A comprehensive review. Bioelectromagnetics, 28(6): 415–432, 2007. → pages 132 [213] L. M. Ward, S. E. MacLean, and A. Kirschner. Stochastic resonance modulates neural synchronization within and between cortical sources. PLoS ONE, 5(12):e14371 1–12, 2010. → pages 6, 131 [214] G. Waysand, D. Bloyet, J. P. Bongiraud, J. I. Collar, C. Dolabdjian, and P. Le Thiec. First characterization of the ultra-shielded chamber in the low-noise underground laboratory (LSBB) of Rustrel-Pays d’Apt. Nuclear Instruments and Methods in Physics Research A, 444:336–339, 2000. → pages 133 [215] M. E. Weinand, L. P. Carter, W. F. El-Saadany, P. J. Sioutos, D. M. Labiner, and K. J. Oommen. Cerebral blood flow and temporal lobe epileptogenicity. Journal of Neurosurgery, 86(2):226–232, 1997. → pages 23 [216] E. M. Whitham, K. J. Pope, S. P. Fitzgibbon, T. Lewis, C. R. Clark, S. Loveless, M. Broberg, A. Wallace, D. DeLosAngeles, P. Lillie, 185  Bibliography A. Hardy, R. Fronsko, A. Pulbrook, and J. O. Willoughby. Scalp electrical recording during paralysis: Quantitative evidence that EEG frequencies above 20 Hz are contaminated by EMG. Clinical Neurophysiology, 118: 1877–1888, 2007. → pages 132 [217] H. G. Wieser. Preictal EEG findings. Epilepsia, 30(5):664, 1989. → pages 24 [218] J. O. Willoughby, S. P. Fitzgibbon, K. J. Pope, L. Mackenzie, M. Davey, R. A. Wilcox, and C. R. Clark. Mental tasks induce gamma EEG with reduced responsiveness in primary generalized epilepsies. Epilepsia, 44 (11):1406–1412, 2003. → pages 141, 149 [219] S. B. Wilson, M. L. Scheuer, R. G. Emerson, and A. J. Gabor. Seizure detection: Evaluation of the Reveal algorithm. Clinical Neurophysiology, 115(10):2280–2291, 2004. → pages 23 [220] M. Winterhalder, T. Maiwald, H. U. Voss, R. Aschenbrenner-scheibe, J. Timmer, and A. Schulze-bonhage. The seizure prediction characteristic: A general framework to assess and compare seizure prediction methods. Epilepsy & Behavior, 4:318–325, 2003. → pages 36 [221] Y. Yaari and H. Beck. Epileptic neurons in temporal lobe epilepsy. Brain Pathology, 12:234–239, 2002. → pages 75 [222] R. Zelmann, F. Mari, J. Jacobs, M. Zijlmans, R. Chander, and J. Gotman. Automatic detector of high frequency oscillations for human recordings with macroelectrodes. In 32nd Annual International IEEE EMBS Conference, pages 2329–2333, Buenos Aires, Argentina, 2010. → pages 163 [223] T. Zikov, S. Bibian, G. A. Dumont, M. Huzmezan, and C. R. Ries. A wavelet based de-noising technique for ocular artifact correction of the electroencephalogram. In 24th Annual International IEEE EMBS Conference, pages 98–105, Houston, TX, USA, 2002. → pages 133, 157 [224] T. Zikov, S. Bibian, G. A. Dumont, M. Huzmezan, and C. R. Ries. Quantifying cortical activity during general anesthesia using wavelet analysis. IEEE Transactions on Biomedical Engineering, 53(4):617–632, 2006. → pages 6, 131, 132, 140  186  Appendix A  Nonlinear Scaling Function Properties The behavior of the nonlinear scaling function ν(z, z0 ), which is defined in Section 4.2.3 by Equation 4.10, is analyzed here for different ranges of z0 , when z = 0.  If 0 < z0 < Zm : By definition, ν0 = min 1, (z0 + η Zm ) / ((1 + η)Zm ) , which results in ν0 = (z0 + η Zm ) / ((1 + η)Zm ) for this range of z0 . Then, using Equation 4.10, ν(0, z0 ) = ν0  η Zm η = . z0 + η Zm 1+η  (A.1)  If z0 ≥ Zm : In this case, ν0 = min 1, (z0 + η Zm ) / ((1 + η)Zm ) ν(0, z0 ) = ν0  = 1; therefore,  η Zm η η = ≤ . z0 + η Zm (z0 /Zm ) + η 1+η  187  (A.2)  Appendix A. Nonlinear Scaling Function Properties  If −η Zm ≤ z0 ≤ 0 : For this range of z0 , ν0 = min 1,  z0 + η Zm (1 + η)Zm  =  z0 + η Zm , (1 + η)Zm  (A.3)  and according to Equation 4.10, ν(0, z0 ) = 1 + (ν0 − 1) exp(ν0 z0 ) z0 − Zm z0 + η Zm =1+ exp z0 . (1 + η)Zm (1 + η)Zm  (A.4)  If η Zm ≤ 1, ν(0, z0 ) is a strictly increasing function for the given range of z0 . To prove this, let K = z0 (z0 + η Zm ) / ((1 + η)Zm ). Then,  z0 − Zm d exp(K) 1 + (2z0 + η Zm ) . ν(0, z0 ) = dz0 (1 + η)Zm (1 + η)Zm  (A.5)  In the above equation, exp(K)/ ((1 + η)Zm ) is always positive. Let H =1+  (2z0 + η Zm )(z0 − Zm ) . (1 + η)Zm  (A.6)  Then, for −η Zm ≤ z0 ≤ 0, H is a strictly decreasing function since dH 4z0 + (η − 2)Zm < 0. = dz0 (1 + η)Zm  (A.7)  Therefore, the minimum of H is Hmin = H  z0 =0  =1−  η Zm . 1+η  It is clear that for η Zm ≤ 1, H is positive since Hmin > 0. Hence,  (A.8) d dz0 ν(0, z0 )  >0  and ν(0, z0 ) is strictly increasing for −η Zm ≤ z0 ≤ 0.  Finally, as ν(0, −η Zm ) = 0 and ν(0, 0) = η/(1 + η), 0 ≤ ν(0, z0 ) ≤  188  η . 1+η  (A.9)  Appendix B  Variational Gaussian Mixture Model B.1 Variational Bayes Expectation–Maximization Details of the variational EM algorithm including the update equations of the hyperparameters are presented here [16].  E-Step: rnm =  r˜nm M ˜nl l=1 r  (B.1)  where 1 D ln r˜nm = E(ln πm ) + E(ln |Λm |) − ln(2π) 2 2 1 − Eµm ,Λm (xn − µm )T Λm (xn − µm ) . 2  189  (B.2)  Appendix B. Variational Gaussian Mixture Model In Equation B.2, D indicates the dimensionality of data point xn , and the other terms are calculated as follows Eµm ,Λm (xn − µm )T Λm (xn − µm ) −1 = Dβm + νm (xn − µm )T Wm (xn − µm )  D  E(ln |Λm |) =  νm + 1 − l 2  ψ l=1  + D ln 2 + ln |Wm |  E(ln πm ) = ψ(αm ) − ψ(  m  αm ).  (B.3)  (B.4)  (B.5)  where ψ(·) denotes the digamma function. After updating rnm , the following statistics are computed N  rnm  (B.6)  rnm xn  (B.7)  rnm (xn − xm )(xn − xm )T .  (B.8)  Nm = n=1  xm =  Sm =  1 Nm  1 Nm  N n=1  N n=1  M-Step: αm = α0 + Nm  (B.9)  βm = β0 + Nm  (B.10)  −1 µm = βm (β0 µ0 + Nm xm )  (B.11)  −1 Wm = W0−1 + Nm Sm +  β0 Nm (xm − µ0 )(xm − µ0 )T β0 + Nm  νm = ν0 + Nm .  190  (B.12) (B.13)  Appendix B. Variational Gaussian Mixture Model  B.2 Variational Lower Bound The lower bound L(q) defined by Equation 5.15 can be rewritten as [16] L=  q(Z, Θ) ln z  p(X, Z, Θ) dΘ q(Z, Θ)  = E ln p(X, Z, Θ) − E ln q(Z, Θ) = E ln p(X|Z, {µm , Λm }) + E ln p(Z|{πm }) + E ln p({πm }) + E ln p({µm , Λm }) − E ln q(Z) − E ln q({πm }) − E ln q({µm , Λm }) .  (B.14)  Different terms of Equation B.14 are then calculated as follows, where Tr(A) refers to the trace of matrix A, and Γ (·) is the gamma function. E ln p(X|Z, {µm , Λm }) =  1 M −1 − νm Tr(Sm Wm ) Nm E(ln |Λm |) − Dβm 2 m=1 −νm (xm − µm )T Wm (xm − µm ) − D ln(2π) (B.15)  N  E ln p(Z|{πm }) =  E ln p({πm }) = ln  rnm E(ln πm )  (B.16)  n=1 m=1  Γ (M α0 ) M  Γ (α0 )  M  M  + (α0 − 1)  191  E(ln πm ) m=1  (B.17)  Appendix B. Variational Gaussian Mixture Model  E ln p({µm , Λm }) =  1 M β0 D ln + E(ln |Λm |) 2 m=1 2π −  Dβ0 − β0 νm (µm − µ0 )T Wm (µm − µ0 ) βm  + M ln BW (W0 , ν0 ) + −  ν0 − D − 1 M E(ln |Λm |) 2 m=1  1 M νm Tr(W0−1 Wm ) 2 m=1  (B.18)  M  N  rnm ln rnm  E ln q(Z) =  (B.19)  n=1 m=1  E ln q({πm }) = ln  Γ(  m Γ (αm )  M  E ln q({µm , Λm }) =  m αm )  M  + m=1  (αm − 1)E(ln πm )  (B.20)  1 D βm E(ln |Λm |) + − 1 − HW q(Λm ) ln 2 2 2π  m=1  (B.21) where D −ν/2  BW (W, ν) = |W|  νD/2 D(D−1)/4  2  π  Γ l=1  ν+1−l 2  −1  ,  (B.22)  and HW q(Λ) = − ln BW (W, ν) −  νD ν−D−1 E(ln |Λ|) + . 2 2  192  (B.23)  

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.24.1-0072884/manifest

Comment

Related Items