Algorithms to Detect High Frequency Oscillations in Human Intracerebral EEG

Size: px
Start display at page:

Download "Algorithms to Detect High Frequency Oscillations in Human Intracerebral EEG"

Transcription

1 Algorithms to Detect High Frequency Oscillations in Human Intracerebral EEG RAHUL CHANDER Department of Biomedical Engineering McGill University, Montreal A thesis submitted to McGill University in partial fulfillment of the requirements of the degree of Master of Engineering August 2007 Rahul Chander 2007

2 Abstract Researchers have recently discovered high frequency oscillations (HFOs) of short duration in the Hz band using the intracerebral electroencephalogram of epileptic patients (surgical candidates). New tools are being developed to study this phenomenon. The frequent occurrence of HFOs makes a visual identification tedious and time-consuming. Automated screening is much more efficient, repeatable, and objective. We introduced an original baseline selection method and enhanced two published HFO detection algorithms based on filters and wavelets. We then compared their performance to that of a human reviewer. Ten minutes of electroencephalogram from five patients was acquired by filtering in Hz band and sampling at 2000 Hz. A human reviewer visually identified HFOs that were considered ground-truths to measure the performance of the two algorithms. The sensitivity and false discovery rate of the filter method were 75.9% and 10.6% respectively, while those for the Wavelet method were 70.8% and 13.1% respectively. Our methods provide satisfactory performance for HFO detection.

3 Résumé Les chercheurs ont découvert récemment des oscillations haute fréquence de courte durée, dans la bande Hz, en utilisant des électrodes intracérébrales sur des patients épileptiques (candidats à la chirurgie). Des nouveaux outils ont été développés pour étudier ces phénomènes. Le nombre élevé de ces oscillations rapides fait de leur identification visuelle une tache fastidieuse. La détection automatique est plus efficace, reproductible et objective. Nous avons mis en place une méthode de sélection originale de la ligne de base et amélioré deux algorithmes de détection basés sur l utilisation de filtres et d ondelettes. Nous avons par la suite fait la comparaison entre la performance des algorithmes et celle d un expert. Dix minutes d électroencéphalogramme de cinq patients ont été enregistrés avec un filtrage de 0.5 à 500 Hz et une fréquence d échantillonnage de 2000 Hz. Une revue par un neurophysiologiste des oscillations détectées a permis de mesurer les performances des deux algorithmes. La sensibilité et le pourcentage de fausses détections de la méthode avec filtre sont respectivement de 75.9% et 10.6%, alors que pour la méthode avec ondelettes, la sensibilité et le pourcentage de fausses détections sont respectivement de 70.8% et 13.1%. Notre méthode donne des résultats satisfaisants pour la détection d oscillations haute fréquence.

4 Acknowledgement This thesis has been one of the most challenging projects of my life. I would not have been able to tackle such a challenge just on my own. I will say the same for my Master s project which is the subject of this thesis. The most useful contribution of others in my work is their continuous and unconditional support and confidence in my abilities. Dr. Jean Gotman, who is my advisor, has been my guide and mentor throughout this project. I clearly recall the early days of my research when I lost track and was completely clueless. I am positive that without his directions I would still be lost. He has always been kind and generous in his mentorship towards me. He provided an unbiased feedback that improved my methodology and forced me to think of new ways to solve problems. He provided me with essential criticism whenever it was necessary and this allowed me to improve upon my weaknesses and correct my mistakes. He also complimented me whenever my work met with his standards of quality. He has always approved of my weird night-owl working hours and shown considerable patience with my work, for which I remain grateful. In the preparation of this thesis, he has been instrumental in proof-reading and analyzing my ideas. This thesis would not be as readable as it is today if Dr. Gotman did not provide me with his tips on style, clarity, and good-writing. He also helped me in identifying and solving any inconsistencies in this thesis and in my logic. I am grateful to my parents and friends, who always showed support and had faith in me when I thought that this thesis was an insurmountable task. They were with me when I needed them the most and kept motivating me. iv

5 I thank Dr. Jean-Marc Lina, with whose guidance I learned about wavelet transforms that are used in this project. I thank Dr. Elena Urrestarazu, who is very cheerful and helpful, and it was super fun to work with her. Not only did I learn a lot from her regarding the neurological aspects of epilepsy, but also the physiological aspects of high frequency oscillations. I thank Dr. Jeff Jirsch who is extremely friendly to work with, and has provided me with ideas on the functionality of HFO detectors. With the help of both Drs. Urrestarazu and Jirsch, I was able to learn the visual identification process of high frequency oscillations in the EEG. I thank Rajashree Sen who edited the chapter on Introduction. I also thank my lab colleagues who made working in this lab a lot of fun and enjoyable experience. I especially miss Bassem whose presence led to regular intellectual conversations which had stimulated my interest in neuroscience and biomedical engineering. I thank François Laurent who translated the English version of my thesis abstract into French. My work was supported by the Canadian Institute of Health Research grant MOP In the end, I earnestly hope that those who (chose to) spent their time and money on my work have received a good return. v

6 TABLE OF CONTENTS ABSTRACT... II RESUME...III ACKNOWLEDGEMENT...IV 1 INTRODUCTION ELECTROENCEPHALOGRAM Origin of EEG Typical EEG Acquisition Setup EEG Sensor Types EEG Montage Normal EEG Rhythms Applications of EEG EPILEPSY Epilepsy Treatment Options EEG in Epilepsy Hurdles in EEG Interpretation HIGH FREQUENCY EEG Spontaneous EEG Studies (Invasive) HFO Detection Methods PROBLEM DEFINITION SUMMARY METHODS PATIENTS AND MATERIALS REVIEW PROCESS ALGORITHMS Baseline Detection High Frequency Oscillation Detection TRAINING METHODS Baseline Detection High Frequency Oscillation Detection VALIDATION METHODS Baseline Detection Performance HFO Detection Performance SUMMARY RESULTS DATA PROPERTIES BASELINE DETECTION TRAINING HFO DETECTION SUMMARY DISCUSSION DATA PROPERTIES BASELINE DETECTION METHOD REFERENCE POWER COMPUTATION METHOD HFO DETECTION METHODS GENERAL LIMITATIONS COMPARISON WITH PUBLISHED ALGORITHMS RECOMMENDATIONS USER APPLICATION CONCLUSION vi

7 APPENDIX A APPENDIX B APPENDIX C REFERENCE LIST vii

8 1 Introduction Epilepsy is a neurological condition that is active in nearly 5 individuals per 1000 in Canada and the U.S. [Theodore et al. (2006)]. Clinical symptoms of epilepsy are auras, seizures, and psychological state of absences. Neurological investigations in epileptic individuals often reveal abnormality of brain structures and neural firing patterns. The abnormal neural firing patterns in the brain can be detected indirectly by recording the electric signal generated by neurons which reaches the scalp. Such a signal is known as the electroencephalogram (EEG) and represents the net electrical activity of the underlying neurons in the immediate vicinity of the electrodes. The EEG of a normal subject is generally different from that of an epileptic patient. An epileptic patient s EEG can contain epileptiform activity such as spikes, abnormal slow waves, sharp waves, and sustained fast rhythmic activity. The epileptiform activity exhibits specific patterns depending upon the type of epilepsy. This specificity assists neurologists in diagnosing the type of epilepsy. EEG is therefore useful in detecting or confirming the presence of epilepsy. An example of a type of epilepsy in which the seizures originate from a small portion of the brain is mesial Temporal Lobe Epilepsy (mtle). Seizures in this epilepsy, originate from the mesial portion of the temporal lobe. One treatment of medically refractory mtle involves the surgical removal of the epileptic temporal lobe structures. The extent of epileptic regions in the temporal lobe can be determined by implanting EEG electrodes in these areas and then reviewing the resulting EEG (intracerebral EEG studies). Our understanding of mtle has been greatly facilitated by the development of animal models and the availability of intracerebral EEG. To develop an animal model for mtle, toxic Kainic Acid is injected into the mesial temporal structures of the rat brain. The damaged neural tissue becomes epileptic, and the rat develops mtle. 1

9 In the rat mtle model, Bragin et al. (1999b) discovered the presence of very short rhythmic activity in the intracerebral EEG. This very short rhythmic activity, known as Fast Ripples, had a characteristic frequency in the band of Hz. Bragin et al. (1999a) and Bragin et al. (1999b) reported that such activity was present in the intracerebral EEG of epileptic rats, but not in that of the healthy rats (controls). Therefore, they concluded that Fast Ripples are pathological in rats and are associated with mtle syndrome. Based on the rat studies, it was reasonable to hypothesize that Fast Ripples, if they existed, would be pathological in mesial temporal lobe epileptic patients. However, it is difficult to prove directly that Fast Ripples are pathological in humans because to form the control condition, EEG electrodes would need to be implanted in normal subjects as well, an impossibility. Using intracerebral EEG, Bragin et al discovered Fast Ripples in patients with mtle. Research into the spectral properties and origin of Fast Ripples can elucidate its role in mtle. One of the difficulties in Fast Ripples research is the identification of such transients in an EEG record. The total duration of Fast Ripples is extremely small compared to the entire length of the EEG record. Consequently, the sparse distribution of this activity presents a hurdle for a human reviewer who is required to visually identify them in the EEG. This visual process is extremely tedious and time consuming, leading to an inefficient use of a reviewer s time. This problem can be solved by developing software that could detect the interesting patterns in the EEG automatically. Such software would allow one to systematically analyze patterns. Furthermore, the software produces results which are repeatable and does so in a relatively short time compared to a human. With this motivation in mind, researchers have proposed mathematical algorithms to solve the problem of automatic pattern detection in EEG. We investigate several algorithms that can be developed into automated detection software. We 2

10 study the performance of these algorithms by comparing the patterns detected automatically to the ones identified by a neurologist. Using this performance study, we can determine the best algorithm for use in large-scale research. In the remainder of this chapter, we will explain the electroencephalogram, epilepsy, and high frequency oscillations (HFOs) in greater depth. In later chapters, we will provide the mathematical descriptions of several algorithms, their performance, and discussion of results. 1.1 Electroencephalogram The electroencephalogram (EEG) is a measurement of the electrical voltage between two different cerebral locations as a function of time [Olejniczak (2006)]. It is a type of biosignal and is thought to be indicative of the neurological state of a person. It is generated spontaneously without a conscious effort on the subject s part. EEG can be recorded inexpensively and with a very high temporal resolution (5 ms or less) Origin of EEG EEG measured from the scalp represents the overall electrical activity of a large number of neurons located in the pyramidal layer of the cerebral cortex. The neurons communicate using action potentials that are integrated at neuronal junctions called synapses. The action potentials are fast transients and their electric fields are rarely synchronized in amplitude or direction amongst neurons. The net electric field intensity due to the action potentials is very small and contributes very little to the scalp EEG [Schaul (1998); Olejniczak (2006)]. In contrast, if several synapses are located in a small region and generate electric fields in the same direction at the same time, then the resulting electric field has sufficient amplitude so that its field potential is measurable at the scalp because synaptic potentials are relatively long lasting and summate as a result. This field potential is essentially the EEG measured from the scalp and reflects the temporal 3

11 and spatial summation of post-synaptic potentials of cortical neurons [Schaul (1998)]. The volume between a neural mass (source) and a sensor is filled with various tissues that have resistive impedance. As a result of this impedance and the decay of electric field intensity according to the inverse-square law, the EEG signal measured at scalp is attenuated [Olejniczak (2006)]. As the distance between the neural mass and the sensor increases, the magnitude of EEG signal decreases Typical EEG Acquisition Setup The acquisition system consists of sensors, amplifiers/digitizing systems, and computer storage and display system. The sensors are in contact with the skin at the scalp and measure a very weak electric signal. Each sensor is connected to an amplifier that amplifies the EEG signal and allows signal measurements. The digitizing system converts the analog electric signal into a digital signal using an anti-aliasing filter and a digital to analog converter. The resulting digital signals are stored on a digital media and displayed on the computer screen. This digital recording is known as the EEG record. Such an acquisition scheme is completely non-invasive EEG Sensor Types EEG can be acquired either by non-invasive or invasive means. Non-invasive acquisition involves attaching sensors to the scalp without surgery. Non-invasive acquisition is safe for use on humans and animals for both clinical and research purposes. Invasive acquisition involves implanting sensors inside the brain or on the surface of the cortex using surgery. Surgical implantation can be done by drilling holes in the head or through open craniotomy [Diehl et al. (2000); Zumsteg et al. (2000)]. Invasive acquisitions carry the risk of intracerebral hemorrhages, infections, and increased intracranial pressure [Diehl et al. (2000)]. Invasive acquisitions have therefore, an ethical dilemma associated with them when used with humans. In humans, invasive acquisition is short-term (<2 4

12 weeks) and is currently justifiable in patients if it is the only means to localize the epileptic brain regions which need to be surgically removed. However, the data obtained from a clinically justified invasive acquisition can be used for research purposes because doing so does not increase the risk for the patient. Invasive acquisition is never used on healthy humans for research purposes as the risk of surgical complications involved create serious ethical issues. Depending on the non-invasive or invasive application, different types of electrodes are used. Each electrode can have one or more sensors constructed in it. For non-invasive applications, a scalp electrode is used. It is a circular pad that is attached to the scalp using an electrolytic jelly. The diameter of the scalp electrode is approximately 1cm. Each scalp electrode is simply one sensor. Several scalp electrodes are placed on the scalp according to the International system [Jasper (1958)]. For invasive acquisitions, electrodes in various shapes and configurations are available depending on the size and location of the brain region to be investigated. Subdural strips are an assembly of stainless steel or platinum contact disks embedded in a flexible material like Teflon or Silastic [Zumsteg et al. (2000); Diehl et al. (2000)]. These strips have only one row of contacts and are placed on the cortex. Subdural grid electrodes are arrays of parallel subdural strips placed on the cortex to record EEG from a larger area [Diehl et al. (2000); Zumsteg et al. (2000)]. Depth electrodes are thin cylindrically shaped rods with electrical contacts of length 3 mm and diameter 1 mm. The contacts are up to 1 cm apart along the length. Each contact serves as a sensor and measures the electrical activity from the volume immediately around it. These electrodes are useful when measuring the EEG from structures located deep inside the brain, e.g. hippocampus and amygdala [Zumsteg et al. (2000); Diehl et al. (2000)]. The electrodes used in invasive acquisitions are located very close to the source of the EEG activity. As a result, the EEG has a high signal-to-noise ratio and the EEG sources are well localized [Zumsteg et al. (2000)]. 5

13 1.1.4 EEG Montage The signal indicating the potential difference between two sensors is called a channel. The name of the channel indicates the sensor-pair involved, e.g. RH1- RH2 indicates the voltage signal measured between RH1 and RH2 sensors. In this example, the number indicates the sensor index and RH is the name of the depthelectrode located in the Right Hippocampus. The system of sensor-pairing is called a montage. Two common montages are referential and bipolar. In a referential montage, all channels have a sensor in common, i.e. the voltage of each channel is measured using a particular sensor as a reference e.g. RH1-RH9, RH2-RH9, RH3-RH9, etc. are using RH9 as a reference. In a bipolar montage, each channel consists of a different pair of sensors. In intracerebral electrodes, generally a bipolar montage consists of forming sensor-pairs from successive electrode contacts, e.g. if RH1, RH2, RH3, RH4, etc are successive sensors of the RH electrode, then the channels in bipolar montage are of the form RH1-RH2, RH2-RH3, RH3-RH4, etc Normal EEG Rhythms The EEG of a normal adult subject contains several distinct rhythms. Some of these rhythms are mentioned below [Niedermeyer et al. (1998)]: 1. Delta rhythms: Frequency range: Hz. This rhythm is characterized by waves with large amplitudes. It appears when the subject is in a deep sleep. 2. Theta rhythms: Frequency range: 4-7 Hz. This rhythm is characterized by waves with large amplitudes. It appears when the subject is feeling drowsy and during early stages of sleep. 3. Alpha rhythms: Frequency range 8-13 Hz. This rhythm of moderate amplitude is seen in electrodes over the occipital region of the brain. It appears when the subject closes his eyes during a relaxed state while awake. These rhythms become attenuated when the subject opens his 6

14 eyes. The rhythms disappear when the subject feels drowsy upon the onset of sleep. 4. Beta rhythms: Frequency range Hz. This rhythm of low amplitude is seen in electrodes over the frontal and central regions of the brain. It appears when the subject is performing a calculation task or is thinking actively. 5. Gamma rhythms: Frequency range: >40-Hz. This rhythm of very low amplitude appears when the subject is engaged in a sensorimotor task or is asked to recognize meaningful auditory or visual stimuli Applications of EEG EEG reflects the state of the underlying neuronal processes. When the neurons are functioning abnormally, the characteristics of EEG change. Similarly, when the person is actively concentrating on a task, for example during a psychological experiment, the brain neurons are firing in a specific pattern. In this case, the EEG serves as a functional imaging modality. Apart from applications in epilepsy, the EEG is also used to monitor comatose patients, diagnose sleep disorders, evaluate a variety of neurological disorders, and psychological testing. 1.2 Epilepsy The International League Against Epilepsy (ILAE) and the International Bureau for Epilepsy (IBE) have defined an epileptic seizure as a transient occurrence of signs and/or symptoms due to abnormal excessive or synchronous neuronal activity in the brain [Fisher et al. (2005)]. During seizures, any one of sensory, motor, and autonomic function; consciousness; emotional state; memory; cognition; or behaviour can be affected. Based on the definition of an epileptic seizure, epilepsy has been defined as: A disorder of the brain characterized by an enduring predisposition to generate epileptic seizures and by the neurobiologic, cognitive, psychological, and social consequences of this condition. The definition of epilepsy requires the occurrence of at least one epileptic seizure [Fisher et al. (2005)]. 7

15 Epileptic seizures can be quite disabling depending on their severity. Uncontrolled epileptic seizures can reduce the quality of life because the patient can easily get injured due to sudden falls, may not be able to drive, cannot pursue employment options where loss of alertness or consciousness is hazardous, suffers from depression and low self-esteem, and in some cases may require a caretaker and constant monitoring. Furthermore, the patients with severe disability are quite often unable to complete vocational training or procure skills to become employable. As a result, epileptic patients with poor seizure control depend on their families and the government for financial, social, and healthcare assistance [Bazil (2004)]. The primary goal of epilepsy treatment, therefore, is to reduce or eliminate the occurrence of seizures, with minimal adverse effects due to medication or surgery, so that the individual can lead a normal life Epilepsy Treatment Options ILAE has defined two main classes of seizures. These are partial-onset seizures and generalized-onset seizures. Partial-onset seizures are those seizures that originate from a specific portion of the brain known as the focus or onset region. The seizure activity may propagate to other parts of the brain beyond the focus. Generalized-onset seizures are those seizures that begin in both left and right hemisphere simultaneously. The patient s treatment depends on the type of seizures and the epileptic syndrome. There are three main types of epilepsy treatments available for adults [Kohrman (2007)]. After an initial diagnosis of epilepsy, the patient is given appropriate anti-epileptic drugs to control seizures. Depending on the syndrome, the patient may or may not respond to the drugs. If the patient s seizure severity and frequency does not decrease with one type of drug, then a different kind of drug or a combination of drugs are prescribed. If after three different drug trials, the patient still has seizures with no marked improvement in the quality of life then other options are considered. These generally include surgery or an implantation 8

16 of a vagus nerve stimulator. In the surgical option, the epileptic focus, if present, is removed. If the focus is destroyed, the patient becomes seizure free for at least a few years, and later on, if the seizures appear again, their frequency is usually controllable with the help of medication. The vagal nerve stimulator is an alternative for patients where medication cannot adequately control seizures and surgery is not a practical option. The implant in those cases can possibly reduce the seizure frequency by stimulating the vagus nerve. To ascertain if the patient is a candidate for surgery, it is determined whether the patient has focal or generalized-onset seizures. If the scalp EEG indicates a generalized-onset case, the patient is not considered for surgery. If the scalp EEG and the patient history indicate a possible focal onset case, the location of focus is determined using functional imaging like PET, SPECT, and fmri. If there are no clear anatomical abnormalities visible using the MRI or if the functional imaging studies and neuropsychological testing are non-conclusive then invasive EEG acquisition is considered to lateralize and/or better localize the focus [Duncan et al. (2006); Zumsteg et al. (2000); Diehl et al. (2000)]. To reduce the risks associated with invasive studies, electrodes are implanted away from major blood vessels and the duration of invasive monitoring is two weeks or less. Through the invasive acquisition, it is determined whether the patient has multiple foci and the extent of epileptogenic areas is ascertained. If there are multiple foci, the patient is not considered as a surgical candidate. Otherwise, if the focus is located in a non-critical part of the brain then it may be removed EEG in Epilepsy As EEG is sensitive to neuronal electrical discharges, any abnormal discharges in the cortex are usually detectable through continuous EEG monitoring. The diagnosis of epilepsy is often confirmed and refined by a careful study of the recorded EEG. Such a study involves screening for typical epileptiform abnormalities and other abnormal changes in EEG. 9

17 The portion of EEG containing a seizure episode is known as ictal EEG. An example of ictal EEG is shown in Figure 1. The ictal EEG is characterized by extremely rhythmic bursts of spikes and spike-and-wave discharges. The frequency and amplitude of the bursts are quite variable and may change during the course of a seizure. The seizure onset channel is defined as the sensor with the earliest appearance of rhythmic bursts that are clearly distinguishable from background EEG. The portion of EEG in-between two successive seizures is known as interictal EEG. The interictal EEG is usually influenced by the state of consciousness of the patient s brain. Depending on the type of epilepsy, the interictal EEG may include short transients. The interictal epileptiform transients are spikes and sharp waves. Examples of spikes are shown in Figure 2. A spike is defined as a transient with a sharp peak that lasts less than 70ms. A sharp wave is defined similarly with duration between 70 and 200 ms. The spikes and sharp waves are quite often non-specific to the channels near the seizure onset. This is because, the region generating such activity (irritative zone) is generally larger than the region giving rise to seizures (epileptogenic zone) [Diehl et al. (2000)]. For example, in some cases of temporal lobe epilepsy, both temporal lobes can generate interictal epileptiform activity even when the seizures are generated only from one temporal lobe [Chung et al. (1991); Hirsch et al. (1991)]. The interictal and ictal EEG activity help in separating focal-onset from generalized-onset cases. 10

18 Figure 1: Example of a seizure recorded in an epileptic patient using intracranial electrodes. On left side is the background without any clinical abnormalities. On the right are two distinct stages of a seizure. Source: Jirsch et al. (2006) Figure 2: Examples of spikes in EEG acquired from intracerebral electrodes. A) Clearest spike is in channel LH1-2 corresponding to the innermost contact of the Left Hippocampus depth electrode. B) Clearest spike is in LOF7-8 belonging to the Left Orbito-Frontal depth electrode. Source: Urrestarazu et al. (2006) Hurdles in EEG Interpretation The usefulness of EEG in the diagnosis and research of epilepsy is limited by various hurdles. These hurdles are a product of biology, technology, ethics, and human limitations. Most of these hurdles have been solved by either 11

19 incorporating information from other imaging technologies or by using appropriate mathematical algorithms to process the EEG Artefacts The scalp EEG is contaminated by various artefacts that obscure the representation of brain s electrical activity. Artefacts can alter the morphology or shape of the spikes or sharp waves, and also make the ictal onset harder to localize in time. Most artefacts can be removed by signal processing techniques. The intracerebral EEG contains very little artefact as the electrodes are inside the brain and are further away from sources of noise Poor spatial resolution The scalp EEG has a relatively poor spatial resolution because the brain signal is attenuated and smeared as it is transmitted to through the skull and scalp. Furthermore, electrical activity from deep structures like hippocampus and amygdala is attenuated to such a point that it is essentially not visible on the scalp. As a result, it is sometimes not possible to accurately locate a focal onset. Increasing the number of electrodes is not useful as the regions covered by the electrodes begin to overlap and results in redundant acquisition of the signal. Attempts have been made to solve the inverse problem of determining the location and strength of the electrical sources based on the electric voltage recorded by the sensors on the scalp [Ebersole (2000)]. Such attempts are not able to provide a unique solution to the inverse problem, as there are many more sources than the non-redundant sensors used to measure the electric potential. However, by adding enough constraints on the inverse problem, it is possible to obtain a unique solution but it may not be accurate Poor spatial sampling If the focal onset is present in deep structures then scalp EEG alone is not sufficient. In such cases, neuroimaging, clinical symptoms, and 12

20 neuropsychological tests can provide additional information regarding good locations for invasive EEG monitoring. Subdural strips or subdural grids can be implanted to cover a broad region of cortex. Depth electrodes can be implanted in the suspected focal regions located deeper into the brain. However, the spatial resolution of the depth electrodes is only along the axial direction. Furthermore, a depth electrode may not be located sufficiently close to another electrode. Consequently, the spatial sampling of the brain using depth electrodes is extremely limited. Similarly, subdural electrodes do not record from sulci and deep structures and therefore also suffer from poor spatial sampling Human Factor To make a clinical diagnosis, a clinician, who is a neurologist with expertise in EEG, visually reviews the EEG data acquired from the patient. The purpose of the review is to determine the type of seizures (focal or generalized-onset), location of focus if any, typical epileptiform activity which might reveal the type of epilepsy, and other abnormalities in EEG. Based on this information, the clinician plans the treatment tailored to the patient s needs. A visual review process is, however, difficult for reasons explained below: a) Large amounts of data: During continuous EEG monitoring sessions, it is normal to record data for up to two or three weeks. This is a huge amount of data and a visual review can take many hours. A great portion of the reviewer s time is spent reviewing part of the interictal EEG that does not contain clinically useful information. b) Objectivity: The identification of epileptiform activity is quite subjective because of the lack of a formal mathematical definition of epileptiform activity. c) Habituation: The manual review of large amounts EEG data is tiring and requires a great deal of mental concentration. It is therefore a difficult task for a human and can affect the reviewer s performance. 13

21 Automatic software tools are able to solve issues a-c to a large extent. Automated tools can process large amounts of data much faster than a human is able to and can save the clinically relevant EEG sections for the neurologist to review. This way, the neurologist does not need to review the entire interictal data but just the representative portions of it [Agarwal et al. (1998)]. To solve the problem of identifying epileptiform activity, numerous spike detection algorithms have been proposed [Frost, Jr. (1985); Gotman et al. (1979); Gotman (1985); Valenti et al. (2006)]. To solve the problem of detecting seizures, seizure detection algorithms have been proposed [Gotman (1982); Gotman (1999); Khan et al. (2003); Lommen et al. (2007)]. Automatic methods have a consistent performance throughout the review session. For these reasons, automated EEG processing tools are an important aid to the clinician in clinical and research scenarios. 1.3 High Frequency EEG In general, the spectral power of EEG is inversely proportional to the Fourier frequency. Most of the clinical information in EEG is contained between 0.1 and 30 Hz. The portion of the spectral power in Hz is much greater than that above 30 Hz. Therefore, EEG for most clinical purposes has traditionally been acquired by filtering at Hz and sampling at 200 Hz. To study the frequency bands above 70 Hz, EEG must be sampled at a frequency higher than 200 Hz. The storage needs for a sampling rate of 2000 Hz are 10 times higher than that for 200 Hz. The research into frequency bands greater than 70 Hz did not occur mainly because of the cost of the storage media and technological limitations of EEG systems. However, with the advent of new technology, the cost of digital storage has lowered enough to encourage research into higher frequency bands of EEG. In this thesis, we will refer to EEG filtered in the bands higher than 70 Hz as high frequency EEG. 14

22 High frequency EEG research can be divided into two main categories. The first comprises of studies that measure the EEG response upon the presentation of a specific stimulus. Such a study measures the Event Related Potential (ERP). In high frequency EEG, ERP studies usually investigate the Gamma band (>40 Hz) [Arnfred et al. (2007); Lachaux et al. (2005); Tallon-Baudry et al. (1997); Palva et al. (2002) ; Pulvermuller et al. (1999)]. Gamma oscillations have been observed up to 200 Hz in ERP studies using invasive EEG [Tanji et al. (2005) ; Crone et al. (2006)]. Waberski et al. (2004) have studied high frequency oscillations of up to 600 Hz non-invasively in schizophrenia patients. These oscillations are generated in the somatosensory area corresponding to the hand upon electric stimulation the nerve in the wrist. The second category involves research into spontaneous EEG obtained using intracerebral electrodes. In rodents and epileptic patients (surgical candidates), this has been done to study focal epilepsy Spontaneous EEG Studies (Invasive) There have been several studies of HFOs using spontaneous high frequency EEG mainly in animals (rats) and epilepsy surgery candidates. Some of these studies are described in this section Rat Studies Short rhythmic spindle-shaped oscillations with a frequency around 200 Hz have been recorded from the CA1 region of hippocampus of freely behaving rats [Buzsaki et al. (1992)]. These oscillations were referred to as Ripples. An example is shown in Figure 3. Buzsaki et al. (1992) suggested that Ripples were associated with the transfer of information from hippocampal networks to neocortical networks, and the synaptic modifications of the neocortical networks. In other studies, the rat model for mtle was studied [Bragin et al. (1999b); Staba et al. (2002)]. The rat hippocampus was made epileptic by treatment with Kainic 15

23 acid. Such rats developed spontaneous seizures. EEG recorded from the lesioned hippocampus showed Ripples and another kind of short rhythmic oscillations, named Fast Ripples ( Hz) (Figure 4). Bragin et al (1999) discovered that Fast Ripples were present only in the brain areas lesioned due to the Kainic Acid. Furthermore, Fast Ripples were absent in the rats that were not injected with Kainic Acid (controls). However, Ripples were present bilaterally in the hippocampi and entorhinal cortices of both control groups and epileptic rats. This suggested that Fast Ripples are correlated with epileptic lesions but Ripples are normal physiological rhythms in the rat hippocampus and entorhinal cortex. Using similar rat studies, it was also discovered that both Ripples and Fast Ripples are pathological in the dentate gyrus [Bragin et al. (2004)]. Ripples and Fast Ripples are collectively called as HFOs. Figure 3: Fast field oscillation (Ripple) in the CA1 region of the dorsal hippocampus. 1 denotes the electrode in CA1 pyramidal layer, whereas 2 indicates the electrode in stratum radiatum. Source: Buzsaki et al. (1992) Figure 4: Spontaneous Fast Ripple activity present in right CA1 and right Entorhinal Cortex, but not on the left side. In this case, Kainic Acid had been injected in the right hippocampus of the rat. Source: Bragin et al. (1999b) Subsequent studies in rats indicated that once a unilateral hippocampus was lesioned, the generation of spontaneous Fast Ripples always occurred earlier than the generation of spontaneous seizures (ictogenesis) [Le Van et al. (2006); Bragin 16

24 et al. (2004)]. Furthermore, it was also discovered that if Fast Ripples originating from the lesioned hippocampus (ipsilateral focus) propagated to the contralateral side, synaptic re-organization would occur and an epileptic mirror-focus would be created on the contralateral side as well [Le Van et al. (2006); Khalilov et al. (2005)]. This provided evidence that the occurrence of Fast Ripples lead to ictogenesis. All studies in rats have been done using microelectrodes which are cylindrical wires and the contact dimensions are on the order of few microns. Due to the small size of microelectrodes (diameter: 40 microns), they are capable of measuring EEG and the action potentials from individual neurons Human Studies Fisher et al. (1992) have reported an increase in the signal power contained in high frequency band ( Hz) of intracerebral EEG from epileptic patients. This increase was limited to the sites of seizure generating areas of the brain and therefore Fisher et al. (1992) suggested that high frequency EEG might aid in localizing the seizure focus. In a group of patients with TLE and implanted depth electrodes, Bragin et al (1999) discovered that Ripples ( Hz) and Fast Ripples ( Hz) are present in the human hippocampus and entorhinal cortex (see Figure 5 and Figure 6). Ripples were found in regions ipsi- and contra-lateral to the suspected epileptogenic area. Fast Ripples were almost always found in regions ipsi-lateral to the suspected epileptogenic area [Bragin et al. (2002); Staba et al. (2002); Bragin et al. (1999a); Bragin et al. (1999b)]. The interictal spikes were found in both ipsi- and contra-lateral to the suspected epileptogenic area. 17

25 Figure 5: Simultaneously occurring Ripple activity in right and left Entorhinal Cortex (EC). The oscillations are however absent in the Right and Left Hippocampus (Hip). Source: Bragin et al. (1999b) Figure 6: Ripples and Fast Ripples in human entorhinal cortex. A) Power spectrum of the electrical activity recorded using microelectrode '2'. The peaks at 96 Hz and 284 Hz represent overall oscillatory activity. B-D represent examples of Ripple and Fast Ripple from microelectrodes located in entorhinal cortex Source: Bragin et al. (1999a) Studies prior to 2006 used depth microelectrodes to record high frequency EEG [Bragin et al. (2004); Staba et al. (2004); Staba et al. (2002); Bragin et al. (1999a)]. Clinical depth macroelectrodes, custom-made at the Montreal Neurological Institute, have recently been shown to be adequate for recording HFOs from mesial temporal lobe and neocortical epileptic patients in both ictal [Jirsch et al. (2006)] and interictal [Urrestarazu et al. (2007)] EEG. Macroelectrodes are much larger than microelectrodes that are typically used in epileptic patients undergoing evaluation for surgical resection. Macroelectrodes, due to their larger size (diameter: 1mm, contact surface area: 4mm2) measure the EEG from a larger neural mass compared to a microelectrode. 18

26 Figure 7: HFOs identified during seizures. A-C show oscillations in High Frequency Band Hz (analogue to Ripples) D-F show oscillations in the Very High Frequency band of Hz (analogue of Fast Ripples). Source: Jirsch et al. (2006) Because of the correlation between Fast Ripples and seizure onset channels reported in the above-mentioned studies, it is speculated that Fast Ripples might serve as biomarkers of epileptogenic areas and help localize the seizure focus. Fast Ripples may possess a specificity greater than that of interictal spikes and sharp-waves [Miller (2007)]. Due to the implications of HFOs, there is a lot of interest in the field of high frequency EEG and the number of research groups in this area is on the rise HFO Detection Methods To allow research into HFOs, not only do the oscillations have to be present in the EEG, but must also be identified in the EEG record. Visual [Jirsch et al. (2006); Urrestarazu et al. (2007)] or automated techniques [Buzsaki et al. (1992); Staba et al. (2002); Khalilov et al. (2005)], have been employed to identify the HFOs in the EEG. The details of these methods are provided below. In the visual technique, the reviewer identified HFOs analogous to the identification of spikes and other epileptiform transients in clinical settings. In 19

27 the visual analysis by Jirsch et al. (2006) and Urrestarazu et al. (2007), HFOs were defined as events containing at least four consecutive peaks with regular interpeak-intervals. The HFOs were located by filtering the EEG using high pass filters, increasing the amplitude gain on the screen, and zooming into the EEG at 1sec per page. In contrast, for clinical purposes, the EEG is reviewed at 15 sec per page. Regarding the automatic detection of HFOs, so far, only two methods have been reported in the literature. The first is by Staba et al. (2002) and the second by Khalilov et al. (2005). The description of these methods does not contain information concerning training and validation. In the remainder of this section, we describe these two methods in as much detail as is provided in the publications. Staba et al. (2002) used EEG data acquired using microelectrodes (sampled at 10kHz). The data was acquired during non rapid eye movement (NREM) sleep from twenty-five patients. Their method is described in Figure 8. The authors reported that this method detected 84% of the events identified visually, although details regarding training and validation were absent. Figure 8: Detection of spontaneous HFO events from continuous wideband EEG recordings. Top: wideband EEG was bandpass filtered Hz to identify high-frequency EEG events. The RMS signal was calculated from the band-pass signal using 3ms moving window 20

28 and was used to detect HFO events. When the RMS signal exceeded the overall mean by five standard deviations for at least 6ms, such segments were selected as putative HFO events. Only the putative HFO events where the rectified signal (bottom) had at least six peaks and each peak exceeded the mean value by three standard deviations were selected. Source: Staba et al. (2002) Khalilov et al. (2005) used extracellular field potentials acquired using glass micropipettes (the sampling rate was not specified but was greater than 6 khz). They studied the interconnected intact hippocampal formations in neonatal male Wistar rats. Their method uses time-frequency representations computed using wavelet transforms. The acquired signal was convolved with a complex Morlet wavelet. The wavelet family was chosen such that the ratio of center-frequency to bandwidth was equal to five. Time-varying energy of the signal was computed by squaring the convolved signal. HFOs were classified whenever a local maximum occurred in the time-varying energy estimate. The local maximums at a given frequency were also required to exceed an energy threshold and persist for a duration longer than a certain number of wave-cycles at that frequency. The energy threshold was a function of baseline that was visually identified as located far away from ictal events. 1.4 Problem Definition A high frequency oscillation (HFO) is shown in Figure 9. Its shape is quite rhythmic and the closest theoretical analogue is a sine wave modulated by a Gaussian window which is also shown in the same figure. The characteristic frequency is not fixed and is usually in the range Hz as discovered by Staba et al. (2002). 21

29 Figure 9: An example of HFO. The unfiltered EEG containing the HFO is shown (red) along with the filtered version (blue) to emphasize the spindle shape of HFO (blue). A theoretical analogue constructed using sine wave modulated by a Gaussian window is also shown (green). The green curve also shows the real part of a complex Morlet wavelet. Note the similarity between the blue and green waveforms. For this reason, Morlet wavelets are appropriate for HFO detection as will be discussed later. The temporal extent is generally short and is approximately 80ms for Ripples and 40ms for Fast Ripples [Urrestarazu et al. (2007)]. The peak amplitude can range from few microvolts to several hundred microvolts. As an HFO is a transient, it is a non-stationary waveform. In addition, it occurs relatively infrequently in interictal EEG at a rate of 4 per min per channel (Ripple) and 2.3 per min per channel (Fast Ripple) [Urrestarazu et al. (2007)]. HFOs with a characteristic frequency in the range of Hz have a lower energy than those with a characteristic frequency in the range of Hz. This leads to a poor signal to noise ratio (SNR) for HFOs as the characteristic frequency increases (Figure 10 and Figure 11). Most of interictal EEG consists of background (Figure 1). The background is treated as noise by HFO detection algorithms used in this thesis. The background EEG in the range Hz is not stationary but can be considered quasi- 22

30 stationary over a period of several seconds. From now on, when we refer to (quasi-) stationarity of EEG or EEG segments, we imply the Hz band. Figure 10: A Ripple. It is quite easy to distinguish from its surrounding EEG because of its high amplitude. Figure 11: A Fast Ripple (arrow). Notice how the contrast between the Fast Ripple and the surrounding background is worse than in the case of Ripple (Figure 10). The amplitude-gain here is much higher than that for the previous figure. A human reviewer identifies an HFO by filtering the EEG using a high pass filter of 80 Hz and searching for local rhythmic portions of EEG with amplitudes greater than that of the adjacent EEG. The reviewer evaluates the instantaneous frequency and the average peak amplitude of the filtered quasi-stationary background EEG. Such a process becomes an adaptive classification when the reviewer continuously compares local changes in amplitude and frequency to her eyeballed-estimates. An HFO detection algorithm is intended to make EEG review objective and fast. An ideal HFO detection algorithm should detect HFOs consistently and with minimal assumptions about EEG and HFOs. There is currently no formal definition to allow detection using pattern-matching algorithms. 23

31 We aim to develop a detection algorithm that satisfies the following conditions: 1) A high sensitivity and low false discovery rate. 2) Minimal training and minimal user inputs. 3) Sensitivity or false discovery rate adjustable by varying input parameters. 4) Consistent performance for a group of patients. 5) Robustness in separating true HFOs from transients merely resembling HFOs like band-pass filtered spikes. 1.5 Summary In this chapter we described the EEG, epilepsy as a disorder, the role of EEG in epilepsy, high frequency EEG research, and the problem of HFO detection. EEG is a bio-signal that is related to the brain function. Due to this property, EEG has found numerous applications in research and also in the clinical diagnosis of epilepsy. Epilepsy is characterized by recurring spontaneous seizures. Mesial temporal lobe epilepsy is a form of focal epilepsy where the seizures originate from the mesial portions of the temporal lobe. Research into the EEG from mesial temporal lobe epilepsy patients has revealed the presence of high frequency oscillatory transients that may help localize the seizure focus. Automatic detection of such transients is an objective and fast, and therefore, an efficient way of data analysis. This thesis investigates the existing methods that automatically detect such transients, proposes some original elements, and compares them to discover their strengths and weaknesses. In the following chapters, we will describe the methods, present original modifications, explain and discuss the results, and summarize the findings of this thesis. 24

32 2 Methods We began our study by obtaining high frequency EEG data using intracerebral electrodes in epileptic patients. A reviewer examined the resulting EEG and visually identified HFOs, spikes, and background. In a visual identification, the reviewer uses the background as reference to detect HFOs and spikes. Similarly, automatic identification requires a reference i.e. a baseline. Baselines can be identified visually and provided to the detection software. Such pre-processing is subjective. To avoid this issue, we developed a baseline detection algorithm to detect baselines. For HFO detection, we selected the algorithms of Staba et al. (2002) and Khalilov et al. (2005) and modified those methods. To tune and test the performance of the algorithms, we used them on the EEG data that had been reviewed by the reviewer. This way, we were able to determine how many visually identified HFOs were detected automatically. Using a training data, we determined the optimal values for the input parameters for each algorithm. Using another dataset, validation was done for each algorithm using the optimal parameters. Through this study, we were able to determine the detection algorithms that perform the best in a given patient and for the patient group. In this chapter, we describe the following in detail: materials, visual EEGclassification process, baseline and HFO detection algorithms, and the scheme to measure automatic-detection performance. 2.1 Patients and Materials Data from five focal epileptic patients was used in this project. For clinical details regarding the epilepsy and implanted-electrode locations, see Appendix A. The Montreal Neurological Institute and Hospital Research Ethics Committee approved this study and informed consent was obtained from each patient. The acquired EEG data was band pass filtered at Hz (rolloff: -6dB per octave) and then sampled at a rate of 2000 Hz. The sampled data was quantized using a 16 bit analog-to-digital converter. Each patient s EEG data had channels. 25

33 For this study, only interictal recordings of the patients were used. The reviewer identified sleep stages 3 and 4 during non rapid eye movement (NREM) sleep in each patient s EEG. NREM sleep was used because the interictal occurrence of HFOs in this sleep-phase is higher than that during periods of wakefulness and REM sleep [Staba et al. (2004)]. An expert reviewed both ictal and interictal EEGs and determined the channels with the seizure onset. 2.2 Review Process From the appropriate sleep EEG data, ten minutes of data was selected in each patient and divided into two sections of five-minutes. The first section was used as a training dataset and the second as a validation dataset. The reviewer visually identified events in two seizure-onset channels and one or two control channels in each patient. The remaining channels were ignored from the analysis. These events were used to train and validate the detection algorithms. A continuous portion of EEG (i.e. an EEG segment) possessing a special property is an event. To visually identify events, the reviewer viewed raw EEG and a filtered version (high pass filtered at 80 Hz) simultaneously. The filtered EEG was viewed at a higher gain than unfiltered EEG. The filter removes lower frequency components and helps locate HFOs. The higher gain is necessary because HFOs have very low amplitudes compared to the unfiltered EEG. This method has been described by our reviewer in Urrestarazu et al. (2007) in the section Selection and categorization of oscillations. The reviewer classified EEG into one of the four event categories described below: 1. Background: EEG segment where no epileptiform activity or HFO is seen in the filtered EEG ( Hz). This definition includes epileptiform spikes or other slow transients that may be present in the unfiltered EEG but were undetectable upon filtering. 2. HFOs: EEG segment where at least one oscillation of frequency higher than 80 Hz was present. HFOs can be of two sub-types: 26

34 a. Oscillations: Short rhythmic oscillations in the Hz band without any visible spikes in the unfiltered EEG. b. Spikes-with-HFOs: Short rhythmic oscillations in the Hz band seen superimposed on spike-like sharp transients in the unfiltered EEG. The superimposed oscillations become more obvious when viewed in the filtered EEG. 3. Spikes-without-HFO: EEG segment with spike or sharp transients without any rhythmic superimposed oscillations. The rising and the falling phases of the transient have a smooth slope in the unfiltered EEG. The remnants of the transient may be visible in the filtered EEG. 4. Grey areas: EEG segment that could not be classified into the above three categories. This category existed because some transients were vaguely rhythmic (i.e. without a dominant rhythm) or were rhythmic but had very low amplitudes. As the reviewer was using a qualitative definition of HFO, she identified as grey areas borderline cases that were difficult to classify as HFOs or background. The review process is shown schematically in Figure

35 THIS PAGE HAS BEEN LEFT BLANK TO AID IN THE PROPER LAYOUT OF DOUBLE-SIDED PRINTS 28

36 29

37 Figure 12: Categorization of EEG in the visual review process. The above schematic shows division of EEG into the different event categories. In each category, an example is also provided. In each example, unfiltered and filtered EEG are presented to simulate the reviewer setup during EEG classification. The EEG was high pass filtered at 80 Hz. Background: No specific characteristics are visible in unfiltered and filtered EEG. The EEG has random fluctuations of very low amplitude. Spikes-without-HFO: An EEG spike is seen in the unfiltered EEG. Upon high pass filtering, an oscillation is seen. However, this oscillation is not visible superimposed on the spike and therefore is not a true HFO. HFO: Two sub-types, Oscillations and Spikes-with-HFO, are possible. Oscillations: An oscillation is seen in the unfiltered EEG which is enhanced by filtering. Spikes-with-HFO: An oscillation is seen superimposed on a sharp transient (resembling a spike) in unfiltered EEG. This oscillation is enhanced by filtering. Grey Areas: The ellipses show two events that are slightly rhythmic and may qualify as HFOs. However, compared to the amplitudes of the HFO examples, the amplitudes of the grey area events are smaller. As a result, these grey area oscillations do not stand out of the adjacent EEG and are difficult to classify. 2.3 Algorithms HFO detection algorithms have at least one metric whose value is correlated with the presence or absence of HFO in the EEG. There must also exist a reference value such that if it is exceeded by the metric, the presence of HFO is probable. If EEG is assumed to be the sum of HFO and noise, then the reference value is dependent only on the metric value of noise. The reference value should be much higher than the mean metric value of noise so that whenever the metric exceeds the reference value, the chances of it exceeding due to pure noise remain small. The primary property of HFO is rhythmicity which creates a local maximum in the power spectrum. To target this property, it is appropriate to use the timevarying spectral power estimate as a metric. If the spectral power exceeds the reference power for a preset minimum duration, then HFO is likely present in the EEG. To compute the reference power, we need to detect baselines. We describe a procedure to automatically detect baselines. Next, we describe two methods to compute the reference power from baselines. Then, we describe two HFO detection methods that use the reference power to detect HFOs. Throughout this thesis, continuous time integrals have been employed which were approximated in the software programs using the rectangle integration method. 30

38 2.3.1 Baseline Detection As the noise varies with time and is non-stationary, the calculation of the reference power is a non-trivial task. One solution is to manually specify EEG segments where no HFO is present. In that case, such segments represent pure noise and the reference power can be computed from them. This method is used in the study by Khalilov et al. (2005). A manual baseline selection is highly reviewer-dependent and is therefore subjective. Staba et al. (2002) use a different method to compute the reference power. In their method, the reference power is computed as a function of the mean and standard deviation of the spectral power for the entire EEG data (also containing HFOs). This method is objective but has the drawback that the reference power value is affected by the presence of HFOs throughout the EEG. For example, if the EEG contains a large number of HFOs, then the mean of the spectral power will increase, resulting in a high reference power value and low sensitivity. The method of Staba et al. can be improved if the mean and standard deviation of spectral power are computed from EEG segments not containing HFOs, i.e. the background. However, this improvement has a catch that one needs prior information about the location of HFOs which is our goal in the first place! We propose to detect background segments or baselines by analyzing the amount of randomness or entropy in the EEG. HFOs and filtered spikes resemble rhythmic waveforms and have a low amount of randomness. We developed a method that identifies EEG segments with high randomness (i.e. low rhythmicity) and classifies them as baseline. Baselines represent pure noise, and if reference power is computed using only the spectral power of baselines, then the presence of HFO throughout the EEG record will not affect the reference power computation. In the next subsection we describe our method to detect baselines based on entropy calculations Entropy Calculation The wavelet entropy is an indicator of the amount of rhythmicity present. High values of wavelet entropy indicate low rhythmicity, and low values of wavelet 31

39 entropy indicate high rhythmicity [Rosso et al. (2001)]. Autocorrelation coefficients have the property of enhancing the rhythmicity of a rhythmic signal buried in noise [Ifeachor et al. (2002)]. Autocorrelation and wavelet entropy have different strengths to measure rhythmicity in a signal, and can be combined to detect baselines. As we are interested in EEG segments free of HFOs and spikes, segments where the wavelet entropy of autocorrelation co-efficients is high are good choices for baselines. Our method partitions the filtered EEG ( Hz) in equal segments each of duration δ. For each segment, the autocorrelation co-efficients are computed for lags 0 to δ, and the wavelet entropy of the autocorrelation co-efficients is computed. If the wavelet entropy for a given segment is always above a threshold i.e., the percentage of the theoretical maximum wavelet entropy, then the segment is classified as a baseline. If the value of autocorrelation co-efficients is low at non-zero lags and without any dominant rhythm, then such values resemble those obtained by using filtered white noise ( Hz). For these cases, the wavelet entropy will be high. Our method does not need to compute the amplitude or energy distribution of the entire EEG record and the short baseline durations allow for a temporallysensitive computation of reference power. Another advantage is that the autocorrelation co-efficients and wavelet entropy are normalized parameters and therefore, we do not expect the wavelet entropy threshold to change across the patients. Calculation Details: The EEG record s(t) is forward-backward filtered using an IIR filter (24 th order) in the band Hz according to the method of Gustafsson [Gustafsson (1996)]. The filtered EEG is then divided into N segments of duration δ ms. Each of these segments x n (t) is tested using the baseline criteria described below. 32

40 The normalized auto-correlation co-efficients r n (m) of the segment x n (t) are computed for lags ranging from 0 to δ ms as follows: δ x ( t) x 0 rn ( m) = δ (1) x ( t) x ( t) dt 0 n n n ( t + m) dt Next, a Morlet wavelet is used to compute the wavelet power. A Morlet wavelet ψ(t) is an example of a continuous time complex-wavelet and is defined below [Addison (2002)]. n 2 t 1 i2πf0t 2 ψ ( t) = e e (2) 2π where f 0 is the characteristic frequency of the mother wavelet. The standard deviation of the Gaussian window in equation (2) is 1. The mother wavelet ψ(t), defined above, can be scaled by a factor a and translated by an amount b as follows [Addison (2002)]: t b ψ ( a, b) =ψ ( ) (3) a ψ(a,b) is known as a daughter wavelet. Scale a is related to a pseudo-frequency f according to the following relationship: f a = f 0 T s (4) where T s is the sampling period and f 0 is equal to Hz. The auto-correlation co-efficients r n (m) are used to compute the wavelet power W n (a, b) as follows: δ 2 1 * t b W n ( a, b) = ψ ( ) a rn ( t) dt (5) a t= 0 33

41 where the superscript-asterisk indicates the complex conjugate operation and scales correspond to pseudo-frequency values of 80,85,90 110,130,140,150, 170,190,210,230, 260,280,300, Hz. The missing frequency values are the 60 Hz harmonics and were eliminated from analysis to prevent possible bias due to signal corruption from power mains. Normalized wavelet power P n (a, b) is computed from wavelet power W n (a, b) as follows: P ( a, b) = n W ( a, b) k A n W ( k, b) n (6) where A is the set of all scales generated from the pseudo-frequencies listed above. Wavelet entropy S n (b) is computed from normalized wavelet power P n (a,b) as follows: S P ( k, b) n ( b) = Pn ( k, b) log10 k A n (7) The maximum wavelet entropy S max is computed from the theoretical case when the normalized wavelet power value is the same for all scales. In this case, P(a,b) = p where p = 1/\\A\\, where \\ \\ are used to denote the number of elements in a set (cardinality). S max = = = k A k A p log \ \ A \ \ p log P( k, b) log p 10 p = log P( k, b) 10 p (8) Let S min,n denote the minimum entropy for the n th segment. Therefore, S min, n S n ( b), for all b. (9) 34

42 Let μ n denote the normalized minimum entropy (NME) for the n th computed as follows: segment min, S n μ n = 100% (10) S max The criterion for classifying the n th EEG segment as baseline is then: μ n > μ thresh (11) Equation 11 implies that we seek those segments where the entropy values are always above a threshold. We would like to emphasize that if the Fourier transform is used to calculate the spectral entropy of each segment, only one value of entropy will be generated. As a result, an estimate of temporal fluctuations in entropy within each segment would not be available. If successive EEG segments are classified as baselines, then they are merged into one baseline. We name the above-described method as Normalized Wavelet Entropy of Auto Correlation Coefficients (NWEACC). This method by itself does not know the threshold value of the entropy to effectively discriminate background from HFOs and spikes. The threshold value has to be determined by computing the ranges of entropy values corresponding to the background and that corresponding to HFOs/spikes. The two ranges may overlap and the threshold is then determined as that value beyond which there is no overlap. This procedure is called training and is described in detail in the section Reference Power Computation from Baselines As discussed in the beginning of section 2.3, the spectral power is an appropriate choice of metric. The reference power, in general, depends on the power in baselines but could simply be a multiple of the average power of baselines. Once the baselines are detected, reference power can be computed in at least two ways. The first method is suitable if, in the EEG record, the variation in background power can be assumed to be low. This is generally true for short EEG records. As baselines are portions of background, the power of baselines can also be 35

43 assumed to vary slowly. In this case, an aggregate estimation of the reference power is possible. The variance of the estimated reference power will decrease as the number of baselines increases when the assumption of low variation in background power is valid. In the second, we consider a more general scenario, where we assume that the variation in background power is high. As a result, it is appropriate to assume that the power of the baselines does not change rapidly is well estimated by successive pairs of baselines. This means that the first and second baseline are similar, second and third are similar but first and third are not similar, etc. In this case, the reference power can be computed from each pair of successive baselines. The reference power then becomes a function of time and reflects temporal-changes in statistical properties of baselines. A mathematical description of these two types of computations is provided below. Calculation Details: If the k th baseline is defined between (t,t ), then let t k = (t +t )/2 represent the baseline location. Let X k (f min, f max,t k ) represent the average power of k th baseline in the frequency band (f min,f max ). If the spectral power is computed using a wavelet, then it is sufficient to identify X k (f min, f max, t k ) as X k (f, t k ), where f represents the pseudo-frequency of the daughter wavelet. We now describe the two methods of computing the reference power Time-invariant Mode This mode assumes that all the baselines are weakly-stationary. As a result, the average spectral power X f, f, t ) for the k th baseline, in the frequency k ( min max k band (f min, f max, f min > 80Hz) follows a statistical distribution B(f min, f max ). Here, B is only a function of the frequency band (f min, f max ) and is not time-variant. 36

44 A weighted average of the baseline power P avg (f min, f max ) can be computed by using the baseline s duration as the weight. P avg m uk X k ( f min, f max ) k = 1 ( f min, f max ) = m (12) u k = 1 k where m is the total number of baselines and u k is the duration (ms) of the k th baseline. Let the user define a scalar β, which is an analog of signal-to-noise ratio. Then, reference power κ(f min, f max ) is computed from P avg (f min, f max ) as follows: κ ( f min, f max ) = β Pavg ( f min, f max ) (13) κ(f min, f max ), is valid for the open interval (-, ). β is chosen as patient-specific and has the same value for all channels Time-variant Mode This mode does not assume that baselines are weakly-stationary. Rather, this mode assumes that the successive pairs of baselines are weakly-stationary. In such cases, the weighted averaged baseline power P avg (f min,f max,t k,t k+1 ) is also a function of baseline locations t k and t k+1. P avg ( f min, f max, t k, t k + 1 u k X ) = k ( f min, f max, t k ) + u u k k u X k + 1 k + 1 ( f min, f max, t k + 1 ) (14) The reference power κ(f min,f max,t k,t k+1 ) is computed from P avg (f min,f max,t k,t k+1 ) and is a function of baseline locations as well. κ ( f min, f max, t k, t k + 1 ) = β Pavg ( f min, f max, t k, t k + 1) (15) In this case, the reference power κ(f min, f max, t k, t k+1 ) is valid for the semi-open interval (t k, t k+1 ]. 37

45 The time-invariant mode is appropriate for short durations of data. In this mode, the reference power is the same throughout the EEG but specific to each channel. The time-invariant mode uses all baselines within a channel and therefore, the variance of the reference power is small. The time-variant mode is appropriate for longer durations of data where they may be intermittent state changes in the EEG. The reference power is different for each inter-baseline EEG portion and is specific to each channel. When the inter-baseline distance is small, the baselines are representative of the adjacent EEG. The time-variant mode relies only on two baselines and therefore, the variance of the reference power is large. This mode can only work well when the two successive baselines are located close to each other and baselines are distributed uniformly throughout the EEG record. The HFO detection algorithms can operate in both time-invariant and time-variant modes High Frequency Oscillation Detection Once the baselines were detected in the EEG, two methods were used to detect high frequency oscillations. The first method is based on that of Staba et al. (2002) and uses linear finite impulse response (FIR) filters. The second is based on that of Khalilov et al. (2005) and uses continuous wavelet transforms (Morlet wavelet). Both methods calculate the instantaneous signal power in a band. If the instantaneous power is higher than the reference power for a minimum duration of time, then the associated EEG segment likely contains an HFO. The minimum duration (duration threshold) constraint prevents the detection of sharp amplitude changes due to random fluctuations. Researchers assume that HFOs have only one characteristic frequency so that regular wave-cycles in EEG are visible (e.g. see Figure 9, Figure 10, and Figure 11). The calculation of duration threshold is thus simplified and set to a certain number of wave-cycles. Staba et al. (2002) specified three wave-cycles and Khalilov et al. (2005) specified five wave-cycles. This is analogous to the visual identification 38

46 techniques [Jirsch et al. (2006); Urrestarazu et al. (2007)] where four wave-cycles are required. The methods of Staba et al. (2002) and Khalilov et al. (2005) do not have an analog of time-invariant or time-variant modes. We modified these methods to include support for both modes. These methods are described below and each operates in four steps. In the first step, the instantaneous band power of the EEG is computed. In second step, the duration threshold is computed. In the third step, reference power is computed. In the fourth step, the instantaneous band power is compared to the reference power using the duration threshold. Some additional constraints to avoid the misclassification of spike-without-hfo as HFO are described in the two methods Filter Method The method of Staba et al. (2002) uses only one filter ( Hz) to process EEG. Their method detects HFOs but is not able to classify them directly into Ripple and Fast Ripples. Furthermore, their method is sensitive to the misclassification of spikes-without-hfo as HFOs. This is because spikes have a wide-bandwidth and resemble an HFO when filtered using a bandpass filter (see Figure 12). It is possible to decrease the number of spikes misclassified as HFOs if multiple bands are analyzed simultaneously. We define multiple bands to enable the classification of HFO as Ripple or Fast Ripple, and also to reduce the sensitivity to spikes. This approach is described in the next paragraph along with examples. Three bands Gamma (40-80 Hz), Ripple ( Hz), and Fast Ripple ( Hz) are analyzed. For each band, an FIR bandpass filter h(f min,f max,t) is designed of the order 279, where f min and f max denote the band-edges. 39

47 Step I: The filtered EEG signal g(f min,f max,t) is computed from the unfiltered EEG signal s(t) and a given bandpass filter impulse response h(f min,f max,t) as follows: g ( f min, f max, t) = s( t) * h( f min, f max, t) (16) where * indicates the convolution operation. Instantaneous spectral power X(f min,f max,t) is computed by squaring the filtered EEG signal g(f min,f max,t) as follows: 2 min, fmax, t) g( fmin, fmax, ) X ( f = t (17) The instantaneous spectral power is smoothed using a moving average filter of length DT(f min,f max ) as follows: X ~ ( f min, f max, t) = DT( f 1, f min max ) DT ( fmin, f t+ 2 DT ( fmin, f t 2 max max ) X ( f min ), f max, τ ) dτ (18) The filtered EEG obtained using each filter is squared to calculate the instantaneous power. The instantaneous power is smoothed using a moving average window. The length of the moving average window is same as the duration threshold DT(f min,f max ). Step II: DT(f min,f max ) is determined for each bandpass filter h(f min,f max,t) as follows: 1 1 DT ( f min, f max ) = c f min f (19) max where c is the number of wave-cycles specified by the user. 40

48 Step III: To compute the reference power in time-invariant or time-variant modes, the average spectral power X f, f, t ) of the k th baseline has to be computed. k ( min max k X k ( f uk tk min, f max, tk ) = X ( f min, f max, ) uk uk tk 2 τ dτ (20) X f, f, t ) is used in equation (12) (time-invariant) or 14 (time-variant) to k ( min max k compute the weighted averaged baseline power P avg (f min, f max,t k,t k+1 ). P avg (f min, f max,t k,t k+1 ) is used in equation (13) (time-invariant) or (15) (time-variant) to compute the reference power κ(f min,f max,t k,t k+1 ). Step IV: An HFO will create a local increase in the smoothed spectral power which can be detected. The portions of X ~ f, f, t ) above κ(f min,f max,t k,t k+1 ) (from k ( min max equation (13) or (15)) are selected. If the duration of such portions exceeds DT(f min,f max ), then the corresponding EEG segments are classified as HFOs. An example is shown in Figure 13. k 41

49 Figure 13: An example of HFO detection. Top plot shows an unfiltered EEG segment. Subtle oscillations are visible which may be due to an HFO. The second plot shows the EEG as filtered using the Ripple band filter. Visually, the presence of HFO is clearly seen in the filtered EEG. The third plot shows the instantaneous power of the EEG segment, computed by squaring the filtered signal. The fourth plot shows the smoothed version of the third plot. Smoothing was done using a moving average filter of length DT R =DT(80,200). DT R is the minimum duration threshold for the Ripple band. The dashed red line shows the reference power for the Ripple band. Green shows the peak that exceeds the power threshold and the minimum duration. Red shows the peak that exceeds the reference power but not the minimum duration. Spike Sensitivity: Some local increases in smoothed spectral power qualify as HFOs but they might be generated from the use of filters on sharp transients like spikes. A spike resembles a singularity in the EEG signal. The amplitude of the spike increases sharply from the base to the pointed peak and then begins to decrease sharply. Based on Fourier analysis, the sharp portions of a signal are constructed using higher frequencies whereas the overall general shape is constructed using lower frequencies. Qualitatively, the sharp portion of the spike (pointed peak) is narrower than the overall width of the spike, and is only a small portion of the spike. Therefore, the temporal-extent of the contribution of higher frequencies is smaller than that of the lower frequencies. The contribution to the spike s power by higher frequencies is lower than that by the lower frequencies. If we let Fast 42

50 Ripple band represent higher frequencies and Gamma band as lower frequencies, then the temporal-extent of the Fast Ripple band will be smaller than that of the Gamma band. Furthermore, the portion of spike s power in Fast Ripple band will also be smaller than that of the Gamma band. For the Ripple band, the temporalextent and power will be intermediate of that of Gamma and Fast Ripple band. The false positives resulting from filtered-spikes can be reduced by exploiting this property of spikes. If events are detected simultaneously in Gamma, Ripple, and Fast Ripple bands, and if the Gamma power peak encompasses the Ripple power peak and the Ripple power peak encompasses the Fast Ripple power peak, then the presence of spike-without-hfo is likely. This is shown graphically in Figure 14. Figure 14: The top plot shows raw EEG containing a spike-without-hfo. The second, third, and fourth plots show the smoothed spectral power of the EEG in the Gamma, Ripple, and Fast Ripple bands respectively. The reference power levels corresponding to each band are shown using red dashed lines. As expected for a (sharp) spike with a wide-bandwidth, the spectral power exceeds the reference power in each band. The onset and end time for each of the peaks are labelled. Green shows the power peaks that exceeded both the reference power level and the minimum duration. Red shows the power peaks that exceeded the reference power level but not the minimum duration. The peak for Gamma is widest and also the largest in amplitude, followed by Ripple and then Fast Ripple bands. As such, coincident detections in all bands can indicate EEG spikes. 43

51 The spike-rejection criteria are summarized as follows: 1. Gamma Onset Time < Ripple Onset Time < Fast Ripple Onset Time 2. Gamma End Time > Ripple End Time > Fast Ripple End Time 3. Gamma Power Peak > Ripple Power Peak > Fast Ripple Power Peak If there is an oscillation superimposed on the spike, as in the case of spikes-with- HFO, then the above criteria may no longer hold. This is due to two possibilities. First, the oscillation can occur during any portion of the spike and in general, the frequency and onset/end time correspondence in conditions 1 and 2 will not be met. Second, the oscillation will cause an increase in Ripple or Fast Ripple peak power, and in general, condition 3 will not be met. As a result, Filter method preferentially detects spikes-with-hfo compared to spikes-without-hfo Wavelet Method The method of Khalilov et al. (2005) uses the complex Morlet wavelet transform to process EEG. The family of Morlet wavelet was chosen for which the product of f 0, 2π, and standard deviation of Gaussian window was 5 (refer to equation (2)). This method is extended in this thesis by evaluating a wider parameter set than used by Khalilov et al. (2005) and testing it on macroelectrode EEG (humans). Wavelet transforms have certain properties that make them suitable for HFO detection. First, such transforms analyze time and frequency simultaneously and can have an arbitrary resolution in either frequency or time. Second, Morlet wavelet is remarkably similar in shape to HFOs as seen from Figure 9. Therefore, even though the wavelet transform is a non-parametric spectrum-estimation technique, some degree of pattern-matching could be achieved when using Morlet wavelets. 44

52 Step I: For detecting HFOs, spectral power is computed using wavelet transform in designated bands corresponding to the daughter wavelets. The scaled and translated wavelets ψ(a,b) (defined in equation (3)) are convolved with the EEG signal s(t) to generate complex wavelet co-efficients. The magnitude of complex wavelet co-efficients is then squared to calculate the instantaneous power W(a,b) as a function of temporal-scale and temporal-translation as follows: W * ( a, b) s( t 2 1 = ψ ( a, b) ) (21) a where the superscript asterisk indicates complex conjugate operation, and normalcase asterisk indicates convolution. Spectral power X(f,t) is computed from wavelet power W(a,b) by transforming scale a into pseudo-frequency f using equation (4) and replacing b with t. Pseudo frequency values of 80,85,90 110,130,140,150, 170,190,210,230, 260,280,300, Hz are used to sample the Hz band. Step II: The duration threshold DT(f) is determined as follows: c DT ( f ) = f (22) where c is the number of wave-cycles specified by the user. 45

53 Step III: To compute the reference power in time-invariant or time-variant modes, the average spectral power X f, t ) of the k th baseline has to be computed. k ( k X k ( f, t k 1 ) = u k uk tk + 2 uk tk 2 X ( f, τ ) dτ (23) X f, t ) is used in equation 12 (time-invariant) or 14 (time-variant) to compute k ( k the weighted averaged baseline power P avg (f, t k,t k+1 ). P avg (f, t k,t k+1 ) is used in equation (13) (time-invariant) or (15) (time-variant) to compute the reference power κ(f,t k,t k+1 ). Step IV: X(f,t) represents a three-dimensional surface described in time (x-axis), pseudofrequency (y-axis), and height (z-axis). Analogous to this, κ(f,t k,t k+1 ) is also a three-dimensional surface limited in x-axis by the range (t k,t k+1 ]. If an HFO is present, then it will create a local maximum in X(f,t) and will be above κ(f,t k,t k+1 ) at the corresponding frequency. Therefore, local maximums as three-dimensional peaks in X(f,t) surface are identified. In each local maximum, the frequency f is selected such that: 1. The height of the surface X(f,t) in the local maximum is greatest at f 2. X(f,t) > κ(f,t k,t k+1 ), where t is in the range (t k,t k+1 ] Let [t,t ] delimit the portion of the surface X(f,t) for which condition 2 is met. If the temporal width t -t exceeds DT(f ), then the EEG segment corresponding to the temporal width is detected as HFO. An example is shown in Figure

54 Figure 15: The top plot shows an HFO (arrow). The bottom plot shows the coloured spectral power surface ( Hz) of the HFO computed using Morlet wavelet. The colorbar on the right is applicable to this surface. The grey surface is the reference power and is simply shown as an image mask that intersects the spectral power surface. As a result of the masking, only that portion of the spectral power is visible here which is above the reference power surface. The local maximum created due to the HFO in the top plot is shown in the bottom plot with extents delimited using arrows in the time-frequency plane. The extent of this local maximum is approximately 47 ms and the location of the maximum is at slightly higher than 100 Hz and at 0.2 sec. At 47ms, at least four wave-cycles of period 1/100 Hz can fit in the local maximum. Hence if the duration threshold is less than four wave-cycles, then Wavelet method would detect this local maximum as HFO. There are other local maximums present as well in the time-frequency plot, but they have not been indicated for the sake of clarity. A top view is shown here instead of the side view because the shape of the spectral power surface between the time instants 0.10 and 0.17 sec hides the extent of the local maximum. Spike Sensitivity: As described in the Filter method section, a sharp spike resembles a singularity. In the power spectrum of the spike, we expect that the power decreases as the frequency increases. In the Filter method, the spike results in a local increase within a frequency band. In the Wavelet method, the spike still results in a local increase within a frequency band, however, this does not necessarily lead to a three dimensional peak in the power surface. When viewing the three dimensional power surface due to a spike (Figure 16), a smooth ridge appears that 47

55 has a negative slope. Therefore, in a sharp EEG spike, local maximums (of sufficient temporal-width) in the time-frequency representation are rare. If there is an oscillation superimposed on the spike, as in the case of spikes-with- HFO, then a local peak will appear in the 3D power surface corresponding to the frequency of the oscillation. In this case, spikes-with-hfo will get classified as HFOs upon meeting the conditions in step 4. As a result, Wavelet method preferentially detects spikes-with-hfo compared to spikes-without-hfo. Figure 16: The top plot shows an EEG spike (spike-without-hfo). The bottom plot shows spike s spectral power surface and the reference power surface (grey 3D plane). The z-axis is in db. The colorbar is only applicable to the spectral power surface of the spike. The reference plane is shown in grey but its height (z-axis) indicates the reference power value for a given frequency. The reference power surface cuts the spectral power surface of the spike, so that only portions of spectral power higher than reference power are visible. For the sake of clarity, a different perspective was chosen compared to Figure 15. Also the spectral power surface is shown from Hz and the frequency resolution used is much higher than that for HFO detection. Notice that the spike s power surface shows a general decrease with increasing frequencies. There are no local maximums above the reference power surface that also exceed the duration threshold. As a result, this spike is not detected by Wavelet method. The performance of the above-mentioned baseline and HFO detection algorithms is controlled using parameters. In the case of baseline detection algorithm, the 48

56 parameters are baseline duration (δ) and NME threshold (μ thresh ). For HFO detection algorithms, the parameters are power scale (β), number of wave-cycles (c), and in the case of Wavelet method, the frequency-to-bandwidth ratio (FBR) of the Morlet wavelet. Until now we have only described the role of these parameters without suggesting their possible values. The values are determined systematically through training and this procedure is the subject of next section. 2.4 Training Methods So far we have described the materials, review process, and detection algorithms. In the materials, we obtain the EEG that contains the patterns of interest. We divided the EEG from each patient into training and validation datasets. In the review process, the reviewer identified specific events in both of these datasets for each patient. This identification was done to train and validate the detection algorithms. Training means that the parameters of the algorithms can be tuned to detect only certain visually classified events. Training is done using only the training dataset. When the parameter values that lead to the best detection of reviewer s classified events are discovered, the parameter values are optimal. The optimal parameter values are then used in the validation dataset (not used in training) to objectively measure the detection performance. The validation process is described in the next section. We have described an algorithm to detect baselines and two algorithms to detect HFOs. In a practical user operation, first the baseline detection is done and is then followed by HFO detection. Therefore, we train the baseline detection algorithm and then use those results to train the HFO detection algorithms. The training of baseline detection algorithm involves detecting background without detecting HFOs or spikes. The training of HFO detection algorithms involves detecting HFOs without detecting background. Generally, a detection algorithm is trained to a specific patient to obtain the maximum sensitivity. The baseline detection algorithm is however, trained for a 49

57 group of patients. This relieves the end-user from the burden of training the baseline detection algorithm in addition to the HFO detection algorithm. Training the baseline detection method for a patient group is justified because this method evaluates entropy i.e. the degree of randomness. The amplitude variation between patients and even within a single patient (i.e. different channels) can be large. This is due to biological reasons like the different distances of sensors from EEG sources (within patient), or different kind of EEG sources (inter-patient). However, the entropy or randomness in HFOs/spikes-without-HFO should remain low consistently across patients; otherwise, even the human reviewer would not be able to identify them. Similarly, the entropy or randomness should be high in the background in inter- and intra-patient scenarios. The entropy values are calculated using autocorrelation co-efficients (a normalized measure) and are therefore less sensitive to variations in amplitude across and within patients. Therefore, an ideal entropy threshold might exist which could be applied universally to any patient and in any channel to detect background. The HFO detection algorithms are trained to each patient. These should not be trained for a group of patients due to the biological differences highlighted in the last paragraph. The HFOs in different patients can have different amplitudes. The success of HFO detection critically depends on whether the power levels contained in HFOs can be separated from that of the baselines or not. Hence, the end-user will need to train HFO detection algorithms for each patient to maximize detection sensitivity. To summarize, we first train the baseline detection algorithm to discover optimal entropy threshold and baseline duration that are valid for all patients in our study. Following training, using the optimal parameters, the baselines are then detected in each patient (training dataset). The training of the HFO detection algorithms is then done and the optimal parameters in each patient. The training of HFO detection algorithms are followed by that for the HFO detection algorithms. 50

58 2.4.1 Baseline Detection The baseline detection algorithm detects portions of background EEG. However, to train it, we use the information about the visually identified background and HFOs/spikes-without-HFOs. The main parameter in the algorithm is the NME threshold. If a suitable value of NME threshold is determined that can separate the background from HFO/spikes, then optimal baseline detection is possible. Intuitively, as HFOs and spikes have less randomness, their distribution should have a lower mean NME value than that for the background. The distributions of both HFO/spike-without-HFO and background are computed only using the training dataset. We determine the NME threshold value by detecting the end of overlap between the two distributions. The NME threshold value so determined can then be used to detect baselines in both training and validation datasets. The baseline detection algorithm has two parameters namely, the length of the baselines (δ) and NME threshold (μ thresh %). Consider a set of EEG segments such that each segment contains either a spike-without-hfo or an HFO as classified by the reviewer. Furthermore, let the spike or HFO be located in the middle of each segment and the duration of the segment be fixed at δ. Let Y 1 represent the distribution of NME corresponding to all such segments. Similarly, consider the set of EEG segments of duration δ such that each is a portion of background as classified by the reviewer. Let Y 2 represent the distribution of NME corresponding to all such segments. If the value of NME threshold is set to the maximum NME value in Y 1, then the number of poor baselines detected will be zero. However, the NME threshold must be conservative enough to allow sufficient detection of valid baselines across all patients. Below, we describe a method that meets this global requirement on the NME threshold. 51

59 For the i th patient Let 1i 1i μ = Y ( g) Y ( g) 1i dg dg Y ( g) 1i μ Y ( g) 1i dg F ( μ ) = as NME values can only range dg between 0 and 100 %. and F 2i ( μ ) 2i μ = Y Y 2i ( g) ( g) dg dg = Y 2i μ Y 2i ( g) ( g) dg dg where F(μ) denotes the proportion of EEG segments with NME greater than μ in the distribution Y. As can be seen from the above equations, when μ increases (decreases), the value of F(μ) decreases (increases). F(μ) is the complementary cumulative distribution function. This is graphically explained in Figure 17 using hypothetical NME distributions in a single patient. 52

60 Figure 17: A hypothetical example showing two NME distributions. A) Y 1 (red) and Y 2 (green) are the distributions of NME values. The range of NME is from 0 to 100%. The red and green areas are equal to 100%. In this particular case, μ thresh is shown using a solid vertical line. B) F 1 (red) and F 2 (green) are the red and green areas respectively located to the right of the solid line (μ thresh ) in A. As a result, F is a monotonically decreasing function with increasing values of NME. F 1 is zero for NME values higher than μ thresh. The value of F 2 at μ thresh is the percentage of background segments that are acceptable as baselines. This value is the same as the green area in A to the right of the μ thresh line. In A, if μ thresh line is moved to the left, then red and green areas increase. If the μ thresh line is moved to the right, these areas decrease. An increase in the red area means that some HFO or spike-without-hfo segments are used as baselines (erroneous). An increase in the green area implies that more background segments are used as baselines (correct). To use only background segments and not HFOs or spikes-without-hfo segments as baselines, the desirable threshold value is such that the red area to right of μ thresh line is zero in A or the red curve has reached zero in B. However, any threshold value that is higher than this desirable threshold value is also valid except that the number of background segments useful as baselines would decrease. The proportion of background segments useful as baselines is defined as the baseline sensitivity. Now choose μ i such that F 1i (μ i ) = 0.0, i.e. the proportion of EEG segments, containing high frequency transients, with NME higher than μ i is zero. Then we have μ i for i = 1,2,3...5 Next, find the global maximum of NME (μ global ) amongst all the patients, i.e. 53

61 μ global μ i for i=1,2,3 5 Since μ global was calculated for a particular value of δ, we will use μ global (δ), and sensitivity defined as ( μ ( )) Sens i ( δ ) = F2 i global δ (24) Next, let Sens min (δ) be the global minimum sensitivity for a given δ, i.e. Sensmin ( δ ) Sensi ( δ ) for i=1,2,3..5, and the patient with minimum sensitivity be m(δ). Then, δ optimal is given by δ optimal = arg max Sensmin ( δ ) δ and μ = μ δ ) optimal global ( optimal This method is graphically explained in Figure 18 using synthetic data for two hypothetical patients. If Sens min (δ) = 0, for all values of δ, then μ global (δ) should be reduced appropriately till the Sens min is sufficient. Alternatively, a longer EEG dataset can be used for training. It must also be noted that the detection of correct baselines is far more critical than detection of enough baselines. For this reason, the baseline detection training maximizes the sensitivity with the constraint of zero detection of HFOs and spikes. In the above method, we assume that the tail of the distributions of HFOs and spikes-without-hfos, Y1, has the same upper limit for both the training and validation datasets within the i th patient and also valid for all patients. 54

62 A B C 55

63 Figure 18: Baseline detection training using two hypothetical patients. A) The NME distributions generated using δ = 150 ms and corresponding to HFOs/spikes-without-HFO (red) and Background (green) are shown for both patients. The solid vertical black bar is the location of NME threshold in each patient. This location is that where the tail of the red distribution reduces to 0. For Patient 1, the NME threshold is denoted using μa and in Patient 2 as μb. As μa > μb, μglobal is equal to μa. μglobal is shown as the red dashed line in both patients. The complementary cumulative distribution function for both patients is the area of the hatched region in green distribution. The hatched region is the sensitivity defined in equation 24. B) The top plot shows the plot of NME threshold vs. δ. This plot is formed using the NME thresholds in the NME distributions of both patients as δ is varied. The dashed black line is the μglobal. The bottom plot shows the sensitivity values plotted as a function of δ. The dashed black line is Sensmin which is found by determining the minimum sensitivity in both patients. δoptimal is that value for which Sensmin is maximized. This value is shown using a dotted vertical line. The optimal μglobal value, i.e. μoptimal is the μglobal corresponding to the δoptimal. μoptimal is shown as the dotted horizontal line in the top plot. In the bottom plot, the sensitivity for both patients follows a similar trend. This is because the sensitivity is being controlled using μglobal value from the top plot. When μglobal increases, the sensitivities decrease in both patients, and when μglobal decreases, the sensitivities increase. The kinks in the sensitivity values are due to the kinks in the μglobal values. C) The NME distributions generated using δ = 275 ms and corresponding to HFOs/spikeswithout-HFO (red) and Background (green) are shown for both patients. These plots are very similar to A except that in this example, μd > μc and therefore, μglobal is equal to μd (Patient 2). 56

64 2.4.2 High Frequency Oscillation Detection For training HFO detection algorithms, events classified by the human reviewer are used. Recall from section 2.2 that our human reviewer classified the EEG into four main categories, namely background, HFOs (subtypes Oscillations and Spike-with-HFOs), spikes-without-hfos, and grey areas. To compare HFO detections and reviewer s classifications, background events are Negatives and HFOs are Positives. Spikes-without-HFO are used only in the validation process to detect the sensitivity to spikes. Grey-area events are ignored completely. HFO detection software produces a list of probable-hfos with their location and duration. Probable-HFOs could overlap with the Positives, Negatives, spikeswithout-hfo, or grey-areas described above. True Positives are those probable- HFOs which overlap with at least one Positive event. False Positives are those probable-hfos which overlap with at least one Negative event. Detected Positives are those Positives which overlap with at least one probable-hfo. Probable-HFOs detected in the grey areas are ignored all together, since it is unknown if they are True Positives or False Positives. Probable-HFOs detected in the spikes-without-hfo category are used in validation. The definitions of Positives, Negatives, True Positives, False Positives, and Detected Positives are illustrated in Figure 19. Figure 19: The classification scheme is shown for a segment of EEG (filtered). The background, HFO, and grey areas were classified visually. Background is shown in green. HFO is shown in pink. Grey-areas are shown in grey. Automatic Detections are shown n blue. In this figure, there is one Positive (pink segments), two Negatives (green segments), two True Positives (blue segments overlapping with pink segments), one Detected Positive (pink segments overlapping with blue segments), one False Positive (blue segments overlapping with green segments), and one Grey-Area Event (blue overlapping with grey segments). 57

65 To quantify the performance, sensitivity and false discovery rate are computed in the i th patient as follows: DPos( i) Sensitivit y( i) = 100 Pos( i) (25) FDR( i ) FP( i ) = 100 TP( i ) + FP( i ) (26) where DPos are the number of Detected Positives, Pos are the total number of Positives, TP are the number of True Positives, and FP are the number of False Positives. The description of these values is provided in Figure 19. When the parameter values of the HFO detection algorithms are changed, sensitivity and false discovery rate also change accordingly. The parameter values for which the difference Sensitivity(i) FDR(i) is maximum are considered the optimal parameter values in the i th patient. We denote this difference as performance measure. Its theoretical range is between -100 and 100. Performance measure in terms of Receiver Operating Characteristic (ROC) curves is normally calculated using sensitivity and specificity. However, in our case, the performance measure is calculated using false discovery rate instead of specificity. We explain this as follows: HFO detection is an example of rareevent detection. This means that the overall duration of HFOs (Positives) is much smaller than that of the background (Negatives). As a result, the probability of an unclassified EEG segment being a Positive is much smaller than the segment being a Negative. As the two probabilities are not equal, the calculation of specificity will be biased. However, as evident from equation 26, the false discovery rate does not depend on the duration or the number of Negatives and is therefore not affected by the disparity between Positives and Negatives in rareevent detection scenarios. Therefore, we chose false discovery rate to calculate the performance measure. 58

66 Training is done for the two operating modes i.e. time-invariant and time-variant in both HFO detection algorithms. In all, we do the training for four scenarios Filter method The reader is referred to section for a detailed operation of the Filter method. This method has two parameters namely power scale (β) introduced in equations 13 and 15, and number of wave-cycles (c) introduced in equation 19. c is fixed at 3. β is varied and the optimal value that maximizes the performance measure is determined for each patient independently. As β is increased, both sensitivity and FDR decrease and when β is decreased, both sensitivity and FDR increase. The test values of β and c were determined using trial and error in datasets that are not used in this study. Values of β are: 1,2,3 19,20,25,30, 50. Total parameter value combinations: Wavelet method The reader is referred to section for a detailed operation of the Wavelet method. When the standard deviation of the Gaussian window in the Morlet mother wavelet is unity, the expression 2πf 0 represents the ratio of center frequency to bandwidth. We denote this as frequency to bandwidth ratio or FBR. Wavelet method has three parameters namely FBR, β, and c. The values of FBR, β (equations 13 and 15), and c (equation 22) are varied and the optimal values are determined for each patient independently. The variation of FBR has a complicated effect on sensitivity and FDR. The variation in FBR is essentially matching a sinusoidal pattern to HFOs. Depending on the type of HFOs prevalent in the patient, certain values of FBR may have a higher sensitivity than others. Same is true of the FDR. Therefore, the variation of FBR affects sensitivity and FDR in a patient-specific manner. Increasing (or decreasing) β causes both 59

67 sensitivity and FDR to increase (or decrease). Increasing (or decreasing) c causes both sensitivity and FDR to decrease (or increase). The test values of FBR, β, and c were determined using trial and error in datasets that are not used in this study. Values of FBR are 7, 9, 11, 19. Values of c are 3,4,5,6. Values of β are 1,2,3 19,20,25,30, 50. Total parameter value combinations: Validation Methods The goal of validation is to test the algorithms on a testing or validation data set which have never been used in training to objectively determine the performance. The performance of detection algorithms on the validation dataset are an indication of the performance on datasets used in the future. During validation, we assume that the statistical properties of the training dataset are the same as that of the validation data. We also assume that the noise properties remain the same. The validation procedure of the baseline detection algorithm is different from that of the HFO detection algorithms Baseline Detection Performance Using μ optimal and δ optimal, the baseline detection algorithm is used to detect the baselines in the validation datasets of all the patients. Recall that the baselines in the training datasets have already been detected using the optimal values in the previous section. The accuracy of the baseline detection is determined by comparing the location of the baselines to that of the visually classified EEG events: background, HFOs, spikes-without-hfo, and grey-areas. Valid baselines are those EEG segments which only coincide with background. Poor baselines are those EEG segments which overlap with HFOs or Spikes-without-HFO irrespective of overlap with background or grey-areas. We prefer the term poor instead of invalid because theoretically-speaking, HFO detection is still possible using poor baselines as the separation between the power levels of poor baselines 60

68 and HFOs is small and simply depends on the appropriate scaling of reference power. The EEG segments which overlap with grey-areas and possibly partial overlapping with background are unclassifiable as valid or poor. An example is shown in Figure 20. Figure 20: The classification scheme is shown for a segment of EEG (filtered). Background is shown in green. HFO is shown in pink. Grey areas are shown in grey. Automatically detected baselines are shown in orange. In this figure, there are five valid baselines (orange segments contained in green segments), one poor baseline (orange segments overlapping with pink segments), and one unclassifiable baseline (orange segments overlapping with grey segments). The baseline accuracy BAccur in the i th patient is computed as follows: BAccur( i ) DurVB( i ) = 100 DurVB( i ) + DurPB( i ) (27) where DurVB is the total duration of Valid Baselines and DurPB is the total duration of Poor Baselines. Examples of Valid Baselines and Poor Baselines are shown in Figure 20. BAccur is computed for training and validation datasets separately. For detecting baselines, maximizing accuracy is more important than sensitivity. In other words, it is acceptable to miss the detection of potentially valid background sections if it also prevents the detection of poor baselines HFO Detection Performance The optimal parameter values are used to detect HFOs in the validation datasets. Post detection assessment of probable HFOs as True Positives and False Positives is done. The assessment of Detected Positives is also done. Using post-detection 61

69 assessment, the resulting sensitivity and false discovery rate values are determined for validation dataset in each patient and in both time-invariant and time-variant modes. To assess if the HFO detection algorithms could discriminate between HFOs and spikes-without-hfo, an additional performance analysis is done. The percentage of spikes without-hfo misclassified as HFOs is calculated in each patient for both manual and automatic baseline scenarios. The sensitivity SpSens to detect spikes-without-hfo in the i th patient is computed as follows: DSp( i ) SpSens ( i ) = 100 Sp( i ) (28) where DSp is the number of spikes-without-hfo that overlap with at least one probable-hfo, and Sp is the total number of spikes-without-hfo. SpSens is calculated in training and validation datasets separately. SpSens can range between 0 and 100. High values of SpSens indicate poor discrimination between spikes-without-hfo and HFOs and are undesirable. The detections in spikeswithout-hfo are not treated as False Positives because these detections are not as critical as the false detections in the background. 2.6 Summary In this chapter we described the methodology used in our study. We have described materials, the EEG review process, details of detection algorithms, and the training and validation of the algorithms. In materials, we used intracerebral EEG data from five patients. The data from patient was ten minutes long and was then divided equally into training and validation datasets. In training and validation datasets, the reviewer visually identified the following events: background, HFOs, spikes-without-hfo, and grey areas. The training dataset was used to determine optimal parameters of the detection algorithm while the validation dataset was used to test the performance of the optimal parameters. 62

70 The algorithms included baseline detection and HFO detection algorithms (Filter and Wavelet methods). The baseline detection algorithm detects baselines which are portions of background. These portions of EEG whose autocorrelation coefficients had high values of wavelet entropy were detected and these portions were assumed to contain no HFOs or spikes. The baselines so detected were used to compute reference power for the HFO detection algorithms. Each HFO detection algorithm could operate in two modes, time-invariant or time-variant. In the time-invariant mode, the spectral powers from all baselines were averaged and scaled to compute reference power. In the time-variant mode, the spectral powers from only a pair of successive baselines were averaged. The HFO detection algorithms were of two types, the Filter method and the Wavelet method. In the Filter method, Ripple and Fast Ripple bandpass filters were used to compute EEG spectral power. When the EEG spectral power exceeded the reference power levels (in a given operating mode) in the two filters, such portions were detected as HFOs. In the Wavelet method, Morlet wavelet was used for a range of discrete pseudo-frequencies. A three dimensional timefrequency representation of the EEG spectral power was computed. Local maximums in this 3D surface are identified and if these are above the reference power surface (in a given operating mode) then the maximums were detected as HFOs. In the training methods, the information from the visual classification of EEG was used from the training datasets. The parameter values of the detection algorithms were modified until the number of Positives detected was maximized while the number of False Positives was minimized as much as possible. The parameter values were considered optimal when the discrimination between desirable and undesirable events was maximized in the training dataset. Using the optimal parameter values, the detection algorithms were used in the validation dataset. By measuring the performance in the validation dataset, an unbiased estimate of the detection performance was done. 63

71 The results of the application of algorithms in both training and validation datasets are described in the next chapter. 64

72 3 Results In the last chapter, we described the methodology used in this study. We provided details regarding patients and materials, EEG review process, algorithms (baseline and HFO detection), training methods, and validation methods. In this chapter, we provide the results of the classification done by the reviewer. We also describe the results of training and validation of the baseline detection and HFO detection algorithms. We show several examples of expected detections and incorrect/missed detections. We selected examples that best illustrate the functioning of the algorithms. 3.1 Data Properties The results of human reviewer s classification of EEG into categories namely, background, HFOs, and spikes-without-hfo are shown in Table 1 (training dataset) and Table 2 (validation dataset). The tables indicate the following per event type: number of discrete events, the duration, and the average duration. In addition, the last column in each table shows the total duration of the EEG used. This duration is a multiple of 300 seconds (i.e. five minutes) depending on the number of channels. From Table 1 and Table 2 it is seen that most of the EEG contains background and grey areas. HFOs and spikes-without-hfos form only a small fraction of the total EEG. However, compared to HFOs, spikes-without- HFOs occur less frequently as seen from the total duration and the number of events in each category. From the average duration of the event-type, the spikeswithout-hfos appear to have the shortest durations, then the HFOs, and lastly the background. Key for Table 1 and Table 2: PI: Patient index NEvts: Number of events of a given type in all channels. AvgED: Average Event Duration. Units: milliseconds TotED: Total Event Duration. Units: seconds TotDur: Total Duration of EEG, i.e. five minutes times the number of channels. Units: seconds 65

73 HFOs Spikes-without-HFO Background Grey Areas PI AvgED TotED NEvts NEvts AvgED TotED NEvts AvgED TotED TotED (ms) (s) (ms) (s) (ms) (s) (s) TotDur (s) Table 1: Results of reviewer's classifications in the Training Data. HFOs Spikes-without-HFO Background Grey Areas PI AvgED TotED AvgED TotED NEvts NEvts NEvts AvgED TotED TotED (ms) (s) (ms) (s) (ms) (s) (s) TotDur (s) Table 2: Results of reviewer's classification in the Validation Data. 3.2 Baseline Detection Training The baseline detection algorithm has two parameters, NME threshold and baseline duration. As described in 2.4, we expect the values of NME threshold and baseline duration to be valid for all patients in this study, i.e. optimal for the patient group. We use Figure 21, Figure 22, and Figure 23 to compute the values for these parameters that are optimal for our group of patients. Figure 21 shows the value of NME threshold as a function of baseline duration for each patient. The global NME threshold is shown as the black line. The global NME threshold is optimal at each value of baseline duration. This means that for a given baseline duration, the HFO segments in all training datasets will have an NME value lower than the global NME threshold (for that baseline duration). However, not all baseline durations can be optimal. To determine the value of optimal baseline 66

74 duration, the proportion of background segments with NME above global NME threshold needs to be maximized. In Figure 22, for each baseline duration value, the percentage of background segments with NME greater than the global NME threshold was plotted in each patient; this percentage represents the proportion of background segments that are acceptable as baselines. Note that for each baseline duration value, the global NME threshold was the value of the black line from Figure 21 for that baseline duration. In Figure 22, the black line indicates the patient with the minimum proportion of acceptable background segments (whose NME exceeded the threshold). This is the global minimum proportion of acceptable background segments. For example, if this value is 10 % at a baseline duration of 100 ms, it means that in every patient, at least 10% of background segments had NME values above the global NME threshold (at 100 ms) and were therefore acceptable. The optimal baseline duration was determined when this black line reached a maximum. This occurred for baseline duration of 84 ms. The optimal NME value is the global NME corresponding to optimal baseline duration in Figure 23 (replica of Figure 21) and is equal to 69.1%. We emphasise that training of the baseline detection algorithm for a group results in parameter values which are sub-optimal in the individual patient. By suboptimal in this context, we mean that in each patient the sensitivity of baseline detection can be more than that resulting from the training. However, achieving the maximum possible sensitivity of baseline detection may not improve the HFO detection noticeably as the HFO detection needs enough baselines as input rather than the maximum possible number of baselines. For this reason, as long as a minimum sensitivity of baseline detection, as determined by the user, is obtained in each patient, the HFO detection performance will not change significantly. 67

75 Figure 21: Normalized Minimum Entropy threshold parameter (μ thresh ) as a function of baseline duration Here, NME threshold (μ thresh ) is chosen in each patient for a given δ such that only the segments of the background class are selected. In other words, we are minimizing the percentage of poor baselines to 0. μ global, represented by the black line, is the maximum threshold that ensures a 0% poor baseline in each patient, for a given δ value. Figure 22: Percentage of background segments that have an NME value higher than μ global (δ) at a given δ in each patient. The Global Min is represented by black line which tracks the patient with minimum percentage of background segments for each δ value. For most of δ values, patient 4 has the minimum percentage of valid baselines, and therefore, the magenta line is superimposed by the black line. Optimal μ global and δ were selected by identifying when Global Min was maximized as a function of δ. This occurs at δ = 84 ms in patient 4. Figure 23: Using the optimal baseline duration (δ optimal ) from Figure 22, optimal NME threshold (μ optimal ) is μ global at δ optimal. This occurs for patient 1 and μ optimal = 69.1%. 68

76 The plots in Figure 22 look similar because they all track a common NME threshold namely, the global NME threshold. The proportion of background segments, with NME exceeding NME threshold, is inversely proportional to the value of NME threshold (section 2.4.1). As a result, when the global NME threshold increases, the sensitivity decreases in all patients, and when global NME threshold decreases, the sensitivity increases in all patients. The baseline detection algorithm was used on both training and validation datasets using the optimal parameters discovered in Figure 22 and Figure 23. The detected baselines were classified as valid or poor and the accuracy of baseline detection was computed. This is shown in Table 3. Key for Table 3: PI: Patient index DurVB: Total duration of valid baselines. Units: seconds DurPB: Total duration of poor baselines. Units: seconds BAccur: Baseline detection accuracy as defined in section 2.5. Units: percentage PI DurVB (s) Training Dataset DurPB (s) BAccur (%) DurVB (s) Validation Dataset DurPB (s) BAccur (%) Mean 98.7 Mean 99.3 Median 99.4 Median 99.9 Table 3: Summary of the baseline detection performance on training and validation datasets. Table 3 shows that the baseline accuracy is high in both training and validation datasets. Generally, the performance of an algorithm is lower in the validation dataset compared to the training dataset; in our case the mean and median values 69

77 of accuracy are higher in the validation dataset. The durations of valid baselines are also consistently higher in the validation dataset compared to the training dataset. This may either be due to a non-significant statistical variation between the training and validation datasets; or be due to the variability in the classification-performance done by the reviewer. The training datasets were always reviewed before the validation datasets. The quality of classifications may be different in the two cases if the reviewer got better at classifications in validation dataset as she learned when classifying the training datasets. Figure 24 shows an example of an EEG section where baselines (orange) were detected automatically. In this example, most baselines were true baselines as they were coincident only with the background (green). Two baselines overlapped with the grey-area (grey) and were unclassifiable. 70

78 Figure 24: Example of baseline detection. Baseline detection was done in patient 2 (training dataset, channel: LA1-LA2). Ten seconds of EEG data is shown. The top plot shows the unfiltered EEG data and the bottom shows the high pass filtered EEG (80 Hz). The events are shown in color at both top and bottom. The background is in green; HFO is in pink; grey areas are in grey; and automatically detected baselines are in orange. In this particular example, most of the automatically detected baselines (orange) overlap only with the background (green) segments and are therefore, valid baselines. There are only two orange segments that are non-valid baselines. These are shown in red ellipse and as they overlap with grey areas, these baselines are unclassifiable. In this example, no baselines overlap with HFOs. As the accuracy of the baseline detection is quite high, there are only a few examples of poor baselines. Figure 25 shows an example of a poor baseline. The unfiltered EEG is shown on the top and a filtered version (high-pass 80 Hz) is shown at the bottom. The HFOs, as classified by the reviewer, are shown in pink. In the leftmost HFO, there is no single dominant rhythm. This HFO consists of short rhythms of varying frequencies. Due to the absence of a single dominant rhythm and the presence of multi-frequency rhythms, in baseline detection 71

79 method, the autocorrelation co-efficients were low. Low values of autocorrelation co-efficients led to high values of wavelet entropy. Figure 25: Example of a poor baseline overlapping with HFO. Baseline detection was done in patient 1 (training dataset, channel: RH1-RH2). Unfiltered EEG is at the top and high pass filtered EEG is at the bottom. Three HFOs as identified by the reviewer are shown in pink. The leftmost HFO (also the longest) overlaps with one automatically detected Baseline (orange). This baseline is therefore a poor baseline. This baseline was detected because the filtered signal in the leftmost HFO does not appear to have a stable dominant frequency. The arrows show the portions of HFO that have different frequencies. The assumption that HFOs contain only a single dominant rhythm is not applicable here and leads to the detection of a poor baseline. The baseline was detected using NME threshold of 69.1% and its NME value was 69.8%. Such HFOs were extremely rare in the datasets but were nevertheless present. Several other examples of baselines are described in the following sections when discussing their effect on HFO detection performance. 3.3 HFO Detection In the previous section, we showed examples of baselines that were automatically detected in the EEG of training and validation datasets. The HFO detection algorithms critically depend on these baselines to detect HFOs. HFO detection 72

80 algorithms use baselines to determine a reference, based on which the HFOs are detected. We have described two HFO detection algorithms (Filter and Wavelet) in the previous chapter. We also described two methods for computing the reference power from the baselines (time-invariant and time-variant modes). As a result, four scenarios are possible depending on the combination of one HFO detection method and one reference power computation method (mode). One goal of this thesis is to determine which of these scenarios is best suited for HFO detection. As a first step, we determined the optimal parameter values in each scenario for each patient. This is done using the training dataset. In each patient s training dataset, an HFO detection algorithm was used using either time-invariant or timevariant mode. The HFO detection algorithm was applied repeatedly for different parameter values. By doing this, the sensitivity and false discovery rates were computed in each patient s training dataset for a given HFO detection method and reference power computation method. Sensitivity is defined as the proportion of Positives (HFOs as classified by the reviewer) that were detected automatically as probable HFOs. False discovery rate is defined as the proportion of probable HFOs overlapping with the Negatives (background as classified by the reviewer). Generally, both sensitivity and false discovery rate increase and decrease simultaneously as a parameter value is varied. However, the rate of increase/decrease for sensitivity is different from that of the false discovery rate. As a result, it is possible to achieve an optimal trade-off where the sensitivity is sufficiently high and the false discovery rate is acceptably low. To observe the trade-off, we plotted sensitivity vs. false discovery rate in Figure 26. In the left column, the graphs corresponding to the time-invariant mode are shown and in the right, the graphs corresponding to time-variant mode are shown. Each row corresponds to the results in training-dataset of a single patient. In each graph, a dot corresponds to particular value of parameter set and is plotted according to the sensitivity and false discovery rates achieved. The color of the dot indicates the method used and details are provided in the legend. In each 73

81 graph, a green dashed-diagonal is shown that represents the line of nodiscrimination. Dots located above the diagonal implied that the detection of HFOs was better than chance and the ones located below implied that the detections were worse than chance. The best dot is the one located furthest away from the diagonal and above it. Using simple geometrical arguments (Appendix B), it can be seen that the distance between the dot and the diagonal is proportional to the difference between the dot s ordinate and abscissa. Therefore, for optimal HFO detection, we are interested in maximizing the difference between Sensitivity (ordinate) and False Discovery Rate (abscissa). The best dot (parameter set) is shown in red and its location is shown using red dashed lines. The parameter value set corresponding to the best dot is the last entry in the legend. 74

82 75

83 76

84 Figure 26: Sensitivity vs. False Discovery Rate. Columns: Left is time-invariant mode and Right is time-variant mode. Rows: Each corresponds to a patient. The dots in all the graphs represent the sensitivity and false discovery rate corresponding to a particular parameter set. In all the graphs, the dots correspond to the training dataset. The optimal parameter set corresponds to the dot (red) that is furthest away from the green dasheddiagonal, and is indicated as the final entry in the legend. The legend indicates the method used. In the case of the Filter method, this corresponds to the entry Filter. In the case of Wavelet method, the entry is of the form Wavelet-FBR, where the value of the FBR parameter used has been substituted. In the legend entry corresponding to the optimal parameter set, cycles is the number of wave-cycles c and scale is the power scale β. 77

85 For the same false discovery rate, the dots in the graphs on the left side have a higher sensitivity than those on the right. This implies that the performance in general was better for time-invariant than time-variant mode irrespective of Filter or Wavelet method. In patient 3, most dots corresponding to the Wavelet method are below the dashed-diagonal. This implies that the Wavelet method performed worse than chance in this patient. In patient 5, in the time-variant mode, all the dots are located towards upper-right corner. This implies that the performance of both Filter and Wavelet was poor in this case. In most of the graphs, the Filter method performs better than the Wavelet method. The method (Filter or Wavelet) with the best performance in the training-dataset for a given patient and a given mode (time-invariant or variant), was selected and was similarly applied in the validation dataset for the same patient. The validation dataset had not been used in any form of training, and therefore qualified the performance objectively. The performance of optimal methods in validation dataset was fairly consistent in all patients except in the time-invariant case for patient 5. These results have been summarized in Table 4 (time-invariant mode) and Table 5 (time-variant mode). The average sensitivity and false detection of the optimal methods using the validation dataset in the time-invariant mode are 85.2% and 20.1% respectively (Table 4). The analogous values in the time-variant mode are 81.0% and 29.2% (Table 5). In addition to the sensitivity and false discovery rates, spike sensitivity has also been indicated in Table 4 and Table 5. Recall that spike sensitivity is the proportion of spikes-without-hfo that have been misclassified as HFOs by HFO detection algorithms. Therefore, high values of spike sensitivity indicate poor spike-rejections. The average spike sensitivity in the validation dataset for timeinvariant mode is 70.4% and for time-variant mode is 67.0%. 78

86 Key for Table 4 and Table 5: PI: Patient Index BestPar: Best Parameter as found through training dataset. If Wavelet method was found to be the best method, then the parameters FBR, c,β, were abbreviated as W-FBR(c,β). If Filter method was found to be the best method, then the parameters c,β, were abbreviated as F(c,β). Sens: Sensitivity of HFO detection. Units: Percentage FDR: False Discovery Rate of HFO detection. Units: Percentage SpSens: Spike sensitivity, i.e. the percentage of spike-without-hfo detected as HFO. Units: Percentage PI BestPar Sens (%) Training Dataset FDR (%) SpSens (%) Sens (%) Validation Dataset FDR SpSens (%) (%) 1 W-11(3,12) F(3,9) F(3,18) F(3,11) F(3,19) Mean, Median 86.5, , , , , , 73.3 Min-Max Table 4: Summary of the HFO detection performance for both training and validation datasets (time-invariant mode). PI BestPar Sens (%) Training Dataset FDR (%) SpSens (%) Sens (%) Validation Dataset FDR SpSens (%) (%) 1 W-11(3,18) F(3,12) F(3,25) F(3,25) W-17(6,19) Mean, Median 79.5, , , , , , 66.7 Min-Max Table 5: Summary of the HFO detection performance for both training and validation datasets (time-variant mode) 79

87 As can be seen from Table 4 and Table 5, HFO detection performance (sensitivity and false discovery rates) in training and validation datasets can be quite different for the same set of parameters, e.g. in patients 3 and 5. This could be due to two possibilities. In the first, there may be stark differences in the datasets in terms of spectral and statistical properties of EEG. This may cause differences in various quantities like the reference power, HFO power, HFO duration, etc. In the second possibility, there may be differences in the quality of classifications by the reviewer. It is particularly difficult for a reviewer to maintain consistency in EEG classification because the reviewer is learning at the same time, and the classifications tend to improve with experience. The data of each patient is unique and therefore the HFO detection performance must also be different in each patient. Due to differences in HFO detection performance within and between patients, Table 4 and Table 5 may not reveal the parameters that are robust in a group of patients. To discover the robust parameters, we use the Performance Measure of both training and validation datasets. Recall that the Performance Measure is the difference between Sensitivity and False Discovery Rate in either training or validation dataset. In a given patient, the Performance Measures of the training and validation datasets can be averaged. If this average is high, then the parameter set leads to consistent performance in both training and validation datasets. Furthermore, if the mean of Performance Measure values is high acrossand within-patients (i.e. in all training and validation datasets), then the parameter set is robust. We computed the mean of Performance Measure values using the datasets of all patients for every parameter set, in the time-invariant mode. In Table 6, the five parameter sets for the Filter method with the highest average performance are shown. The top row has the best parameter set in a global sense, and the bottom row has the fifth best parameter set. Similarly, in Table 7, five parameter sets are shown for the Wavelet method. 80

88 The best parameter set in Filter method is β = 17, c = 3, and that in Wavelet method is FBR = 13, β = 35, c = 3. The means of sensitivity, false discovery rate, and spike sensitivity in the best parameter set for Filter method are 75.9%, 10.6%, and 71.9% respectively. The same values in the best parameter set for Wavelet method are 70.8%, 13.1%, and 58.9%. Only the time-invariant mode was studied in this manner because the performance was consistently better in this mode than in the time-variant mode. Our results indicate that the Filter method has a better correspondence to the visual identification compared to the Wavelet method. Key for Table 6 and Table 7: Sens (mean, median, min-max): Mean, median, minimum, and maximum of the sensitivity values in all patients (both training and validation datasets). FDR(mean, median, min-max): Mean, median, minimum, and maximum of the false discovery rates in all patients (both training and validation datasets). Perf Measure(mean, median, min-max): Mean, median, minimum, and maximum of the performance measure, in all patients (both training and validation datasets). SpSens(mean, median, min-max): Mean, median, minimum, and maximum of the spike-sensitivity, in all patients. Spike sensitivity is the percentage of spikeswithout-hfo detected as HFO. Units: Percentage Ind β c Sens (Mean,Median, Min-Max) 75.9, 75.9, , 76.8, , 75.3, , 79.8, , 75.9, FDR (Mean,Median, Min-Max) 10.6, 2.3, , 2.1, , 1.7, , 5.3, , 3.1, Perf Measure (Mean,Median, Min-Max) 65.3, 65.3, , 63.2, , 62.2, , 69.5, , 66.0, SpSens (Mean,Median, Min-Max) 71.9, 73.7, , 73.0, , 73.0, , 74.7, , 73.7, Table 6: Top five parameter sets for filter method (time-invariant mode) based on consistency across patients. The rows are arranged from top to bottom in the decreasing order of the mean of Performance Measure values. 81

89 Ind FBR β c Sens (Mean,Median, Min-Max) 70.8, , 73.9, , 70.4, , 66.4, , 65.4, FDR (Mean,Median, Min-Max) 13.1, 7.8, , 11.2, , 9.7, , 4.9, , 4.3, Perf Measure (Mean,Median, Min-Max) 57.7, 62.9, , 65.2, , 62.4, , 61.2, , 60.3, SpSens (Mean,Median, Min-Max) 58.9, 61.8, , 65.5, , 66.0, , 56.3, , 53.0, Table 7: Top five parameter sets for Wavelet method (time-invariant mode) based on consistency across patients. The rows are arranged from top to bottom in the decreasing order of the mean of Performance Measure values. We now present several examples where HFO detection algorithms worked well. We also show examples where an HFO could not be detected, background was detected as HFO, and also where a spike-without-hfo was detected as HFO. We use a color scheme to highlight the overlap between the events classified by the reviewer and those by the detection algorithms. The colors for the events identified by the reviewer are as follows: green for background, pink for HFO, sky-blue for spike, and grey for grey areas. The colors for automatically detected events are as follows: orange for baselines, light blue for probable HFO Ripple, and dark blue for probable HFO Fast Ripple. The events are indicated at the top of the figure and replicated at the bottom for convenience. In most figures, the unfiltered EEG is shown as the top plot and the filtered version as the bottom plot. The filtered EEG was obtained using a high-pass filter with cut-off at 80 Hz and this filter was used to simulate the setup of the reviewer during visual identifications. The filtered EEG is also necessary for the reader to conveniently locate HFOs. On the other hand, unfiltered EEG is necessary to observe spikes. The scales for horizontal (time) and vertical (amplitude) axes are also shown. The gain for vertical axes in the filtered EEG is generally lower than 82

90 that of the unfiltered EEG. This is done to easily identify HFOs and other events. As the HFO detection algorithms had lower performances for patients 3, 4 and 5, we show more examples from these patients. Some examples of correct detection of HFOs are shown in Figure 27 and Figure 29. HFOs with large peak amplitudes were easily detected by both Filter and Wavelet methods. For HFOs with low peak amplitude but clear rhythmicity, Wavelet method was more sensitive than the Filter method. An example of a failed detection is shown in Figure 28. Figure 27: Example of correct HFO detection. Filter method (optimal β=12, c=3, timevariant mode) was used in patient 2 (training dataset, channel: LA1-LA2). Unfiltered EEG is at the top and high-pass filtered EEG is at the bottom. The amplitude gain for filtered EEG is higher than the gain for unfiltered EEG. An HFO as marked by the reviewer is shown in pink. As this is a time-variant mode, the adjacent left and right baselines used to compute the reference power level are also shown (orange). Both baselines are valid. The Filter method detected Probable HFO Ripple and Probable HFO Fast Ripple. Probable HFO (Ripple) is in light blue and Probable HFO (Fast Ripple) is in dark blue. Both Probable Ripple and Probable Fast Ripple have a good deal of overlap with the HFO marked by the reviewer. Good detection occurred because the given baselines (filtered EEG) have much lower amplitudes than the HFO (filtered EEG). Whenever this is the case, the detection quality will be good. 83

91 Figure 28 shows an example of two HFOs that were not detected by Filter and Wavelet methods operating in the time-variant mode. One of the two baselines shown overlaps with an HFO. As a result, the reference power is too high for the detection to occur. The same section of EEG is shown again in Figure 29 where HFO detection algorithms are now used in the time-invariant mode. In this case, both HFOs are detected successfully as the reference power estimate is more accurate. For brevity of this chapter, we concentrate on examples from timeinvariant mode, as it seems clearly better than the time-variant mode (see Figure 26 and section 3.3). Figure 28: Example of a False Negative in HFO Detection Example. Filter method (optimal β=25, c=3, time-variant mode) was used in patient 4 (validation dataset, channel: RH1-RH2). Unfiltered (top) and high-pass filtered (bottom) EEGs are shown. Two HFOs are present in this EEG segment. The adjacent left and right baselines are shown. The left baseline overlaps mostly with the background and is essentially a valid baseline. The right baseline, however, overlaps with an HFO and is therefore a poor baseline (see red ellipse). As a result, the reference power was too high for the detection to occur. The HFO on the right side is also not detected for the same reason. 84

92 Figure 29: Example of correct HFO detection. Filter method (optimal β=11, c=3, timeinvariant mode) was used in the same EEG that is shown in Figure 28. HFO detection occurred in this instance and both HFOs are detected. This is indicated by the overlap of Probable HFO (Ripple and Fast Ripple) with HFO, i.e. the overlap of blue segments with pink segments. The overlap between the baseline and HFOs is not critical in this case because the reference power is computed using all baselines and not just the ones shown in this figure. Both HFOs are also detected when Filter method using the parameters from Figure 28 (β=25) is applied in time-invariant mode. Figure 30 shows several examples of False Positives detected by the Filter method in the time-invariant mode. In this case, there is a considerable variation in the background and occasional bursts in oscillatory activity are seen. Figure 31 shows several examples of False Positives detected by the Wavelet method in the time-invariant mode. The EEG in this example is from the same dataset as that in Figure 30. There is considerable variation in the background and several rhythmic bursts are noted. The main reason for false detections is the presence of local maximums due to these bursts. 85

93 Figure 30: Example of False Positives in HFO detection. Filter method (optimal β=19, c=3, time-invariant mode) was used in patient 5 (validation dataset, channel: RH1-RH2). Two seconds long EEG segment is shown. Notice how the background fluctuates considerably. There are local increases in the amplitude which can resemble HFO but were not classified by the reviewer, presumably because of low amplitudes compared to clear-cut HFOs in this patient (an example shown in next figure). Filter method detected such local increases as probable HFOs but they were classified as False Positives as they overlapped with the background. It is interesting to compare the (high) amplitude of filtered background in this example with that in other figures (Figure 27 and Figure 34). 86

94 Figure 31: Example of False Positives in HFO detection. Wavelet method (FBR=7, β=19, c=3, time-invariant mode) was used in patient 5 (validation dataset, channel: RH1-RH2). Two seconds long EEG segment is shown. There is one HFO present which is correctly detected by this method. There are several other local increases in amplitude (ellipses) which can resemble HFO but were not classified by the reviewer, presumably because of low amplitudes (compared to the HFO in this patient). The bottom plot shows the spectral power of the unfiltered EEG computed using the wavelet transform (FBR=7) and also the reference power surface (grey). The colorbar on the right is only applicable to the spectral power surface and not the reference power surface. The arrows show local peaks corresponding to the probable HFOs as classified by the Wavelet method. To prevent the detection of these False Positives, either β or c can be increased. We now show examples of spikes-without-hfo that were correctly rejected by HFO detection algorithms. Figure 32 shows a spike-without-hfo that was rejected by the Filter method as the spike-rejection criteria was met. Figure 33 shows a spike-without-hfo that was rejected by the Wavelet method because there were no local maximums in it that exceeded the reference power. 87

95 Figure 32: An example of spike rejection. A spike-without-hfo is shown in the top plot and obtained from patient 1 (training dataset, channel name: RH1-RH2). The subsequent plots show the smoothed power in Gamma band, Ripple band, and Fast Ripple band. These plots were computed using Filter method (time-invariant mode, c=3, β=17). The reference power in each band is shown as a red-dashed line. The regions marked using green are those peaks that exceeded both the reference power and duration threshold. The peaks are very high and therefore, the reference power line (red dashed) appears to overlap with the smoothed band power. As seen from above, events are detected in Gamma, Ripple, and Fast Ripple bands simultaneously. As a result, the spike rejection criterion was met and this spike was rejected. 88

96 Figure 33: An example of spike rejection. A spike-without-hfo is shown in the top plot and obtained from patient 1 (training dataset, channel name: RH1-RH2). In the top plot, unfiltered and filtered versions are present. The bottom plot shows the spectral power surface computed using Wavelet method (time-invariant mode, FBR=7, c=3, β=19). The reference power is shown as well in grey. In the current perspective, it is easy to see that the spike surface does not contain any local maximums and is monotonically decreasing. As a result, the spike rejection criterion was met and this spike was rejected. Figure 34 and Figure 35 show examples of spikes-without-hfo that were misclassified as probable HFO by HFO detection algorithms. Filter method did not reject these spikes because the spectral power in Fast Ripple band did not exceed its reference power level, while the spectral power in Gamma and Ripple bands exceeded their respective reference power levels. Qualitatively, such spikes will not get rejected by the Filter method, if they are not sharp enough to have a Fast Ripple band component, or if the reference power level of Fast Ripple band is too high. In the Wavelet method, these spikes may get detected if local maximums are present in the time-frequency representations (see Figure 35). 89

97 The spike shown in Figure 35 is better approximated as a triangular pulse. The Fourier transform of a triangular pulse is a squared sinc function with zeros located at regular frequency intervals (inversely proportional to the duration of the pulse). As a result, the local maximums seen in the time-frequency representations are actually the peaks (sidelobes) of the squared sinc function. For this reason, the Wavelet method misclassifies similar spikes as probable HFOs. Therefore, only sharp spikes can be approximated as singularities. For sharp spikes, the mainlobe is quite wide, and the sidelobes are small (below reference power levels) and located at very high frequencies. Figure 34: Example of a Spike-without-HFO classified as probable HFO. Filter method (optimal β=11, c=3, time-invariant mode) was used in patient 4 (validation dataset, channel: LA1-LA2). The spike was detected because no Fast Ripple event was detected, defeating the criterion of spike rejection that requires simultaneous detections in Gamma, Ripple, and Fast Ripple bands. Interestingly, when the Wavelet method (FBR=7, β=19, c=3, timeinvariant mode) was used, this spike was successfully rejected. 90

98 Figure 35: An example of Wavelet method misclassifying a spike-without-hfo as probable HFO. Two local maximums are present that are above the reference power (time-invariant). At the top, unfiltered and filtered EEG are shown from patient 5 (validation dataset, channel: RH6-RH7). We are unable to see any oscillations in the time-domain (unfiltered EEG). To understand the detection in this case, we must think of a spike as a triangular pulse. The Fourier transform of a triangular pulse is a squared sinc function. In the bottom plot, the spectral power surface of the unfiltered EEG is shown. The reference power surface is also shown. Notice that there are two main peaks (sidelobes?) in the spectral power surface. The location of the second peak (150 Hz) is almost at twice the frequency of the first peak (80 Hz). This may indicate the presence of harmonics belonging to the squared sinc function. 91

99 3.4 Summary In this chapter we reported the results of the visual classification, the optimal parameters computed from the baseline training, the accuracy of baseline detection, the optimal parameters of HFO detection algorithms (Filter and Wavelet) when operating both time-invariant and time-variant modes, the performance measures of HFO detection in both modes, and the most robust parameters in both Filter and Wavelet methods using only the time-invariant mode. For the baseline detection algorithm, the optimal NME threshold is 69.1%, optimal baseline duration is 84 ms, and mean accuracy of baseline detection is 99.3%. For the time-invariant mode of HFO detection, the mean sensitivity (across all patients) is 85.2%, the mean false discovery rate is 20.1%, and the mean spike sensitivity is 70.4%. For the time-variant mode, the mean sensitivity is 81%, the mean false discovery rate is 29.1%, and the mean spike sensitivity is The best parameter set for the Filter method (time-invariant mode) is β=17 and c=3. This achieved mean sensitivity of 75.9%, mean false discovery rate of 10.6%, and mean spike sensitivity of 71.9%. The best parameter set for the Wavelet method (time-invariant mode) is FBR=13, β=35, and c=3. This achieved mean sensitivity of 70.8%, mean false discovery rate of 13.1%, and mean spike sensitivity of 58.9%. 92

100 4 Discussion We have illustrated algorithms for automatic detection of baselines and HFOs. For the baseline detection, we have assumed that in the Hz band, sharp transients have lower wavelet entropy compared to that of the background. We assumed this because sharp transients have a specific power spectrum that is different from the power spectrum of white noise. The wavelet entropy should be the highest only for white noise ( Hz) where no apparent structure is present. Therefore, our baseline detection algorithm searches for those EEG segments whose power spectrum ( Hz) is close to that of white-noise in Hz band. Using such baselines, we are able to compute reference power that can help separate the HFOs from background. HFO detection algorithms based on FIR filters and Morlet wavelets were used. These methods are variations of those that have already been used for HFO detection in the past. A broadband FIR filter was used by Staba et al. (2002) and the Morlet wavelets were used by Khalilov et al. (2005) to detect HFOs. HFO detection algorithms (Filter and Wavelet) compute the power of EEG signal in a specific band and if the power exceeds the reference power level for a minimum duration of time, the presence of HFO is probable. In a practical application, the baseline detection is applied before applying the HFO detection algorithm. Therefore, the two detection algorithms work in stages and the performance of the first stage (baseline detection) influences the performance of the second stage (HFO detection). In this chapter, we will discuss the properties of our data, and the operation and caveats of: baseline detection method, reference power computation method, and HFO detection methods. We will also describe some general limitations of our study, and how our algorithms compared to those already published in the literature. We will conclude this chapter by recommending improvements in the algorithms to improve performance. 93

101 4.1 Data Properties Table 1 and Table 2 show that most of the EEG consisted of background and grey areas. This proportion of EEG also represents the amount of time the reviewer spent in screening unremarkable EEG. This highlights the need for an automatic detection algorithm that can perform the screening. Table 1 and Table 2 show that spikes-without-hfos and HFOs have a much shorter average duration than the background. This indicates that it is difficult to find these events unless the EEG is zoomed in at 1 sec per page or more. In the conventional clinical work, the reviewer reviews the EEG at 15 sec per page. This represents a fifteen fold increase in the workload in high frequency EEG (>80 Hz) compared to clinical EEG (<80 Hz). Our reviewer typically spent two to three hours reviewing the EEG in one five minute record. Compared to this, the automatic methods take only a few minutes to perform the same operation. Table 1 and Table 2 show that spikes-without-hfos occurred less frequently than HFOs. Therefore, even if the HFO detection algorithms misclassified all such spikes as HFOs, the error in the classification will be small. This is a reason that the misclassification of spikes-without-hfos is less important compared to the misclassification of background. The differences in the numbers between the two tables can be due to either the differences in the datasets or the reviewer variability. Neither one of these causes can be confirmed in this study as this requires external reviewers. Furthermore, the definitions of HFOs, spikes-without-hfos, and background are not concrete and this causes further degradation in the classifications done by the reviewer. This issue will be discussed in the later sections. 94

102 4.2 Baseline Detection Method The baseline detection method was able to achieve high accuracy for all patients (both training and validation datasets). However, there were several channels where only a few baselines were detected. The reason for this is that sections of long duration existed with continuous rhythmic activity (>80 Hz). A baseline in such sections could not be detected automatically without relaxing the NME threshold. In other cases, baselines were detected where HFOs were present. This was mainly due to two reasons. First, there were cases where HFO did not have a single dominant rhythm and consisted of short rhythmic bursts of various frequencies (Figure 25). Second, there were cases where the EEG segment selected for baseline-evaluation contained only a part of HFO (Figure 28). In both cases, the EEG segment did not have a single dominant rhythm that spanned the segment s duration. Consequently, the values of auto-correlation co-efficients were low which in turn led to high values of wavelet entropy. The two issues described above are extremely difficult to eliminate using simple fine-tuning of parameter values. The first issue cannot be dealt with by a simple adjustment of parameters because the baseline detection assumes a single dominant rhythm in an HFO. Therefore, if an event contains multiple short rhythmic bursts, it changes the problem description and our solution to baseline detection is no longer applicable. The second issue is a random error due to the partitioning of EEG in equal duration segments. However, the partitioning scheme is not correlated with the location of HFOs and, therefore, this error is unbiased. This issue is partially mitigated in this study by allowing the HFO algorithms to detect HFOs even in the poor baselines. A future modification to the baseline detection could include variable segment duration. The partitioning scheme may be correlated with the location of HFOs during seizures as in this case the HFOs occur at regular intervals. Therefore, we do not recommend the use of this algorithm on ictal data. 95

103 In RH1-RH2 channel for patient 5 (validation dataset), the background EEG resembled sustained high frequency activity. Consequently, there were too few valid baselines throughout the record. Due to low number of baselines, they were extremely unrepresentative of their adjacent EEG. This was the main reason behind the large number of false positives seen in Figure 30 and Figure 31. It is likely that our reviewer was confident in her classification of rhythmic portions of EEG as background because HFOs are assumed to be short bursts and not sustained events. Furthermore, the rhythmic activity did not have sufficient amplitude to stand-out of the surrounding EEG. However, as the background in this channel was remarkably different from the background in remaining channels of this patient and those of the other patients, our definitions of HFO and background will require further analysis (beyond the scope of this thesis). Specifically, we need to investigate if high rhythmicity in EEG (>80 Hz) can be considered as a long HFO. 4.3 Reference Power Computation Method Reference power was computed in two manners for each HFO detection method to see which computation method (mode) led to a better performance. In the time-variant mode, baselines were considered non-stationary. We originally hypothesized that the non-stationary assumption could lead to greater sensitivity for HFO detection. However, sensitivity was considerably low for patients 3 and 4. Furthermore, the false discovery rate was very high for patient 5 (see Figure 30). We attribute this to the poor estimation of reference power in the timevariant case. Since only two baselines were used at a time to compute the reference power, the estimation was noisy. We contrast this with the timeinvariant mode where the baselines were assumed to be weak-sense-stationary throughout an EEG record. The reference power in this case was computed from averaging the band power of all baselines. The sensitivity increased for all patients except patient 5. The false discovery rate lowered for patient 4 and remained relatively unchanged for other patients. 96

104 If only a few baselines are detected then the reference power estimation is noisy in both time-invariant and time-variant modes. The effect is worse in the timevariant mode where inaccurate reference power levels may be applied to long inter-baseline EEG segments. The accuracy of reference power estimation in the time-variant case can be improved if longer baseline durations are used. If the baseline contains an HFO and the duration of HFO is small compared to that of the baseline, the contribution of HFO to reference power will be small. However, using long baseline duration may decrease the efficacy of autocorrelation coefficients and the number of baselines containing HFOs will increase. 4.4 HFO Detection Methods Amongst the HFO detection methods, it appears that Filter method performs similarly to the reviewer and more so than the Wavelet method. This is especially evident for patients 3-5. We investigated the reason behind the superior performance of FIR filters in these patients. For patient 3, we discovered that most events missed by the Wavelet method were Gamma oscillations. These Gamma oscillations had sufficient amplitude and a wide bandwidth to be visible when viewed using a high pass filter of cut-off 80 Hz during visual identification. As a result, we think that the reviewer may have (mis?-)classified these as HFOs. The filter method suffered from the same drawback(?) as these oscillations had a dominant frequency in the Gamma band, but the bandwidth extended well into the Ripple band. Consequently, the Ripple band filter detected wide-band Gamma oscillations. However, the Wavelet method did not detect Gamma oscillations as the corresponding local maximum in the time-frequency spectrum was located below 80 Hz (Figure 36). We believe that the Wavelet method correctly rejected these dubious events; however, this also resulted in an apparent lower sensitivity (see patient 3, Figure 26). The case was similar in patients 4 and 5 except that there were a greater number of true HFOs in these patients and the proportion of Gamma oscillations misclassified by the reviewer as HFOs was lower. 97

105 Figure 36: Top plot shows the HFO (ellipse). Bottom plot shows the spectral power surface corresponding to the HFO and the threshold surface in grey. The vertical axis in the bottom plot is the power (db). The origin is at the lower right corner. The horizontal axis shows frequency and the slanted axis shows time. The local maximum is located at approximately 50 Hz and does not fall into the Hz range. The local maximum is wide and appreciable power is present for frequencies up to ~150 Hz. For this reason, the Filter method detects this Gamma oscillation as HFO but the Wavelet method does not. 98

106 Figure 37: An example of detections in the grey-area and false positives in patient 5 (validation dataset, channel RH1-RH2). The first event (A) is in grey-area. The second event is a Probable HFO Ripple (B) and the third event is a Probable HFO Fast Ripple (C). The fourth (D) and fifth (E) events are Probable HFO Ripples but classified as False Positives since they overlap with the reviewer s classification of background. We analyzed a few detections in the grey areas to investigate their nature. An example is shown in Figure 37 and Figure 38. Most of the detections in greyareas had some degree of local increase in spectral power. We theorize that the reviewer chose not to detect these events as a clear rhythmic oscillation in them could not be seen (e.g. B-C of Figure 37). The use of high-pass filter (cut-off at 80 Hz) restricts the ability of the reviewer to detect HFOs containing a dominant rhythm along with minor oscillations of multiple frequencies. An event containing mixture of different frequencies would seem to have an ill-defined rhythmicity which may be the case when Ripples and Fast Ripples occur simultaneously (e.g. B-C of Figure 37 and Figure 38). A reviewer detects Ripples using a high-pass filter (80 Hz) Urrestarazu et al. (2007). Using a single highpass filter (80 Hz), both Ripples and Fast Ripples are seen visually and this may give the impression of unclear rhythmicity, leading to classification as grey-area. 99

107 Both Filter and Wavelet method are immune to this phenomenon of Ripple/Fast- Ripple co-occurrence. Filter method is sensitive to the gross power contained in Ripple and Fast Ripple bands, and events in these two categories are detected independently (except during spike-rejection). Wavelet method has an even finer frequency resolution than the Filter method and Ripples and Fast Ripple are detected independently (based on the presence of local peaks in 3D timefrequency representation). In the study of Urrestarazu et al. (2007), the reviewer identifies Ripples and Fast Ripples separately using high-pass filters of 80 Hz and 250 Hz. In such studies, based on our example from Figure 37, the visual technique will have a lower sensitivity for Ripples than for Fast Ripples. This is because, when screening for Ripples using high pass filter at 80 Hz in Ripple-Fast-Ripple co-occurrence events, there may be unclear rhythmicity and the reviewer will not be confident in identifying the Ripple portion. However, in the same case, when screening for Fast Ripples using high pass filter at 250 Hz, the Fast Ripple will be seen clearly (as the Ripple is attenuated) and the reviewer will identify the Fast Ripple portion. As explained in the previous paragraph, both Filter and Wavelet method are immune to this phenomenon unlike the visual identification technique. 100

108 Figure 38: Top plot shows the signal from Figure 37. Bottom plot shows the spectral power ( Hz) computed using Morlet wavelet (FBR=7). Threshold plane ( Hz) was computed using c=3, β=13. A, B, C, D, and E are the five detections shown in Figure 37. The reviewer classified D and E as background and A, B, and C as grey-areas. Upon viewing the bottom plot, it appears that A (~130 Hz), B (~190 Hz), C (>350 Hz), D (~130 Hz), E (~100 Hz) are valid local maximums meeting the requirements for classifications as HFO (Wavelet method), also meets the requirements although it is difficult to see from the view shown above. While the sensitivity of both methods can be similar, the false discovery rate is lower for FIR filters. There can be two reasons for this: 1) Wider Bandwidth in Filters: Ripple and Fast Ripple bands for FIR filters were defined as Hz and Hz respectively. The bandwidth of the Fast Ripple band filter is comparable to the bandwidth of Morlet daughter wavelets with pseudo-frequency greater than 200 Hz. However, the bandwidth of the Ripple band filter is much wider than the bandwidth of a single daughter wavelet whose pseudo-frequency lies between 80 and 200 Hz. Due to the wide bandwidth of filters in the Filter method, spurious narrowband local maximums of low amplitudes are not resolved. Such local maximums may exceed the reference power in Wavelet method but will not be 101

Intracranial Studies Of Human Epilepsy In A Surgical Setting

Intracranial Studies Of Human Epilepsy In A Surgical Setting Intracranial Studies Of Human Epilepsy In A Surgical Setting Department of Neurology David Geffen School of Medicine at UCLA Presentation Goals Epilepsy and seizures Basics of the electroencephalogram

More information

High Frequency Oscillations in Temporal Lobe Epilepsy

High Frequency Oscillations in Temporal Lobe Epilepsy High Frequency Oscillations in Temporal Lobe Epilepsy Paolo Federico MD, PhD, FRCPC Departments of Clinical Neurosciences and Diagnostic Imaging University of Calgary 7 June 2012 Learning Objectives Understand

More information

Diagnosing Complicated Epilepsy: Mapping of the Epileptic Circuitry. Michael R. Sperling, M.D. Thomas Jefferson University Philadelphia, PA

Diagnosing Complicated Epilepsy: Mapping of the Epileptic Circuitry. Michael R. Sperling, M.D. Thomas Jefferson University Philadelphia, PA Diagnosing Complicated Epilepsy: Mapping of the Epileptic Circuitry Michael R. Sperling, M.D. Thomas Jefferson University Philadelphia, PA Overview Definition of epileptic circuitry Methods of mapping

More information

Restoring Communication and Mobility

Restoring Communication and Mobility Restoring Communication and Mobility What are they? Artificial devices connected to the body that substitute, restore or supplement a sensory, cognitive, or motive function of the nervous system that has

More information

Electroencephalography

Electroencephalography The electroencephalogram (EEG) is a measure of brain waves. It is a readily available test that provides evidence of how the brain functions over time. The EEG is used in the evaluation of brain disorders.

More information

Toward a more accurate delimitation of the epileptic focus from a surgical perspective

Toward a more accurate delimitation of the epileptic focus from a surgical perspective Toward a more accurate delimitation of the epileptic focus from a surgical perspective Margitta Seeck Department of Clinical Neurosciences EEG & Epilepsy Unit University Hospital of Geneva Geneva, Switzerland

More information

Introduction to EEG del Campo. Introduction to EEG. J.C. Martin del Campo, MD, FRCP University Health Network Toronto, Canada

Introduction to EEG del Campo. Introduction to EEG. J.C. Martin del Campo, MD, FRCP University Health Network Toronto, Canada Introduction to EEG J.C. Martin, MD, FRCP University Health Network Toronto, Canada What is EEG? A graphic representation of the difference in voltage between two different cerebral locations plotted over

More information

Interictal High Frequency Oscillations as Neurophysiologic Biomarkers of Epileptogenicity

Interictal High Frequency Oscillations as Neurophysiologic Biomarkers of Epileptogenicity Interictal High Frequency Oscillations as Neurophysiologic Biomarkers of Epileptogenicity December 10, 2013 Joyce Y. Wu, MD Associate Professor Division of Pediatric Neurology David Geffen School of Medicine

More information

Est-ce que l'eeg a toujours sa place en 2019?

Est-ce que l'eeg a toujours sa place en 2019? Est-ce que l'eeg a toujours sa place en 2019? Thomas Bast Epilepsy Center Kork, Germany Does EEG still play a role in 2019? What a question 7T-MRI, fmri, DTI, MEG, SISCOM, Of ieeg course! /HFO, Genetics

More information

Physiology Unit 2 CONSCIOUSNESS, THE BRAIN AND BEHAVIOR

Physiology Unit 2 CONSCIOUSNESS, THE BRAIN AND BEHAVIOR Physiology Unit 2 CONSCIOUSNESS, THE BRAIN AND BEHAVIOR In Physiology Today What the Brain Does The nervous system determines states of consciousness and produces complex behaviors Any given neuron may

More information

Physiology Unit 2 CONSCIOUSNESS, THE BRAIN AND BEHAVIOR

Physiology Unit 2 CONSCIOUSNESS, THE BRAIN AND BEHAVIOR Physiology Unit 2 CONSCIOUSNESS, THE BRAIN AND BEHAVIOR What the Brain Does The nervous system determines states of consciousness and produces complex behaviors Any given neuron may have as many as 200,000

More information

CHAPTER 6 INTERFERENCE CANCELLATION IN EEG SIGNAL

CHAPTER 6 INTERFERENCE CANCELLATION IN EEG SIGNAL 116 CHAPTER 6 INTERFERENCE CANCELLATION IN EEG SIGNAL 6.1 INTRODUCTION Electrical impulses generated by nerve firings in the brain pass through the head and represent the electroencephalogram (EEG). Electrical

More information

states of brain activity sleep, brain waves DR. S. GOLABI PH.D. IN MEDICAL PHYSIOLOGY

states of brain activity sleep, brain waves DR. S. GOLABI PH.D. IN MEDICAL PHYSIOLOGY states of brain activity sleep, brain waves DR. S. GOLABI PH.D. IN MEDICAL PHYSIOLOGY introduction all of us are aware of the many different states of brain activity, including sleep, wakefulness, extreme

More information

Nature Medicine: doi: /nm.4084

Nature Medicine: doi: /nm.4084 Supplementary Figure 1: Sample IEDs. (a) Sample hippocampal IEDs from different kindled rats (scale bar = 200 µv, 100 ms). (b) Sample temporal lobe IEDs from different subjects with epilepsy (scale bar

More information

Depth/surface relationships: Confronting noninvasive measures to intracerebral EEG

Depth/surface relationships: Confronting noninvasive measures to intracerebral EEG Depth/surface relationships: Confronting noninvasive measures to intracerebral EEG Christian G Bénar Institut de Neurosciences des Systèmes; INSERM, Aix-Marseille Université christian.benar@univ-amu.fr

More information

Neurorobotics, and brain-machine interfaces. Oct. 10 th, 2006.

Neurorobotics, and brain-machine interfaces. Oct. 10 th, 2006. Neurorobotics, and brain-machine interfaces Oct. 10 th, 2006. Catching up from last class Pg 121 Wessberg ( ) Nicolelis, Real-time prediction of hand trajectory by ensembles of cortical neurons in primates

More information

Depth/Surface Relationships: Confronting noninvasive measures to intracerebral EEG

Depth/Surface Relationships: Confronting noninvasive measures to intracerebral EEG Depth/Surface Relationships: Confronting noninvasive measures to intracerebral EEG Christian G Bénar Institut de Neurosciences des Systèmes; INSERM, Aix-Marseille Université christian.benar@univ-amu.fr

More information

EEG in Medical Practice

EEG in Medical Practice EEG in Medical Practice Dr. Md. Mahmudur Rahman Siddiqui MBBS, FCPS, FACP, FCCP Associate Professor, Dept. of Medicine Anwer Khan Modern Medical College What is the EEG? The brain normally produces tiny

More information

Spatial and Temporal Analysis of Interictal Activity in the Epileptic Brain

Spatial and Temporal Analysis of Interictal Activity in the Epileptic Brain Spatial and Temporal Analysis of Interictal Activity in the Epileptic Brain Paul McCall, Mercedes Cabrerizo, Malek Adjouadi Florida International University Department of ECE Miami, FL, USA Email: {pmcca,

More information

EMG, EEG, and Neurophysiology in Clinical Practice

EMG, EEG, and Neurophysiology in Clinical Practice Mayo School of Continuous Professional Development EMG, EEG, and Neurophysiology in Clinical Practice Matthew T. Hoerth, M.D. Ritz-Carlton, Amelia Island, Florida January 29-February 4, 2017 2016 MFMER

More information

EEG SPIKE CLASSIFICATION WITH TEMPLATE MATCHING ALGORITHM. Çamlık Caddesi No:44 Sarnıç Beldesi İZMİR 2 Elektrik ve Elektronik Müh.

EEG SPIKE CLASSIFICATION WITH TEMPLATE MATCHING ALGORITHM. Çamlık Caddesi No:44 Sarnıç Beldesi İZMİR 2 Elektrik ve Elektronik Müh. EEG SPIKE CLASSIFICATION WITH TEMPLATE MATCHING ALGORITHM Selim BÖLGEN 1 Gülden KÖKTÜRK 2 1 Pagetel Sistem Müh. San. Tic. Ltd. Şti. Çamlık Caddesi No:44 Sarnıç Beldesi İZMİR 2 Elektrik ve Elektronik Müh.

More information

EEG- A Brief Introduction

EEG- A Brief Introduction Fatemeh Hadaeghi EEG- A Brief Introduction Lecture Notes for BSP, Chapter 4 Master Program Data Engineering 1 4 Introduction Human brain, as the most complex living structure in the universe, has been

More information

Analysis of Seizure Onset on the Basis of Wideband EEG Recordings

Analysis of Seizure Onset on the Basis of Wideband EEG Recordings Epilepsia, (Suppl. ):9, 00 Blackwell Publishing, Inc. C International League Against Epilepsy Ictogenesis Analysis of Seizure Onset on the Basis of Wideband EEG Recordings Anatol Bragin, Charles L. Wilson,

More information

The Sonification of Human EEG and other Biomedical Data. Part 3

The Sonification of Human EEG and other Biomedical Data. Part 3 The Sonification of Human EEG and other Biomedical Data Part 3 The Human EEG A data source for the sonification of cerebral dynamics The Human EEG - Outline Electric brain signals Continuous recording

More information

Normal EEG of wakeful resting adults of years of age. Alpha rhythm. Alpha rhythm. Alpha rhythm. Normal EEG of the wakeful adult at rest

Normal EEG of wakeful resting adults of years of age. Alpha rhythm. Alpha rhythm. Alpha rhythm. Normal EEG of the wakeful adult at rest Normal EEG of wakeful resting adults of 20-60 years of age Suthida Yenjun, M.D. Normal EEG of the wakeful adult at rest Alpha rhythm Beta rhythm Mu rhythm Vertex sharp transients Intermittent posterior

More information

PSD Analysis of Neural Spectrum During Transition from Awake Stage to Sleep Stage

PSD Analysis of Neural Spectrum During Transition from Awake Stage to Sleep Stage PSD Analysis of Neural Spectrum During Transition from Stage to Stage Chintan Joshi #1 ; Dipesh Kamdar #2 #1 Student,; #2 Research Guide, #1,#2 Electronics and Communication Department, Vyavasayi Vidya

More information

EEG Instrumentation, Montage, Polarity, and Localization

EEG Instrumentation, Montage, Polarity, and Localization EEG Instrumentation, Montage, Polarity, and Localization 2 Krikor Tufenkjian The Source of EEG The source of the EEG potentials recorded from the scalp is the excitatory and inhibitory postsynaptic potentials

More information

EEG workshop. Epileptiform abnormalities. Definitions. Dr. Suthida Yenjun

EEG workshop. Epileptiform abnormalities. Definitions. Dr. Suthida Yenjun EEG workshop Epileptiform abnormalities Paroxysmal EEG activities ( focal or generalized) are often termed epileptiform activities EEG hallmark of epilepsy Dr. Suthida Yenjun Epileptiform abnormalities

More information

Introduction to Electrophysiology

Introduction to Electrophysiology Introduction to Electrophysiology Dr. Kwangyeol Baek Martinos Center for Biomedical Imaging Massachusetts General Hospital Harvard Medical School 2018-05-31s Contents Principles in Electrophysiology Techniques

More information

EEG History. Where and why is EEG used? 8/2/2010

EEG History. Where and why is EEG used? 8/2/2010 EEG History Hans Berger 1873-1941 Edgar Douglas Adrian, an English physician, was one of the first scientists to record a single nerve fiber potential Although Adrian is credited with the discovery of

More information

Epileptic seizure detection using linear prediction filter

Epileptic seizure detection using linear prediction filter 11 th International conference on Sciences and Techniques of Automatic control & computer engineering December 19-1, 010, Monastir, Tunisia Epileptic seizure detection using linear prediction filter Introduction:

More information

Brain Computer Interface. Mina Mikhail

Brain Computer Interface. Mina Mikhail Brain Computer Interface Mina Mikhail minamohebn@gmail.com Introduction Ways for controlling computers Keyboard Mouse Voice Gestures Ways for communicating with people Talking Writing Gestures Problem

More information

Neurophysiology & EEG

Neurophysiology & EEG Neurophysiology & EEG PG4 Core Curriculum Ian A. Cook, M.D. Associate Director, Laboratory of Brain, Behavior, & Pharmacology UCLA Department of Psychiatry & Biobehavioral Sciences Semel Institute for

More information

Entrainment of neuronal oscillations as a mechanism of attentional selection: intracranial human recordings

Entrainment of neuronal oscillations as a mechanism of attentional selection: intracranial human recordings Entrainment of neuronal oscillations as a mechanism of attentional selection: intracranial human recordings J. Besle, P. Lakatos, C.A. Schevon, R.R. Goodman, G.M. McKhann, A. Mehta, R.G. Emerson, C.E.

More information

STRUCTURAL ORGANIZATION OF THE NERVOUS SYSTEM

STRUCTURAL ORGANIZATION OF THE NERVOUS SYSTEM STRUCTURAL ORGANIZATION OF THE NERVOUS SYSTEM STRUCTURAL ORGANIZATION OF THE BRAIN The central nervous system (CNS), consisting of the brain and spinal cord, receives input from sensory neurons and directs

More information

The Nervous System. Neuron 01/12/2011. The Synapse: The Processor

The Nervous System. Neuron 01/12/2011. The Synapse: The Processor The Nervous System Neuron Nucleus Cell body Dendrites they are part of the cell body of a neuron that collect chemical and electrical signals from other neurons at synapses and convert them into electrical

More information

Non epileptiform abnormality J U LY 2 7,

Non epileptiform abnormality J U LY 2 7, Non epileptiform abnormality S U D A J I R A S A K U L D E J, M D. C H U L A L O N G KO R N C O M P R E H E N S I V E E P I L E P S Y C E N T E R J U LY 2 7, 2 0 1 6 Outline Slow pattern Focal slowing

More information

EEG in the ICU: Part I

EEG in the ICU: Part I EEG in the ICU: Part I Teneille E. Gofton July 2012 Objectives To outline the importance of EEG monitoring in the ICU To briefly review the neurophysiological basis of EEG To introduce formal EEG and subhairline

More information

PD233: Design of Biomedical Devices and Systems

PD233: Design of Biomedical Devices and Systems PD233: Design of Biomedical Devices and Systems (Lecture-7 Biopotentials- 2) Dr. Manish Arora CPDM, IISc Course Website: http://cpdm.iisc.ac.in/utsaah/courses/ Electromyogram (EMG) Skeletal muscles are

More information

An Overview of BMIs. Luca Rossini. Workshop on Brain Machine Interfaces for Space Applications

An Overview of BMIs. Luca Rossini. Workshop on Brain Machine Interfaces for Space Applications An Overview of BMIs Luca Rossini Workshop on Brain Machine Interfaces for Space Applications European Space Research and Technology Centre, European Space Agency Noordvijk, 30 th November 2009 Definition

More information

Outline of Talk. Introduction to EEG and Event Related Potentials. Key points. My path to EEG

Outline of Talk. Introduction to EEG and Event Related Potentials. Key points. My path to EEG Outline of Talk Introduction to EEG and Event Related Potentials Shafali Spurling Jeste Assistant Professor in Psychiatry and Neurology UCLA Center for Autism Research and Treatment Basic definitions and

More information

Surgery for Medically Refractory Focal Epilepsy

Surgery for Medically Refractory Focal Epilepsy Surgery for Medically Refractory Focal Epilepsy Seth F Oliveria, MD PhD The Oregon Clinic Neurosurgery Director of Functional Neurosurgery: Providence Brain and Spine Institute Portland, OR Providence

More information

ANALYSIS OF BRAIN SIGNAL FOR THE DETECTION OF EPILEPTIC SEIZURE

ANALYSIS OF BRAIN SIGNAL FOR THE DETECTION OF EPILEPTIC SEIZURE ANALYSIS OF BRAIN SIGNAL FOR THE DETECTION OF EPILEPTIC SEIZURE Sumit Kumar Srivastava 1, Sharique Ahmed 2, Mohd Maroof Siddiqui 3 1,2,3 Department of EEE, Integral University ABSTRACT The electroencephalogram

More information

Asian Epilepsy Academy (ASEPA) & ASEAN Neurological Association (ASNA) EEG Certification Examination

Asian Epilepsy Academy (ASEPA) & ASEAN Neurological Association (ASNA) EEG Certification Examination Asian Epilepsy Academy (ASEPA) & ASEAN Neurological Association (ASNA) EEG Certification Examination EEG Certification Examination Aims To set and improve the standard of practice of Electroencephalography

More information

Informationsverarbeitung im zerebralen Cortex

Informationsverarbeitung im zerebralen Cortex Informationsverarbeitung im zerebralen Cortex Thomas Klausberger Dept. Cognitive Neurobiology, Center for Brain Research, Med. Uni. Vienna The hippocampus is a key brain circuit for certain forms of memory

More information

Classification of EEG signals in an Object Recognition task

Classification of EEG signals in an Object Recognition task Classification of EEG signals in an Object Recognition task Iacob D. Rus, Paul Marc, Mihaela Dinsoreanu, Rodica Potolea Technical University of Cluj-Napoca Cluj-Napoca, Romania 1 rus_iacob23@yahoo.com,

More information

Accepted Manuscript. Editorial. Responsive neurostimulation for epilepsy: more than stimulation. Jayant N. Acharya

Accepted Manuscript. Editorial. Responsive neurostimulation for epilepsy: more than stimulation. Jayant N. Acharya Accepted Manuscript Editorial Responsive neurostimulation for epilepsy: more than stimulation Jayant N. Acharya PII: S2467-981X(18)30022-2 DOI: https://doi.org/10.1016/j.cnp.2018.06.002 Reference: CNP

More information

Effects of Light Stimulus Frequency on Phase Characteristics of Brain Waves

Effects of Light Stimulus Frequency on Phase Characteristics of Brain Waves SICE Annual Conference 27 Sept. 17-2, 27, Kagawa University, Japan Effects of Light Stimulus Frequency on Phase Characteristics of Brain Waves Seiji Nishifuji 1, Kentaro Fujisaki 1 and Shogo Tanaka 1 1

More information

Biomedical Research 2013; 24 (3): ISSN X

Biomedical Research 2013; 24 (3): ISSN X Biomedical Research 2013; 24 (3): 359-364 ISSN 0970-938X http://www.biomedres.info Investigating relative strengths and positions of electrical activity in the left and right hemispheres of the human brain

More information

Sleep-Wake Cycle I Brain Rhythms. Reading: BCP Chapter 19

Sleep-Wake Cycle I Brain Rhythms. Reading: BCP Chapter 19 Sleep-Wake Cycle I Brain Rhythms Reading: BCP Chapter 19 Brain Rhythms and Sleep Earth has a rhythmic environment. For example, day and night cycle back and forth, tides ebb and flow and temperature varies

More information

EPILEPTIC SEIZURE DETECTION USING WAVELET TRANSFORM

EPILEPTIC SEIZURE DETECTION USING WAVELET TRANSFORM EPILEPTIC SEIZURE DETECTION USING WAVELET TRANSFORM Sneha R. Rathod 1, Chaitra B. 2, Dr. H.P.Rajani 3, Dr. Rajashri khanai 4 1 MTech VLSI Design and Embedded systems,dept of ECE, KLE Dr.MSSCET, Belagavi,

More information

Information Processing During Transient Responses in the Crayfish Visual System

Information Processing During Transient Responses in the Crayfish Visual System Information Processing During Transient Responses in the Crayfish Visual System Christopher J. Rozell, Don. H. Johnson and Raymon M. Glantz Department of Electrical & Computer Engineering Department of

More information

EEG, ECG, EMG. Mitesh Shrestha

EEG, ECG, EMG. Mitesh Shrestha EEG, ECG, EMG Mitesh Shrestha What is Signal? A signal is defined as a fluctuating quantity or impulse whose variations represent information. The amplitude or frequency of voltage, current, electric field

More information

Nature Neuroscience: doi: /nn Supplementary Figure 1

Nature Neuroscience: doi: /nn Supplementary Figure 1 Supplementary Figure 1 Hippocampal recordings. a. (top) Post-operative MRI (left, depicting a depth electrode implanted along the longitudinal hippocampal axis) and co-registered preoperative MRI (right)

More information

Localization a quick look

Localization a quick look Localization a quick look Covering the basics Differential amplifiers Polarity convention 10-20 electrode system Basic montages: bipolar and referential Other aspects of displaying the EEG Localization

More information

Separation Of,, & Activities In EEG To Measure The Depth Of Sleep And Mental Status

Separation Of,, & Activities In EEG To Measure The Depth Of Sleep And Mental Status Separation Of,, & Activities In EEG To Measure The Depth Of Sleep And Mental Status Shah Aqueel Ahmed 1, Syed Abdul Sattar 2, D. Elizabath Rani 3 1. Royal Institute Of Technology And Science, R. R. Dist.,

More information

Computational Explorations in Cognitive Neuroscience Chapter 7: Large-Scale Brain Area Functional Organization

Computational Explorations in Cognitive Neuroscience Chapter 7: Large-Scale Brain Area Functional Organization Computational Explorations in Cognitive Neuroscience Chapter 7: Large-Scale Brain Area Functional Organization 1 7.1 Overview This chapter aims to provide a framework for modeling cognitive phenomena based

More information

Statistical analysis of epileptic activities based on histogram and wavelet-spectral entropy

Statistical analysis of epileptic activities based on histogram and wavelet-spectral entropy J. Biomedical Science and Engineering, 0, 4, 07-3 doi:0.436/jbise.0.4309 Published Online March 0 (http://www.scirp.org/journal/jbise/). Statistical analysis of epileptic activities based on histogram

More information

This presentation is the intellectual property of the author. Contact them for permission to reprint and/or distribute.

This presentation is the intellectual property of the author. Contact them for permission to reprint and/or distribute. Modified Combinatorial Nomenclature Montage, Review, and Analysis of High Density EEG Terrence D. Lagerlund, M.D., Ph.D. CP1208045-16 Disclosure Relevant financial relationships None Off-label/investigational

More information

Models and Physiology of Macroscopic Brain Ac5vity. Jose C. Principe University of Florida

Models and Physiology of Macroscopic Brain Ac5vity. Jose C. Principe University of Florida Models and Physiology of Macroscopic Brain Ac5vity Jose C. Principe University of Florida Literature W. Freeman- Mass Ac5on in the Nervous System P. Nunez Electric Fields of the Brain H. Berger- On the

More information

Methodological challenges (and value) of intracranial electrophysiological recordings in humans

Methodological challenges (and value) of intracranial electrophysiological recordings in humans Methodological challenges (and value) of intracranial electrophysiological recordings in humans Nanthia Suthana, Ph.D. Assistant Professor of Psychiatry & Biobehavioral Sciences, Neurosurgery, and Psychology

More information

Implantable Microelectronic Devices

Implantable Microelectronic Devices ECE 8803/4803 Implantable Microelectronic Devices Fall - 2015 Maysam Ghovanloo (mgh@gatech.edu) School of Electrical and Computer Engineering Georgia Institute of Technology 2015 Maysam Ghovanloo 1 Outline

More information

Quick Guide - eabr with Eclipse

Quick Guide - eabr with Eclipse What is eabr? Quick Guide - eabr with Eclipse An electrical Auditory Brainstem Response (eabr) is a measurement of the ABR using an electrical stimulus. Instead of a traditional acoustic stimulus the cochlear

More information

The EEG in focal epilepsy. Bassel Abou-Khalil, M.D. Vanderbilt University Medical Center

The EEG in focal epilepsy. Bassel Abou-Khalil, M.D. Vanderbilt University Medical Center The EEG in focal epilepsy Bassel Abou-Khalil, M.D. Vanderbilt University Medical Center I have no financial relationships to disclose that are relative to the content of my presentation Learning Objectives

More information

Are HFOs Still UFOs? The Known and Unknown About High Frequency Oscillations in Epilepsy Surgery

Are HFOs Still UFOs? The Known and Unknown About High Frequency Oscillations in Epilepsy Surgery Current Literature In Clinical Science Are HFOs Still UFOs? The Known and Unknown About High Frequency Oscillations in Epilepsy Surgery High-Frequency Oscillations, Extent of Surgical Resection, and Surgical

More information

Human Brain Institute Russia-Switzerland-USA

Human Brain Institute Russia-Switzerland-USA 1 Human Brain Institute Russia-Switzerland-USA CONTENTS I Personal and clinical data II Conclusion. III Recommendations for therapy IV Report. 1. Procedures of EEG recording and analysis 2. Search for

More information

Is the Hemodynamic Response to Scalp Interictal Epileptic Discharges the Onset Zone of Intracerebral Interictal Discharges?

Is the Hemodynamic Response to Scalp Interictal Epileptic Discharges the Onset Zone of Intracerebral Interictal Discharges? Is the Hemodynamic Response to Scalp Interictal Epileptic Discharges the Onset Zone of Intracerebral Interictal Discharges? Hui Ming Khoo, MD, PhD 1,2 Nicolás von Ellenrieder, PhD 1, Natalja Zazubovits,

More information

Asian Epilepsy Academy (ASEPA) EEG Certification Examination

Asian Epilepsy Academy (ASEPA) EEG Certification Examination Asian Epilepsy Academy (ASEPA) EEG Certification Examination EEG Certification Examination Aims To set and improve the standard of practice of Electroencephalography (EEG) in the Asian Oceanian region

More information

From Spikes to Ripples: The Evolving and Expanding Role of Electroencephalography in the Diagnosis and Treatment of Epilepsy

From Spikes to Ripples: The Evolving and Expanding Role of Electroencephalography in the Diagnosis and Treatment of Epilepsy From Spikes to Ripples: The Evolving and Expanding Role of Electroencephalography in the Diagnosis and Treatment of Epilepsy December 3, 2011 Gregory K. Bergey, M.D. Johns Hopkins University School of

More information

The American Approach to Depth Electrode Insertion December 4, 2012

The American Approach to Depth Electrode Insertion December 4, 2012 The American Approach to Depth Electrode Insertion December 4, 2012 Jonathan Miller, MD Director, Epilepsy Surgery University Hospitals Case Medical Center/Case Western Reserve University Cleveland, Ohio

More information

Practical 3 Nervous System Physiology 2 nd year English Module. Dept. of Physiology, Carol Davila University of Medicine and Pharmacy

Practical 3 Nervous System Physiology 2 nd year English Module. Dept. of Physiology, Carol Davila University of Medicine and Pharmacy Electroencephalography l h (EEG) Practical 3 Nervous System Physiology 2 nd year English Module Dept. of Physiology, Carol Davila University of Medicine and Pharmacy What is EEG EEG noninvasively records

More information

To link to this article: PLEASE SCROLL DOWN FOR ARTICLE

To link to this article:  PLEASE SCROLL DOWN FOR ARTICLE Journal of Neurotherapy: Investigations in Neuromodulation, Neurofeedback and Applied Neuroscience Clinical Corner D. Corydon Hammond PhD, Joel F. Lubar PhD & Marvin W. Sams ND Published online: 08 Sep

More information

Neural Correlates of Human Cognitive Function:

Neural Correlates of Human Cognitive Function: Neural Correlates of Human Cognitive Function: A Comparison of Electrophysiological and Other Neuroimaging Approaches Leun J. Otten Institute of Cognitive Neuroscience & Department of Psychology University

More information

Northeast Center for Special Care Grant Avenue Lake Katrine, NY

Northeast Center for Special Care Grant Avenue Lake Katrine, NY 300 Grant Avenue Lake Katrine, NY 12449 845-336-3500 Information Bulletin What is Brain Mapping? By Victor Zelek, Ph.D., Director of Neuropsychological Services Diplomate, National Registry of Neurofeedback

More information

Computational Medical Imaging Analysis Chapter 7: Biomedical Applications

Computational Medical Imaging Analysis Chapter 7: Biomedical Applications Computational Medical Imaging Analysis Chapter 7: Biomedical Applications Jun Zhang Laboratory for Computational Medical Imaging & Data Analysis Department of Computer Science University of Kentucky Lexington,

More information

Spectro-temporal response fields in the inferior colliculus of awake monkey

Spectro-temporal response fields in the inferior colliculus of awake monkey 3.6.QH Spectro-temporal response fields in the inferior colliculus of awake monkey Versnel, Huib; Zwiers, Marcel; Van Opstal, John Department of Biophysics University of Nijmegen Geert Grooteplein 655

More information

Case reports functional imaging in epilepsy

Case reports functional imaging in epilepsy Seizure 2001; 10: 157 161 doi:10.1053/seiz.2001.0552, available online at http://www.idealibrary.com on Case reports functional imaging in epilepsy MARK P. RICHARDSON Medical Research Council Fellow, Institute

More information

Organization of the nervous system. The withdrawal reflex. The central nervous system. Structure of a neuron. Overview

Organization of the nervous system. The withdrawal reflex. The central nervous system. Structure of a neuron. Overview Overview The nervous system- central and peripheral The brain: The source of mind and self Neurons Neuron Communication Chemical messengers Inside the brain Parts of the brain Split Brain Patients Organization

More information

Brain and Cognition. Cognitive Neuroscience. If the brain were simple enough to understand, we would be too stupid to understand it

Brain and Cognition. Cognitive Neuroscience. If the brain were simple enough to understand, we would be too stupid to understand it Brain and Cognition Cognitive Neuroscience If the brain were simple enough to understand, we would be too stupid to understand it 1 The Chemical Synapse 2 Chemical Neurotransmission At rest, the synapse

More information

PARAFAC: a powerful tool in EEG monitoring

PARAFAC: a powerful tool in EEG monitoring Katholieke Universiteit Leuven K.U.Leuven PARAFAC: a powerful tool in EEG monitoring Sabine Van Huffel Dept. Electrical Engineering ESAT-SCD SCD Katholieke Universiteit Leuven, Belgium 1 Contents Overview

More information

An electrocardiogram (ECG) is a recording of the electricity of the heart. Analysis of ECG

An electrocardiogram (ECG) is a recording of the electricity of the heart. Analysis of ECG Introduction An electrocardiogram (ECG) is a recording of the electricity of the heart. Analysis of ECG data can give important information about the health of the heart and can help physicians to diagnose

More information

Invasive Evaluation for Epilepsy Surgery Lesional Cases NO DISCLOSURES. Mr. Johnson. Seizures at 29 Years of Age. Dileep Nair, MD Juan Bulacio, MD

Invasive Evaluation for Epilepsy Surgery Lesional Cases NO DISCLOSURES. Mr. Johnson. Seizures at 29 Years of Age. Dileep Nair, MD Juan Bulacio, MD Invasive Evaluation for Epilepsy Surgery Lesional Cases NO DISCLOSURES Dileep Nair, MD Juan Bulacio, MD Mr. Johnson Seizures at 29 Years of Age Onset of seizures at 16 years of age bed wetting episodes

More information

Automated Detection of Epileptic Seizures in the EEG

Automated Detection of Epileptic Seizures in the EEG 1 of 4 Automated Detection of Epileptic Seizures in the EEG Maarten-Jan Hoeve 1,, Richard D. Jones 1,3, Grant J. Carroll 4, Hansjerg Goelz 1 1 Department of Medical Physics & Bioengineering, Christchurch

More information

Lesson 5 EEG 1 Electroencephalography: Brain Rhythms

Lesson 5 EEG 1 Electroencephalography: Brain Rhythms Physiology Lessons for use with the Biopac Science Lab MP40 PC running Windows XP or Mac OS X 10.3-10.4 Lesson 5 EEG 1 Electroencephalography: Brain Rhythms Lesson Revision 2.23.2006 BIOPAC Systems, Inc.

More information

Database of paroxysmal iceeg signals

Database of paroxysmal iceeg signals POSTER 2017, PRAGUE MAY 23 1 Database of paroxysmal iceeg signals Ing. Nikol Kopecká 1 1 Dept. of Circuit Theory, Czech Technical University, Technická 2, 166 27 Praha, Czech Republic kopecnik@fel.cvut.cz

More information

Seizure onset can be difficult to asses in scalp EEG. However, some tools can be used to increase the seizure onset activity over the EEG background:

Seizure onset can be difficult to asses in scalp EEG. However, some tools can be used to increase the seizure onset activity over the EEG background: This presentation was given during the Dianalund Summer School on EEG and Epilepsy, July 24, 2012. The main purpose of this introductory talk is to show the possibilities of improved seizure onset analysis

More information

EEG source Localization (ESL): What do we know now?

EEG source Localization (ESL): What do we know now? EEG source Localization (ESL): What do we know now? Talk overview Theoretical background Fundamental of ESL (forward and inverse problems) Voltage topography of temporal spikes Improving source localization

More information

How we study the brain: a survey of methods used in neuroscience

How we study the brain: a survey of methods used in neuroscience How we study the brain: a survey of methods used in neuroscience Preparing living neurons for recording Large identifiable neurons in a leech Rohon-Beard neurons in a frog spinal cord Living slice of a

More information

Functional Connectivity and the Neurophysics of EEG. Ramesh Srinivasan Department of Cognitive Sciences University of California, Irvine

Functional Connectivity and the Neurophysics of EEG. Ramesh Srinivasan Department of Cognitive Sciences University of California, Irvine Functional Connectivity and the Neurophysics of EEG Ramesh Srinivasan Department of Cognitive Sciences University of California, Irvine Outline Introduce the use of EEG coherence to assess functional connectivity

More information

Sleep stages. Awake Stage 1 Stage 2 Stage 3 Stage 4 Rapid eye movement sleep (REM) Slow wave sleep (NREM)

Sleep stages. Awake Stage 1 Stage 2 Stage 3 Stage 4 Rapid eye movement sleep (REM) Slow wave sleep (NREM) Sleep stages Awake Stage 1 Stage 2 Stage 3 Stage 4 Rapid eye movement sleep (REM) Slow wave sleep (NREM) EEG waves EEG Electrode Placement Classifying EEG brain waves Frequency: the number of oscillations/waves

More information

ISSN: (Online) Volume 3, Issue 7, July 2015 International Journal of Advance Research in Computer Science and Management Studies

ISSN: (Online) Volume 3, Issue 7, July 2015 International Journal of Advance Research in Computer Science and Management Studies ISSN: 2321-7782 (Online) Volume 3, Issue 7, July 2015 International Journal of Advance Research in Computer Science and Management Studies Research Article / Survey Paper / Case Study Available online

More information

CS/NEUR125 Brains, Minds, and Machines. Due: Friday, April 14

CS/NEUR125 Brains, Minds, and Machines. Due: Friday, April 14 CS/NEUR125 Brains, Minds, and Machines Assignment 5: Neural mechanisms of object-based attention Due: Friday, April 14 This Assignment is a guided reading of the 2014 paper, Neural Mechanisms of Object-Based

More information

9/30/2016. Advances in Epilepsy Surgery. Epidemiology. Epidemiology

9/30/2016. Advances in Epilepsy Surgery. Epidemiology. Epidemiology Advances in Epilepsy Surgery George Jallo, M.D. Director, Institute for Brain Protection Sciences Johns Hopkins All Children s Hospital St Petersburg, Florida Epidemiology WHO lists it as the second most

More information

Supplementary Figure S1: Histological analysis of kainate-treated animals

Supplementary Figure S1: Histological analysis of kainate-treated animals Supplementary Figure S1: Histological analysis of kainate-treated animals Nissl stained coronal or horizontal sections were made from kainate injected (right) and saline injected (left) animals at different

More information

Processed by HBI: Russia/Switzerland/USA

Processed by HBI: Russia/Switzerland/USA 1 CONTENTS I Personal and clinical data II Conclusion. III Recommendations for therapy IV Report. 1. Procedures of EEG recording and analysis 2. Search for paroxysms 3. Eyes Open background EEG rhythms

More information

Nature Methods: doi: /nmeth Supplementary Figure 1. Activity in turtle dorsal cortex is sparse.

Nature Methods: doi: /nmeth Supplementary Figure 1. Activity in turtle dorsal cortex is sparse. Supplementary Figure 1 Activity in turtle dorsal cortex is sparse. a. Probability distribution of firing rates across the population (notice log scale) in our data. The range of firing rates is wide but

More information

Multiscale Evidence of Multiscale Brain Communication

Multiscale Evidence of Multiscale Brain Communication Multiscale Evidence of Multiscale Brain Communication Scott Makeig Swartz Center for Computational Neuroscience Institute for Neural Computation University of California San Diego La Jolla CA Talk given

More information

Modeling of Hippocampal Behavior

Modeling of Hippocampal Behavior Modeling of Hippocampal Behavior Diana Ponce-Morado, Venmathi Gunasekaran and Varsha Vijayan Abstract The hippocampus is identified as an important structure in the cerebral cortex of mammals for forming

More information

Beyond the Basics in EEG Interpretation: Throughout the Life Stages

Beyond the Basics in EEG Interpretation: Throughout the Life Stages Beyond the Basics in EEG Interpretation: Throughout the Life Stages Steve S. Chung, MD, FAAN Chairman, Neuroscience Institute Director, Epilepsy Program Banner University Medical Center University of Arizona

More information

BIOPAC Systems, Inc BIOPAC Inspiring people and enabling discovery about life

BIOPAC Systems, Inc BIOPAC Inspiring people and enabling discovery about life BIOPAC Systems, Inc. 2016 BIOPAC Inspiring people and enabling discovery about life 1 BIOPAC s Guide to EEG for Research: Mobita Wireless EEG Housekeeping Attendees are on Mute Headset is Recommended!

More information