SIM UNIVERSITY SCHOOL OF SCIENCE AND TECHNOLOGY EARLY DETECTION OF EPILEPSY: COMPARATIVE STUDY STUDENT SUPERVISOR PROJECT CODE : ANG CHAI YING BRENDA (Y0706295) : DR RAJENDRA ACHARYA UDYAVARA : JUL2010/BME/010 A project report submitted to SIM University in partial fulfillment of the requirements for the degree of Bachelor of Biomedical Engineering November 2011 Table of Contents Page ABSTRACT……………………………………………………………………………5 ACKNOWLEDGEMENT……………………………………………………………...6 LIST OF FIGURES…………………………………………………………………….7 LIST OF TABLES……………………………………………………………………...7 AIMS……………………………………………………………………………………8 OBJECTIVES…………………………………………………….………………...8 SCOPE………………………………………………………………………….…..8 CHAPTER ONE………………………………………………………………………...10 LITERATURE REVIEW…………………………………………………………...10 1.1. Epilepsy………………………………………………………………………...10 1.2. Seizures………………………………………………………………………....10 1.3. The Anatomy of the Human Brain……………………………………………..11 1.3.1. The Brain Structure……………………………………………………...11 1.3.1.1. The Forebrain………………………………………………....…12 1.3.1.2. The Midbrain………………………………………………...….12 1.3.1.3. The Hindbrain………………………………………………...…12 1.3.2. The Neurons……………………………………………………………..13 1.4. Types of Seizures Symptoms…………………………………………………...14 1.4.1. Generalized seizures……………………………………………………..14 1.4.1.1. Absence seizure………………………………………………….14 1.4.1.2. Myoclonic seizure……………………………………………….15 1.4.1.3. Atonic seizure…………………………………………………....15 1.4.1.4. Tonic seizure…………………………………………………….15 1.4.1.5. Clonic seizure……………………………………………………15 1.4.2. Partial seizures…………………………………………………………..15 1.4.2.1. Complex partial seizure…………………………………………15 1.4.2.2. Simple partial seizure…………………………………………...15 1.5. Electroencephalogram (EEG) and Other Screening Tests……………………..16 BME499 CAPSTONE PROJECT FINAL REPORT 2 Page CHAPTER TWO……………………………………………………………………….18 METHODOLOGY…………………………………………………………………18 2.1. Data…………………………………………………………………………….18 2.2. Higher Order Spectra Analysis (HOS)………………………………………...19 2.3. Features Extracted……………………………………………………………..21 2.3.1. Normalized bispectral entropy (Ent1):…………………………………21 2.3.2. Normalized bispectral squared entropy (Ent2):………………………...21 2.3.3. Normalized bispectral cubed entropy (Ent3):………………………….22 2.3.4. Bispectrum phase entropy (EntPh):……………………………………22 2.3.5. Mean bispectrum magnitude: (mAmp)………………………………...22 2.3.6. Weighted Center of Bispectrum ( wc1 wc )………………………….22 2.3.7. Moments of Bispectrum ( H1 H 5 ).......................................................23 2.4. ANOVA Test………………………………………………………………....23 2.5. Types of Classifiers…………………………………………………………...24 2.5.1. Fuzzy Sugeno Classifier……………………………………………….24 2.5.2. Probabilistic Neural Network (PNN)………………………………….24 2.5.3. K-Nearest Neighbor (KNN)……………………………………………24 2.5.4. Decision Tree (DT)…………………………………………………….24 CHAPTER THREE…………………………………………………………………...26 RESULTS……………………………………………………………………………..26 3.1. HOS Features…………………………………………………………………26 3.2. Classifiers Performance Parameters………………………………………….30 3.3. Classifiers Performance Outcome……………………………………………31 DISCUSSION………………………………………………………………………....36 CHAPTER FOUR…………………………………………………………………….37 SUMMARY…………………………………………………………………………..37 CONCLUSION……………………………………………………………………….37 BME499 CAPSTONE PROJECT FINAL REPORT 3 Page RECOMMENDATION………………………………………………………………37 CHAPTER FIVE……………………………………………………………………..39 PROJECT MANAGEMENT………………………………………………………...40 CHAPTER SIX……………………………………………………………………....42 REFLECTION……………………………………………………………………….42 REFERENCE………………………………………………………………………...44 APPENDIX A- DATA OF HOS FEATURES………………………………………46 APPENDIX B- MEETING LOGS.......................................................................…...53 APPENDIX C- PROGRAMMING CODES………………………………………...57 BME499 CAPSTONE PROJECT FINAL REPORT 4 ABSTRACT ______________________________________________________ The project objective is to perform a comparative study on early detection of epilepsy using Higher Order Spectra (HOS) analysis method. The MATLAB application is used to extract and determine the features from the various types of electroencephalography (EEG) signals. The selected features are bispectral entrophy (Ent1), bispectral squared entrophy (Ent2), bispectrum phase entropy (EntPh), mean bispectrum magnitude (mAmp), and weighted center of bispectrum (wc1, wc2, wc3 and wc4). They represent the three mental states. The features are inputs that fed into the different classifiers to perform automatic classification known as Normal, Background (Pre-ictal) and Epilepsy (ictal). Early epilepsy detection allows caregivers to have precaution over the epileptic individual, allow first time individual to seek for early treatment upon diagnosis and improve their quality of life. BME499 CAPSTONE PROJECT FINAL REPORT 5 ACKNOWLEDGEMENT ________________________________________________________________________ I would like to thank SIM University for offering this Biomedical Engineering Degree program. Through this program, I am enriched with greater knowledge in medical, healthcare and therefore able to appreciate the importance of life. I owe my deepest gratitude to a man with great nobilities, my supervisor, Dr Rajendra Acharya U. His patience, care, motivation and positive virtues have greatly affected my life and thinking. The field experience he possesses has encouraged and broadens my horizon in signal processing method and utilizing it to serve as a great tool for mankind. His patience guidance and valuable advices has made this project completion possible. I would like to express my gratitude to the following: Dr Jeremy Teo Choon Meng, scientist of Swiss Federal Institute of Technology (EPFL) who has helped me by retrieving journal papers and provides constant encouragements. Mr. Alvin Ang, a student of Ngee Ann Polytechnic for his precious time in coaching MATLAB application and guidance on the various types of classifiers. Bonn University for the EEG database that provided the source of EEG signals. I would like to thank my family and grandparents for their love, support and encouragement throughout my course of study and final year project development, especially to my encouraging husband who motivates and believes in me in achieving my goals. Lastly, to my great friends Zhu Huifang, Janet Chim, Toh Shin Ni, Vicky Goh, Chen Yimin, Karen Chong, Zack Lim, Koh Liwei and Ellen Tang who are always there for me cheering and encouraging me during the project development and upon completion. BME499 CAPSTONE PROJECT FINAL REPORT 6 LIST OF FIGURES ______________________________________________________ Figure 1.1 Figure 1.2 Figure 1.3 Figure 2.1 Figure 2.2 Figure 2.3 Figure 2.4 Figure 2.5(a) Figure 2.5(b) Figure 2.5(c) Figure 2.6(a) Figure 2.6(b) Figure 2.6(c) Figure 2.7(a) Figure 2.7(b) Figure 2.7(c) Anatomy of the Human Brain The Development of the Central Nervous System (CNS) Neuron Cell Block Diagram of Project Process Flow Normal, Ictal and Pre-ictal EEG signals Testing and Training Ratio for 100 Segment Data Real Signals Computation at Non-redundant Region Normal EEG Bispectrum Magnitude Contour Plot Normal EEG Bispectrum Magnitude Colour Map Plot Normal EEG Bicoherence Plot Background EEG Bispectrum Magnitude Contour Plot Background EEG Bispectrum Magnitude Colour Map Plot Background EEG Bicoherence Plot Seizure EEG Bispectrum Magnitude Contour Plot Seizure EEG Bispectrum Magnitude Colour Map Plot Seizure EEG Bicoherence Plot Page 11 11 13 17 18 18 20 31 31 31 32 32 32 33 33 33 LIST OF TABLES ______________________________________________________ Page Table 3.1 Table 3.2 Table 3.3 Table 3.4 Table 3.5 Table 3.6 Table 3.7 Table 3.8 Table 3.9 Table 4.0 Bispectral Entrophy (Ent1), Bispectral Squared Entrophy (Ent2), Bispectral Cubed Entrophy (Ent3), Bispectrum Phase Entrophy (EntPh), Mean Bispectrum Magnitude (mAmp) Bispectrum Moments represented by H1 to H5 Bispectrum Weighted Center represented by wc1 to wc4 ANOVA Test perform on 3 classes of EEG data with selected features Prediction Table Result of TN,FN,TP,FP,Accuracy,PPV,Sensitivity,Specificity for Various Classifiers. Gantt Chart Phase 1 Gantt Chart Phase 2 Gantt Chart Phase 3 Gantt Chart Phase 4 BME499 CAPSTONE PROJECT FINAL REPORT 24 25 25 28 29 29 37 37 38 38 7 AIMS ______________________________________________________ OBJECTIVES The aim of this project is to do a comparative study of early epilepsy detection. Epilepsy is a recurring neurological disorder that can occur at any ages. The excessive excitation of the neurotransmitters released in the cerebral cortex causes such disorder. Three sets of recorded raw EEG signals were amplified and undergo a band pass filter set at 12dB/octave before HOS analysis. The High Order Spectra (HOS) signal processing method was selected due to its characteristics that advantageous over other processing method. The Fourier transform signals apply Fast Fourier Transformation (FFT) algorithm to compute the data. The frequencies were normalized by Nyquist frequency. A few normalized HOS features then extracted will undergo the ANOVA test. ANOVA is a significant test done on the extracted features. This is to qualify the type of features that will be used. The statistical significance of the selected features is about p<0.0001. The chosen features were input to the Fuzzy Sugeno, Probabilistic Neural Networks, KNearest Neighbor, and Decision Tree classifiers for automatic classification. Hence, the three sets of EEG data are classified into Normal, Pre-Ictal and Ictal. This classification represents the neurological condition. SCOPE This project covers the involvement of MATLAB programming ability for the processing of three classes of EEG signals, features extraction and performs an automatic classification of epilepsy. The EEG signals are taken from the Bonn University Database. The raw signals are input to a written MATLAB program that incorporated the Higher Order Spectra (HOS) processing method. The processed data are the values representing the features extracted by HOS and are further tested by ANOVA test for clinical validation. The standard deviation, mean and p-value derived from ANOVA test determine the accuracy and quality of the extracted features for the classifiers. The various classifiers (e.g. Fuzzy, PNN, KNN, and DT) will reveal the average classification BME499 CAPSTONE PROJECT FINAL REPORT 8 sensitivity, specificity, accuracy and Positive Predictive Value (PPV). From here, we compare the performance of the various classifiers. BME499 CAPSTONE PROJECT FINAL REPORT 9 CHAPTER ONE ______________________________________________________ LITERATURE REVIEW 1.1. Epilepsy Epilepsy is a neurologist term that describes a recurring neurological disorder (recurrent seizures attack). It is neither contagious or a disease, but impinge on anyone regardless of age, race, gender or social conditions [3] . It is most commonly found in children and older people; however, the onset can occur at any age [18] . An epileptic individual may experience repeated seizures and more than two are usually unprovoked. According to an estimation made by the Singapore Epileptic Foundation, based on the prevalence of epilepsy in most developed countries, Singapore has more than 20,000 people with epilepsy [9], 70% of the epileptic cases has no known cause and 30% is due to reason such as severe head injuries, stroke, brain infection such as meningitis, brain tumor or brain damage caused by a difficult birth [9] . Babies and children with epilepsy make up about 0.5% to 1% of the population [9]. 1.2. Seizures Seizures are events of abnormal electrical discharges that occur in the brain without warning and cause an alteration in physical sensation, behavior or consciousness. Such alterations in physical conditions are often known as seizure symptoms. The seizures always happen unexpectedly; individual is unaware of the brief interruption that occurs in the brain. The experience with seizures is often estimated to last from a few seconds to a few minutes dependent on the types of seizure they encountered. As the seizures can be provoked or unprovoked, factors that provoked seizures arise from severe clinical conditions such as trauma, metabolic, stroke, perinatal (around birth) or infection [18] . BME499 CAPSTONE PROJECT FINAL REPORT 10 1.3. The Anatomy of the Human Brain 1.3.1. The Brain Structure Figure 1.1: Anatomy of the Human Brain. The human brain is the most complex organ that weighs about 1.5kg occupies a quantitative volume of about 1,350 cubic centimeters [5] [1] and . The illustration shown in Figure 1.1 presents the seven structural components that formed the brain system. They are the cerebral hemispheres, diencephalon, midbrain, cerebellum, pons, medulla oblongata and spinal cord. Each region has their unique roles and responsibilities towards maintaining homeostasis. Figure 1.2: The Development of the Central Nervous System. Relating the brain structures in the term of tissue level, a tube of primitive tissue shown in Figure 1.2 presents the initial development stage of the Central Nervous System (CNS) BME499 CAPSTONE PROJECT FINAL REPORT 11 till its maturity. The tissue enlargement highlighted in red, yellow and green regions in the developed tube, correspond to the three principal divisions of the brain: the forebrain, the midbrain, and the hindbrain [5]. 1.3.1.1. The Forebrain Figure 1.2 shows the forebrain comprises the telencephalon and diencephalon. It is composed of cerebral hemispheres and their ancillary structures [5] . The cerebral hemispheres dominate the human CNS and contain neural machinery that is responsible for the human thought [5]. The two large functional structures of the diencephalon are thalamus and hypothalamus. It allows all telencephalic information to travel through. The thalamus serves as processor for all the information reaching the cerebral cortex from the rest of the central nervous [8] system [8] , while the hypothalamus regulates autonomic, endocrine, and visceral function . 1.3.1.2. The Midbrain The Midbrain (mesencephalon) in Figure 1.2 controls several sensory and motor functions, including the eye movement and the coordination of the visual and auditory reflexes [8]. 1.3.1.3. The Hindbrain The developed Hindbrain in Figure 1.2 is divided into two distinct regions namely the metencephalon (pons and cerebellum) and medulla oblongata. The pons conveys information about any movement from the cerebral hemisphere to the cerebellum [8] . The cerebellum that connects to the brain stem by several peduncles (major fiber tracts) [8] modulates the force and range movement and has its involvement in the learning of motor skills [8] . The medulla oblongata is responsible for vital autonomic functions, such as digestion, breathing and control of the heart rate [8]. BME499 CAPSTONE PROJECT FINAL REPORT 12 EEG signals are analyzed using reflexology. This study discovers that reflexology had a positive influence to the brain signals [11] . Hence EEG signal carries vital mental information that associated with the physical conditions of an individual. Another study then confirms that EEG characteristic and location of the brain using different set of music rhythm, does excite the brain [12] . Therefore in general, we know that the occurrences of different types of seizure, external stimulus can affect the motor and sensory function of the body. Symptoms are dependent on the location of the excessive neuronal excitation. However, not all seizure symptoms appear to be jerky, shaking rapid or uncontrollably as some seizures are mild. 1.3.2. The Neurons Figure 1.3: Neuron Cell. Defining CNS in terms of cellular level, there are about 100 billion nerve cells (neurons) [8] and the connections between the nerve cells (synapses) are estimated to range from 10 trillion to 100 trillion points [8] . The two types of nervous cells present in the CNS are the neuroglia and neuron. The neuroglias are cells with no known informational functions, but provide mechanical and metabolic support for the neurons and maintain homeostasis in the nervous system [5]. BME499 CAPSTONE PROJECT FINAL REPORT 13 The neuron cell in Figure 1.3 consists of a cell body, dendrites and axon. It is a functional unit in the nervous system that plays a critical role in processing information and integrates the influences of the cells from which they receive [5] . The cell body contains the nucleus of the cell and possesses all specialized organelles like mitochondria. The dendrites processes information obtained from other cells and transmits that information to the cell body of the neuron. The axon will carry information away from the cell body to other neurons or muscle cells and terminate at axon terminal. The neuron has many functionalities and one of its function is capable of releasing chemical substances knows as the neurotransmitters. They are the chemical messengers of the brain where the transmission of signals from a neuron to a target cell across a synapse is established [10] . The neurotransmitters that involves in seizures are known as the excitatory neurotransmitter (glutamate) and the inhibitory neurotransmitter (gamma-aminobutyric acid) [18] . Hence, if the tight balanced between the excitatory and inhibitory neurotransmitters [18] are disrupted. A neuronal misfiring will be activated (abnormal electrical discharge) and affects the individual with abnormal clinical behaviors. 1.4. Types of Seizures Symptoms The two main categories of seizure known as the primary generalized seizures and partial seizures symptoms are briefly introduced as below. 1.4.1. Generalized seizures Generalized seizures takes place simultaneously from both sides of the brain and often occur at an early age [18]. It can be sub-categorized into 5 different types of seizures such as the following: 1.4.1.1. Absence seizure A sudden brief interruption of consciousnesses is experienced. The characteristics are starring blankly with a glazed facial expression or lip smacking [23] . The duration of the seizure usually last about 2 to 15 seconds. The epilepsy individual often has no memory of what happens during a seizure but recovers immediately without confusion after the seizure. BME499 CAPSTONE PROJECT FINAL REPORT 14 1.4.1.2. Myoclonic seizure A portion or the entire body will experience a brief muscle contraction. Such seizures often occur in the early morning or while going into sleep. 1.4.1.3. Atonic seizure A sudden loss of muscle tone and is prone to falling. The recovery is quick but epilepsy individual has a higher risk of getting serious injuries to their head or other side of their body. 1.4.1.4. Tonic seizure A sudden stiffness of the body is experienced and prone to risk of falling backward. Such seizure usually last less than 60 seconds and the recovery is quick. 1.4.1.5. Clonic seizure Jerking movements of the body without stiffness on the body and the muscles involves are both sides of the body. 1.4.2. Partial seizures The partial seizures originate from either the left or right side of the brain and tend to occur in a later age [18]. It is sub-categorized into simple partial and complex partial. 1.4.2.1. Complex partial seizure The vision of epileptic individual is disturbed. If there is impairment to the consciousness, the epilepsy individual may experience an uncontrollable lip smacking, chewing or swallowing. The duration is expected to last about 1 to 2 minutes [7]. 1.4.2.2. Simple partial seizure It affects specific part of the brain and will spread to a larger part of the brain that may result in complex partial seizure or a tonic clonic seizure [23] . The duration of this seizure is about 90 seconds and the symptoms are no loss of consiousness, sudden jerking and sensory phenomenon [23]. BME499 CAPSTONE PROJECT FINAL REPORT 15 1.5. Electroencephalogram (EEG) and Other Screening Tests Epilepsy can be access by a few screening tests such as Magnetic Resonance Imaging (MRI), blood test or Electroencephalogram (EEG). The MRI is an advanced brain scan technology that exceeds CAT scan or X-ray performance due to the increase of slice images of the brain availability and enables the embedded brain thrombosis or tumours in the brain to reveal vividly. The blood test screens are for chemical causes or infection detection that may result epilepsy and diagnosis are also important for the antiepileptic medication prescription for the prevention of rapid seizure manifestation in epileptic patients. The Electroencephalogram (EEG) is another process that the electroencephalographers determine the type and location of the seizures that occur in the epileptic patients. The surface electrodes are placed on varies position of the hair scalp to record the event of electrical activities that is taking place in the brain. As the extracted EEG signals are very small, the electrodes are electronically connected to an amplifier to amplify the EEG data to viewable waveforms. The electroencephalographers then analyze the waveforms displayed on the monitor and determine if the patient is suffering from epileptic disturbance or other types of brain disorders. In the process of EEG recording, the individual is required to perform some specific stimuli such as breathing heavily, blinking of eyes or staring into flashing light. This is to diagnose specific cause that provoked seizure known as reflex epilepsies. The abnormal EEG waveforms recorded are presented in spikes for the electroencephalographers to spot the trend for seizures in the epileptic region. The term ictal represents epilepsy and the spikes observe in the EEG waveforms is known as interictal. Interictal denotes that the spikes occur in between the seizures. Though EEG is a test to rule out seizures, it is important not confuse with diagnosing epilepsy. EEG test is an application to provide a medical history of a patient who experiences regular seizures attack. If the individual has no history of seizure and has abnormal spikes in their EEG signal, this does not explain that they are abnormal. They might have other neurological conditions to be rule out. Moreover, if the patient has a history of recurring seizure and the EEG test happened to be benign, the doctor should follow up in treating the patient, as epilepsy is a recurring neurological disorder. Hence, BME499 CAPSTONE PROJECT FINAL REPORT 16 EEG signals that contain essential information is useful for analysis. It can predict seizure attacks by reducing anxiety of the epileptic patients and allows an early detection in improving the quality of life through technology [17]. BME499 CAPSTONE PROJECT FINAL REPORT 17 CHAPTER TWO ______________________________________________________ METHODOLOGY Figure 2.1: Block Diagram of Project Process Flow. 2.1. Data The EEG signals that are used for this project were extracted from the database of Bonn University, Germany. The three classes of data are Normal, Background (Pre-ictal) and Epilepsy (ictal). Each class has 100 EEG segments available for the comparative study. The normal EEG data were the medical records from five healthy volunteers in relax conscious state with their eyes open. The ictal EEG data were recorded from five epilepsy patients during the occurrence of seizures and the pre-ictal EEG data from the same five patients were recorded when the seizures were absence. All signals were recorded with an identical 128-channel amplifier system with a sampling rate of 173.61Hz and 12-bit A/D resolution. A setting of 12dB/octave is set to filter the EEG data. Figure 2.1 shows a sample of the recorded EEG Signals. BME499 CAPSTONE PROJECT FINAL REPORT 18 Figure 2.2: Normal, Epilepsy and Pre-ictal EEG Signals. 100 EEG segments represent 100 patients. 100 segments of data are divided into 3 types of training to testing ratio. The first ratio is 7:3 and vice versa while the last ratio is 7:6:7 which represents training to testing to training ratio. All these combinations of training and testing are to ensure all the higher order spectra features data are being trained using classifiers for twice to ensure homogeneity of trained data sets before using different sets of data for testing. Refer to Figure 2.3 for training to testing ratio illustration. Training (70%) Testing (70%) Training (35%) Testing (30%) Testing (30%) Training (30%) Training (35%) Figure 2.3: Testing and Training Ratio for 100 Segment Data. 2.2. Higher Order Spectra Analysis (HOS) The nature of the EEG signals is highly dynamic and non-linear [20]. For the past 3 decades, many papers mentioned about performing quantitative analysis to aid the interpretation of EEG. In the mid 80’s, Lyapunov exponents and correlation dimension study is carried out, a non-linear method to learn slow wave sleep signal BME499 CAPSTONE PROJECT FINAL REPORT [4] . Since then, 19 non-linear analysis methods gained the interest of many researchers and several possible clinical applications like seizures predictions were reported. Signal processing methods differentiate the neurological activities between an abnormal and healthy individual. Various measurement techniques such as time-domain, frequency domain, timefrequency and non-linear methodologies were also discussed [20]. Recently, HOS analysis has gained its popularity due to its advantages. From [13] , the advantages are high signal to noise ratio (SNR) due to elimination of Gaussian noise which is good for parameter estimation. The signal phase properties and magnitude of the time series signal during reproduction of the signal in frequency is preserved. Lastly, HOS has the ability to differentiate various non-Gaussian signals for more accurate identification. Spectra analysis is a detail examination of information in frequency domain using statistical method. The information can be obtained from images, sound and other timevariant measurement data collected from sensors. The data will be processed using mathematical operation like Fourier Transform (FT) to obtain the relevant distinct features that can only be found in frequency domain. This methodology is signal processing. Statistical tool is chosen, as the data obtained is usually random, nonlinear and has a normal distribution. It is common to see second order statistics is being used to interpret the collected data. However, higher order that is third order statistics has gain popularity due to more complete characterization of the signal. This project focuses on third order statistical analysis features using bispectrum. Bispectrum is the study of nonlinear interactions and the equation is shown below where X(f) is a discrete fourier transform (DFT) of x(nT). E[.] is the expected value operator. B( f1 , f 2 ) EX f1 X f 2 X f1 f 2 (1) Equation (1) is derived from third order cumulant of the signal using DFT. Normalizing bispectrum using power spectra which lead to bicoherence and given by BME499 CAPSTONE PROJECT FINAL REPORT 20 Bnorm ( f1 , f 2 ) EX f1 X f 2 X f1 f 2 (2) P f1 P( f 2 ) P( f1 f 2 ) Where P(f) is the power spectra [14]. 2.3. Features Extracted In this study, seven features were being extracted to differentiate EEG signals. The bispectral entropies are shown in equation (3), (4) and (5). 0.5 Nonredundant Region f2 0.5 1 f1 Figure 2.4: Real Signals Computation at Non-redundant Region. 2.3.1. Normalized bispectral entropy (Ent1): Ent1 pn log pn where pn n B f1 , f 2 B f1 , f 2 (3) 2.3.2. Normalized bispectral squared entropy (Ent2): Ent 2 qn log qn where q n n BME499 CAPSTONE PROJECT FINAL REPORT B f1 , f 2 2 B f1 , f 2 2 (4) 21 2.3.3. Normalized bispectral cubed entropy (Ent3): Ent 3 rn log rn where rn n B f1 , f 2 3 B f1 , f 2 3 (5) 2.3.4. Bispectrum phase entropy (EntPh): EntPh n pn log pn (6) 1 1bf1 , f 2 n L where n / 2n / N 2 (n 1) / N , n 0,1, N 1 where pn : Bispectrum phase angle L: Number of points within the samples in Figure 2.2. 2.3.5. Mean bispectrum magnitude: (mAmp) mAmp 1 B f1 , f 2 L (7) where B f1 , f 2 is the bispectrum of the signal L: Number of points within the samples in Figure 2.2. 2.3.6. Weighted Center of Bispectrum ( wc1 wc ) wcx wc1 wc3 iB (i, j ) B(i, j ) iB (i, j ) B(i, j ) iB (i, j ) B(i, j ) , wcy , wc2 , wc4 BME499 CAPSTONE PROJECT FINAL REPORT iB (i, j ) B(i, j ) iB (i, j ) B(i, j ) iB (i, j ) B(i, j ) hence, (8) and respectively 22 2.3.7. Moments of Bispectrum ( H1 H 5 ) The summation of the logarithmic amplitudes of H1 bispectrum is equated as: H1 log B f1 , f 2 (9) The summation of the logarithmic amplitudes of the diagonal elements in the H2 bispectrum is equated as: H 2 log B f k , f k (10) The first order spectral moment of amplitudes of diagonal elements of the bispectrum H3 is equated as: H 3 log B f k , f k (11) All the above features are again defined over the principal domain in figure 2.4. 2.4. ANOVA Test ANOVA is defined as analysis of variance. It is a set of statistical models that provide a test to ensure the mean values of the three groups are different. This test translates the observed variance within the groups to be different sources of variation and consider the number of subjects found in the groups [6] . In order to be statistical significant; the observed differences should be high. Hence, all the 14 featured data extracted by HOS analysis were categorized into Group A, B and C in the ANOVA test platform. They were noted as normal, background and epilepsy respectively. The input parameters that undergo ANOVA test are known as bispectral entrophy (Ent1), bispectral squared entrophy (Ent2), bispectral cubed entrophy (Ent2) bispectrum phase entropy (EntPh), mean bispectrum magnitude (mAmp), weighted center of bispectrum (wc1, wc2, wc3 and wc4) and moments of bispectrum (H1-H5). An advantage of using ANOVA over T- test is that it decreased the chance of committing error in false positive when there is more than two means. BME499 CAPSTONE PROJECT FINAL REPORT 23 2.5. Types of Classifiers Four classifiers known as Fuzzy Sugeno Classifier, Probabilistic Neural Network (PNN), K-Nearest Neighbor (KNN) and Decision tree are used in this work. They are briefly introduced as below. 2.5.1. Fuzzy Sugeno Classifier Takagi-Sugeno classifier uses If-Then rule for system identification [22] . This fuzzy controller do not derive classification rule from human operator experiences but mathematical model. It has demonstrated the benefits of representing linear industrial system. 2.5.2. Probabilistic Neural Network (PNN) PNN is a feed forward network consists of three layers, namely input layers, hidden layers and output layers. It is derived from Bayes Theorem. Donald Specht replaced sigmoid activation function with a derived statistical activation function [19]. The main advantage of using PNN is the computational speed where it can be used on realtime classification comparing to typical back propagation neural networks. Moreover, it has the flexibility of choosing between linear decision probability density function (PDF) and complex nonlinear PDF. 2.5.3. K-Nearest Neighbor (KNN) KNN is a memory based learning technique used to classify samples based on the closest training samples exist in the n-dimensional space. It does not perform comparison with trained models for classification. A user defined constant, k is used to determine the test samples belong to which class based on majority votes. Typically, k is a small positive integer value. 2.5.4. Decision Tree (DT) DT is a simplified model to predict the outcome base on the inputs. The inputs formed the tree structure. DT can learn through recursive partitioning method. The BME499 CAPSTONE PROJECT FINAL REPORT 24 learning phase is considered complete when all partition nodes have the same value as the target variables. BME499 CAPSTONE PROJECT FINAL REPORT 25 CHAPTER THREE ________________________________________________________________________ RESULTS The values of the 14 HOS features were processed by their respective MATLAB program and shown in the following tables. 3.1. HOS Features P-value is the gauge used to identify statistical significant differences between mean values of different groups. Ent1 Ent2 Ent 3 EntPh mAmp Features Normal Background Epileptic Mean: 0.6920 ± 0.5365 ± 0.6151 ± 4.66 x 10-2 6.66 x 10-2 7.91 x 10-2 0.4780 ± 0.2814 ± 0.3581 ± 9.35 x 10-2 8.57 x 10-2 0.146 0.3402 ± 0.2146 ± 0.2380 ± 0.107 0.334 0.136 3.557 ± 3.5400 ± 3.5170 ± 2.94 x 10-2 5.20 x 10-2 4.96 x 10-2 1.032 x 108 ± 7.313 x 107 ± 2.996 x 1010 ± 8.110 x 107 9.809 x 107 3.659 x 1010 Std Deviation: Mean: Std Deviation: Mean: Std Deviation: Mean: Std Deviation: Mean: Std Deviation: P-value < 0.0001 < 0.0001 0.0001 < 0.0001 < 0.0001 Table 3.1: Bispectral Entrophy (Ent1), Bispectral Squared Entrophy (Ent2), Bispectral Cubed Entrophy (Ent3), Bispectrum Phase Entrophy (EntPh), Mean Bispectrum Magnitude (mAmp). In Table 3.1, four out of five HOS features have P-value less than 0.0001 that is obtained using ANOVA test. Hence Ent3 is not being used, as it is not able to show significant difference between normal EEG and epileptic compared to the rest. Ent1, Ent2, EntPh and mAmp showed higher value for Normal EEG signals compared to epileptic EEG signals. One particular HOS feature showed an increase for epileptic signal that is mAmp mean value while there is no major difference between normal, background and epileptic for EntPh feature mean value. Table 3.2 showed bispectrum moments BME499 CAPSTONE PROJECT FINAL REPORT 26 namely H1, H2, H3 H4 and H5 are not qualified for usage as HOS features for EEG identification. All five features will be excluded from this study. Features H1 H2 H3 Normal Background Epileptic P-value Too few data Too few data Too few data N. A 7.800 x 1016 ± 5.937 x 1010 ± 1.588 x 1011 ± 6.316 x 1017 1.966 x 1010 4.986 x 1010 4.390 x 1018 ± 3.548 x 1012 ± 2.237 x 1015 ± 3.177 x 1019 5.968 x 1012 2.945 x 1015 Mean: Std Deviation: Mean: Std Deviation: Mean: Std Deviation: Mean: H4 Std Deviation: Mean: H5 Std Deviation: 0.22 0.15 Table 3.2: Bispectrum Moments Represented by H1 to H5. Features Mean: Normal Background Epileptic 20.1570 ± 6.7764 ± 14.3380 ± P-value < 0.0001 wc1 Std Deviation: Mean: 15.8 4.3 3.79 11.5610 ± 3.6135 ± 7.5816 ± < 0.0001 wc2 Std Deviation: Mean: 11.8 4.22 2.49 18.5860 ± 9.9546 ± 15.068± < 0.0001 wc3 Std Deviation: Mean: 2.02 2.33 3.2 8.2306 ± 4.2636 ± 7.6444 ± < 0.0001 wc4 Std Deviation: 0.882 0.762 1.7 Table 3.3: Bispectrum Weighted Center Represented by wc1 to wc4. BME499 CAPSTONE PROJECT FINAL REPORT 27 Bispectrum weighted center (wc) features will be used, as the P-value is less than 0.0001. Similar observation can be made all four wc features mean value is higher for normal people compared to those who has seizures attack. Table 3.4 showed the graphical representation of the selected HOS features that coincides with table 3.1, 3.2 and 3.3 values. Group Mean with 95% Confidence Interval BME499 CAPSTONE PROJECT FINAL REPORT 28 BME499 CAPSTONE PROJECT FINAL REPORT 29 Table 3.4: ANOVA Test Perform on 3 Classes of EEG Data with Selected Features. 3.2. Classifiers Performance Parameters Classifiers are trained to identify normal, pre-ictal and epilepsy data. Selected HOS features will be fed into classifiers during learning phase as the inputs together with the corresponding outputs. This is to let the classifiers to understand the interactions between the inputs and outputs. Hence, all three classes of data will be used to train the four classifiers namely, Fuzzy Sugeno classifier, PNN classifier, KNN classifier and DT classifier. The four classifiers will be tested using known test data input to verify whether the classifiers can differentiate between normal, pre-ictal and epilepsy states. The performance of the classifiers for three classes identification when being fed by unknown input data is being judged by four performance parameters. They are accuracy, Positive Predictive Value (PPV), sensitivity and specificity. Accuracy is the ratio used to calculate the correctly identified samples with respect to the total number of samples used. PPV is the probability of a patient that is having a real seizure attack when the classifier has identify this patient is having the attack. Sensitivity is the likelihood the BME499 CAPSTONE PROJECT FINAL REPORT 30 test provides a positive result with respect to the detection of abnormal features. Specificity is the likelihood that provides negative result when normal features are detected. The higher the values for these four performance indicators show higher chances of correct prediction of unknown data sets. The four performance indicators are derived from four other parameters that are True Negative (TN), False Negative (FN), True Positive (TP) and False Positive (FP). In this study, positive implies seizure attack while negative implies normal. True Positive represents the number of seizure people whom the test result is positive while False Negative represents the number of seizure people whom the test result is negative. True Negative indicates the number of normal people having negative test results while False Positive indicates the number of normal people having positive test results. Table 3.5: Prediction Table. Positive case (P) is defined as the sum of TP and FN while Negative case (N) is defined as the sum of TN and FP, i.e. P= TP+FN and N=TN+FP. Accuracy is the sum of TP and TN divided by total samples used. PPV is TP divided by sum of TP and FP. Sensitivity is the ratio of TP to P while specificity is the ratio of TN to N. 3.3. Classifiers Performance Outcome Classifiers TN FN TP FP FUZZY PNN KNN DT 28 28 28 28 1 1 1 2 59 59 59 58 2 2 2 2 Accuracy PPV Sensitivity Specificity (%) (%) (%) (%) 96.7 96.7 98.3 93.3 96.7 96.7 98.3 93.3 96.7 96.7 98.3 93.3 95.5 96.7 96.7 93.3 Table 3.6: Result of TN,FN,TP,FP,Accuracy,PPV,Sensitivity,Specificity for Various Classifiers. BME499 CAPSTONE PROJECT FINAL REPORT 31 100 segments for each normal, pre-ictal and seizure data are divided into three equal segments to perform cross validation. One third of the data is used as testing data while the two third data is used to train. In another word, there are 63 sets of training data and 27 sets of testing data. The study utilizes Fast Fourier Transform (FFT) for the efficient computational advantage. Block of 256 samples, equivalent to 1.5 seconds at the defined sampling rate was used for bispectrum and bicoherence computation. The bispectrum was calculated using indirect FFT while bicoherence calculated using direct FFT method. The default settings of 50% overlapping between blocks in Spectral analysis toolbox [21] were used. Equation (1) is used for indirect FFT calculation while equation (2) is used for direct FFT calculation. As shown in Table 3.5, the maximum accuracy of 96.7% is demonstrated by Fuzzy, PNN and KNN classifiers while the minimum accuracy of 95.5 is demonstrated by DT classifier. The four classifiers showed same PPV value of 96.7% and specificity value of 93.3%. Sensitivity value of 98.3% is demonstrated by Fuzzy, PNN and KNN classifier together with DT classifier showing the lowest sensitivity value of 96.7%. Combing through the entire four classifiers performance index, DT has proven to be the worst classifier while the other three classifiers has identical performance. Bispectrum and bicoherence for 3 states can be found from Figure 2.5 to Figure 2.7. For normal EEG bispectrum contour plot, we can see there is 1 center plot at zero for both f1 and f2 with 6 plots surrounded the center forming an oval shape. This can be further confirmed from bispectrum plot where a star shape can be observed. A hexagon plot can be seen on both bispectrum and bicoherence plots of pre-ictal signal. Unlike normal and pre-ictal plots, Seizure bispectrum and bicoherence plots do not have center plots but only consist of spread out plots. BME499 CAPSTONE PROJECT FINAL REPORT 32 Figure 2.5(a): Normal EEG Bispectrum Magnitude Contour Plot. Figure 2.5(b): Normal EEG Bispectrum Magnitude Colour Map Plot. Figure 2.5(c): Normal EEG Bicoherence Plot. BME499 CAPSTONE PROJECT FINAL REPORT 33 Figure 2.6(a): Background EEG Bispectrum Magnitude Contour Plot. Figure 2.6(b): Background EEG Bispectrum Magnitude Colour Map Plot. Figure 2.6(c): Background EEG Bicoherence Plot. BME499 CAPSTONE PROJECT FINAL REPORT 34 Figure 2.7(a): Seizure EEG Bispectrum Magnitude Contour Plot. Figure 2.7(b): Seizure EEG Bispectrum Magnitude Colour Map Plot. Figure 2.7(c): Seizure EEG Bicoherence Plot. BME499 CAPSTONE PROJECT FINAL REPORT 35 DISCUSSION The result of the extracted features Ent1, Ent2, EntPh signify the complication or abnormality of EEG signal that occurs during epilepsy is reduced. Moreover, the values obtained from the measurement for normal and epileptic EEG signals are distinctive. Table 3.1 also shows that the statistical analysis of these measurements is extremely statistically significant with p<0.0001. In this project, the HOS features analyze the 3 classes of EEG signals (Normal, Background, and Epilepsy). The results indicate that the variables decrease progressively from the normal stage to epilepsy stage. These results also signify an outcome that the brain has lessened the electrophysiological behavior when seizure occurs. The brain has twelve paired of cranial nerves. The first two pair of cranial nerves comes directly from the cerebrum while the remaining comes from the brainstem. The vagus nerve is the essential pathway between the brain and some organs (head, neck, chest and abdomen) [24]. Majority of the nerve fibers are sensorial nerves that transmit the electrical impulses from the organ to the brain. Hence, occurrence of epilepsy interrupts the brain activity. BME499 CAPSTONE PROJECT FINAL REPORT 36 CHAPTER FOUR ________________________________________________________________________ SUMMARY Epilepsy caused danger to life when the seizure occurred during swimming or walking up the staircase i.e. the person will get drowned or falls from stairs. This has motivated the studies of various classifiers to have an early detection of seizure attack. EEG is used to detect the brain signal as brain signals display different pattern compared to normal brain signal. Due to the random and non-linear characteristic of brain signals, statistical analysis is being employed. 14 distinct EEG signals features are being extracted using Higher Order Spectra (HOS) method. The features are being tested using ANOVA method to choose the statistical significant features to be fed to various classifiers. Eight features which have p-value less than 0.0001 are chosen. Four classifiers namely, Fuzzy Sugeno, Probabilistic Neural Networks (PNN), K-Nearest Neighbor (KNN) and Decision Tree (DT) are being tested against four performance parameters. Fuzzy, PNN and KNN showed comparable performance. It is proven the entropies estimators, phase entropy and weighted centers can be used to identify epilepsy. CONCLUSION EEG signal obtained from human brain provided neurological behavior information. Various researches have been done to dissect the EEG signal to understand the difference between normal EEG, background EEG and epilepsy EEG signals. This study has shown that nonlinear time series analytical methods like entropies, entropies phase and weight centers can be used to distinguish between normal EEG and epilepsy EEG. It is clear to observe that entropies and weight centers are high for normal EEG compared to epileptic EEG. Through this work, HOS is proven to deliver significant features to the classifiers. RECOMMENDATION For future work, more advance identification algorithm can be used such as fuzzy neural networks to perform classification. Encouraging results can be found from stocks BME499 CAPSTONE PROJECT FINAL REPORT 37 trading applications [2] , traffic prediction application [16] and bank failure prediction [15] . Moreover, it can be use for diagnose epilepsy at a very early stage. It can be implemented real time for diagnosing the Pre-ictal EEG Signal. It can also be further extend to other clinical diseases such as depression, schizophrenia, and stroke patients and for different cardiac vascular diseases. This concept can also diagnose the efficacy of the drug; to check if the drug is efficient to cure epilepsy. Besides that, the classifiers need to be tested using data that is not included in training data sets to verify the performance of the classifiers against unknown variables. BME499 CAPSTONE PROJECT FINAL REPORT 38 CHAPTER FIVE PROJECT MANAGEMENT Table 3.7: Gantt Chart Phase 1 Table 3.8: Gantt Chart Phase 2 BME499 CAPSTONE PROJECT FINAL REPORT 39 Table 3.9: Gantt Chart Phase 3 Table 4.0: Gantt Chart Phase 4 Table 3.7, 3.8, 3.9 and 4.0 shows my project development progress. Phase 1 shown in Table 3.7 is mainly information gathering and research journals exploration. A technique that I have learnt from one of my U-core module was mind-mapping technique. This technique helps me to brainstorm all the important information that is required by my project. From the key elements I have brainstormed. I add in the details to my mind map to understand what I have read and understand from my research sources, ranging from books, online materials and journal papers. Phase 2 in Table 3.8 describes the tutorial practices and hands on that I have started on MATLAB application. The yellow legend in Phase 2 table represent there is a lag of 3 days during the period of drafting Interim report. I was unwell due to fever and BME499 CAPSTONE PROJECT FINAL REPORT 40 headache. Moreover, 10 days were set aside for the completion of my examination revision for BME 219 Healthcare Administration and BME 217 Healthcare Standard and Regulation module. Hence, I have a lag in my schedule but I compensate it back by setting aside 43 days for Literature Review Part 2. Phase 3 of Table 3.9 reflects the initial programming development for Discrete Wavelet Transform (DWT) features extraction. The programming is based on the mathematical equations derived from the journal papers; relevant equations were computed and programmed by MATLAB application. However, the 6th meeting with my supervisor on 11th Feb 11 has confirm that the result of DWT method has shown an insignificant p-value and we are unable to classify these sets of data and hence decided to try HOS features extraction instead as it has many advantages discussed in some journals. The try was indeed worthy, after editing and debug the MATLAB program for HOS (Appendix B). The results of the extracted features were excellent after running through ANOVA test. From there, I proceed to the next stage of performing classification for automatic detection of Epilepsy. Unfortunately, my joy was temporary. My father was admitted to A&E in SGH due to his sudden irregular heartbeat. He was hospitalized for 5 days due to further diagnosis of infection in his stomach. I have to visit him, check with the doctor about his condition and etc. Hence, I have to stay up late and catch up with my loss time in meeting my objectives. BME499 CAPSTONE PROJECT FINAL REPORT 41 CHAPTER SIX ________________________________________________________________________ REFLECTION The 1st meeting with Dr Rajendra was discussing how to start off the project. Though I have no idea what MATLAB programming skills is all about and the knowledge in Signal processing is limited. I embraced the new learning opportunity. The initial title proposed was “Computer-Based Detection of Epileptic EEG Signals using Recurrent Quantification Analysis Parameters”. The discussion was an ambitious attempt to try different processing techniques such as Discrete Wavelet Transformation, Recurrent Quantification Analysis, Non-Linear Analysis and Higher Order Spectra Analysis. So the consent from my supervisor was to submit a new project proposal title known as “Early Detection of Epilepsy: Comparative Study”. The progression of the entire project was challenging. From the start to read up a thick stack of journal papers, book and identifying all the techniques used by the researchers was demanding. The discipline to following exactly to the Gantt chart schedules and learning a whole new programming skill called MATLAB was tough. My first task in the Gantt chart was to gather all the information and literature reviews related to epilepsy, seizure, EEG and its statistical results. This helps to set my basic fundamentals of the project. Everything starts off well at phase 1 & 2, until early March when I start to run the MATLAB program on features extraction and various classifiers at phase 3. The program needs to be debugged and process was discouraging. Moreover, my dad was diagnosed with irregular heartbeat due to infection and hospitalized during this period. It was the most stressful period, as I had to visit him, send him for many post hospitalization follow-ups and my health was affected. Most of the time is also spent on MATLAB tutorial practices, reading books on programming codes and online resources. The time management between family and project progress was demanding. However, I was fortunate that Dr Rajendra has been constantly encouraging and pushes me throughout the project development. The debugging of the program was tedious and delays the Gantt BME499 CAPSTONE PROJECT FINAL REPORT 42 schedules due to lack off knowledge in calling some of the functions to perform what needs to be done. Fortunately Alvin advice me and straightened my thoughts but the joy was temporary. The extracted features are required to be tested. Hence I need to explore and select a significant test. ANOVA meant for more than 2 groups of variance was chosen. The features extracted from the Discrete Wavelet Transform (DWT) technique were then tested. The p-value was insignificant and result did not turn out well. Therefore, another processing method known as HOS was selected due to its few advantages mentioned in a few journals. The MATLAB program then has to be edited and the process has to be redone. Such inevitable circumstances require me to speed up my pace and compensate the lost time according to the Gantt chart. Fortunately, majority of the HOS features tested has shown good results of p-values less than 0.0001 and it is ready to be classified. The sets of training and testing of the classifiers is also confusing. However, it is much easier to understand with some help providing by the supervisor. I am glad and happy to give up my engineering job to pursue my interest in biomedical field. It is worth to exchange for a four years biomedical education that provided me with great insights. The opportunity to witness the passion of researchers is motivating. One of the examples is my supervisor, no matter how busy or tired he is. He has never fails to be positive and always trying to improve to excel his researches to increase the quality of life. Through him, I have learnt that building a system through the integration of mathematics, biology and science can helps in early detection of epilepsy. Though the disease is not life threatening but it provides awareness for the needy and allows them to seek early treatments. Only then, I understand and appreciate the purpose of capstone project. Moreover, the challenges I have encountered along my way, moulds my perseverance, while the new experiences strengthen my weakness. BME499 CAPSTONE PROJECT FINAL REPORT 43 REFERENCE [1] Anatomical Description of the Human Head http://alexandria.tue.nl/repository/books/642185.pdf [2] Ang, K.K., Quek, C. (2006). Stock Trading Using RSPOP: A novel rough set neurofuzzy approach. IEEE Transactions on Neural Networks, in press. [3] A Teen’s Guide to Epilepsy http://www.epilepsy.ca/eng/content/teens.html [4] Babloyantz, A. (1986). Evidence of chaotic dynamics during sleep cycle. In Dimensions and entropies in Chaotic system, ed. G.Mayer-Kress, Springer-Verlag, Berlin. [5] Beatty, Jackson. (2001).The Human Brain: Essential of Behavioral Neuroscience. Thousand Oaks,California; London: Sage Publications, Inc. [6] Chua, K. C., Chandra, V., U, Rajendra, Acharya., Lim, C.M. (2009). Analysis of epileptic EEG signals using higher order spectra. J Med Eng Technology; 33(1):4250. [7] Complex Partial Seizure http://en.wikipedia.org/wiki/Complex_partial_seizure [8] Eric R.Kandel, James H.Schwartz, & Thomas M.Jessell. 4th Edition (2000). Stamford, Conn.: Appleton & Lange, McGraw-Hill [9] Gan Eveline (2009). Epilepsy: Everyday is a struggle. p.23. Retrieved from http://www.channelnewsasia.com/stories/specialreport/news/446692_96/1/.html [10] Identifying Neurotransmitters http://en.wikipedia.org/wiki/Neurotransmitter#Identifying_neurotransmitters [11] Kannathal, N., Acharya, U. R., Joseph, P., and Ng, E. Y.K. (2006). Analysis of EEG signals with and without reflexology using FFT and auto regressive modelling techniques. J. Chin. Clin. Med. 1(1):12-20. [12] Lu, H., Wang, M., and Yu, H. (2005).EEG Model and Location in Brain when Enjoying Music. Proceedings of the 27th Annual IEEE Engineering in Medicine and Biology Conference Shanghai: China. 2695-2698. BME499 CAPSTONE PROJECT FINAL REPORT 44 [13] Nikias, C.L., Mendel, J.M. (1993). Signal Processing with Higher Order Spectra. IEEE signal processing magazine. 10-37 [14] Nikias, C.L., Rughuveer, M.R. (1987). Bispectrum estimation: A digital signal processing framework. Proc. IEEE. 75. 869-890 [15] Ng, G.S., Quek, C., Jiang, H. (2008). FCMAC-EWS: A bank failure early warning system based on a novel localized pattern learning and semantically associative fuzzy neural network. Expert Systems with Application, 34(2):989-1003. [16] Quek, C., Pasquier, M., Lim, B. (2006). POP-TRAFFIC: A Novel Fuzzy Neural Approach to Road Traffic Analysis and Prediction. IEEE Transactions on Intelligent Transportation Systems, 7(2), 133-146. [17] Schater, S.C. (1998).The Brainstorms companion:epilepsy in our view. New York: Raven Press; 994. activity. Phys Rev Lett, 80. 5019-22. [18] Singh, Anuradha. (2006). 100 questions & answers about epilepsy. Sudbury, Mass: Jones and Bartlett Publishers [19] Specht, Donald. F. (1990), Probabilistic Neural Networks. Pergamon Press pie on Neural Networks, Vol. 3. 109 118. [20] Subha, D. Puthankattil., Joseph, Paul. K., U, Rajendra. Acharya., Lim, C. M. (2010). EEG Signal Analysis: A Survey. J Med System; 34: 195-212. doi:10.1007/s.10916008-9231.z [21] Swami, A., Mendel, C. M., Nikias C.L. (2000).Higher-Order Spectral Analysis (HOSA) Toolbox, version 2.0.3. [22] Tomohiro, Takagi., Michio, Sugeno. (1985). Fuzzy identification of systems and its applications to modeling and control. IEEE Transactions on systems, man, and cybernetics, Vol. SMC-15. 116-132. [23] Types of Seizures http://www.epilepsyfoundation.org/about/types/types/index.cfm [24] Vagus Nerve Anatomy http://en.wikipedia.org/wiki/Vagus_nerve BME499 CAPSTONE PROJECT FINAL REPORT 45 APPENDIX A- DATA OF HOS FEATURES ________________________________________________________________________ HOS FEATURES FOR NORMAL EEG SIGNAL Normal Parameter 1 Parameter 2 Parameter 3 Parameter 4 Parameter 5 Parameter 6 Parameter 7 Parameter 8 Parameter 9 Parameter 10 Parameter 11 Parameter 12 Parameter 13 Parameter 14 Parameter 15 Parameter 16 Parameter 17 Parameter 18 Parameter 19 Parameter 20 Parameter 21 Parameter 22 Parameter 23 Parameter 24 Parameter 25 Parameter 26 Parameter 27 Parameter 28 Parameter 29 Parameter 30 Parameter 31 Parameter 32 Parameter 33 Parameter 34 Parameter 35 Parameter 36 Parameter 37 Parameter 38 Parameter 39 Parameter 40 Parameter 41 Parameter 42 Parameter 43 Parameter 44 Parameter 45 ent1 0.6653 0.6608 0.6798 0.6678 0.655 0.6935 0.5813 0.6806 0.608 0.6423 0.6404 0.7131 0.6801 0.6341 0.6335 0.7109 0.6505 0.7342 0.616 0.6343 0.6663 0.6425 0.6628 0.6267 0.6462 0.6593 0.6296 0.6969 0.7 0.6629 0.6892 0.7342 0.7503 0.7053 0.6366 0.6839 0.6479 0.6458 0.6409 0.6522 0.6439 0.6979 0.7029 0.6848 0.6065 ent2 0.4215 0.4324 0.4773 0.4299 0.358 0.4313 0.2701 0.4642 0.1831 0.3619 0.3866 0.5178 0.3821 0.3014 0.263 0.5015 0.4146 0.5586 0.4113 0.411 0.4943 0.4108 0.4836 0.3917 0.4117 0.425 0.4242 0.4854 0.5305 0.4711 0.5304 0.5801 0.605 0.4729 0.399 0.4302 0.4092 0.3691 0.3244 0.3514 0.4245 0.4468 0.531 0.4784 0.3391 entPh 3.578 3.5555 3.5725 3.5535 3.5562 3.5683 3.5595 3.5655 3.5077 3.5531 3.4908 3.5695 3.5269 3.4957 3.5241 3.5648 3.5451 3.5688 3.5531 3.5725 3.5576 3.5359 3.5691 3.4238 3.46 3.5737 3.5627 3.5648 3.5781 3.5713 3.5699 3.57 3.5327 3.5608 3.5773 3.573 3.5745 3.5379 3.5752 3.433 3.5725 3.5739 3.571 3.5624 3.5333 BME499 CAPSTONE PROJECT FINAL REPORT mAmp 4.70E+07 4.03E+07 6.58E+07 1.07E+08 6.19E+07 5.87E+07 1.92E+08 5.12E+07 8.24E+07 2.09E+08 3.15E+08 4.57E+07 6.60E+07 2.85E+08 2.59E+08 3.21E+07 3.02E+08 5.08E+07 1.63E+08 7.95E+07 8.86E+07 1.37E+08 3.93E+07 1.13E+08 9.07E+07 3.63E+07 1.15E+08 4.37E+07 2.63E+07 7.35E+07 3.37E+07 3.16E+07 5.23E+07 9.23E+07 2.31E+08 3.64E+07 2.52E+08 2.74E+08 1.98E+08 7.70E+07 2.51E+08 1.31E+07 2.45E+07 2.27E+07 1.41E+08 wc1 2.8332 21.3827 9.7713 18.4626 17.8593 15.7782 4.8067 17.5401 8.8682 17.9730 15.5959 18.8289 16.8770 16.9071 18.3373 46.0330 17.3862 21.9356 14.8524 13.7613 10.4685 15.0840 16.8269 15.8571 17.5897 14.6409 15.2483 8.3179 15.4465 13.4217 12.6346 16.5157 13.5326 18.1181 17.3412 26.7603 14.5753 16.6411 17.5938 21.1048 15.2316 15.6043 13.5467 17.9208 15.0471 wc2 0.6906 6.0413 6.8316 9.7674 14.2923 5.3716 1.3068 5.6585 2.8000 11.1968 7.5284 14.4457 7.1350 9.1428 13.5913 18.3463 11.1741 13.4507 9.2184 8.1187 7.8722 9.7279 3.7026 6.9554 9.6410 6.1277 8.0083 7.5046 23.1345 9.1778 5.4312 6.6971 3.7490 7.2880 12.1068 23.5293 9.7142 11.1976 14.3618 14.1540 6.3854 9.2320 18.9832 8.0277 8.9085 wc3 15.5231 15.8907 16.2404 16.9162 16.8503 18.0735 12.7004 16.6724 14.2485 17.9727 17.2576 19.0094 19.0857 18.0764 18.3501 18.5916 17.3473 20.8987 15.5548 16.4189 16.2010 16.0266 17.0030 16.6497 16.7875 17.4816 16.6984 17.4584 17.6253 16.3127 16.4169 19.3043 22.1889 18.5981 17.7910 18.0002 17.6628 17.8553 18.5156 19.3273 17.0967 18.5517 18.6249 18.3082 17.1118 wc4 6.2188 6.3208 7.0002 7.0920 7.7740 7.2605 4.7074 6.7162 5.3367 9.0538 8.1111 9.0944 8.5385 9.0066 10.1124 7.7059 9.0373 9.2842 7.8068 7.8939 7.2173 8.2549 7.9221 7.3350 7.7806 8.8639 8.0815 7.3732 7.7188 7.8265 7.3206 8.5446 8.7204 7.7472 8.4365 8.2910 7.9670 8.9386 9.7761 8.7243 8.4090 9.1325 9.1714 7.9682 8.2457 46 Parameter 46 Parameter 47 Parameter 48 Parameter 49 Parameter 50 Parameter 51 Parameter 52 Parameter 53 Parameter 54 Parameter 55 Parameter 56 Parameter 57 Parameter 58 Parameter 59 Parameter 60 Parameter 61 Parameter 62 Parameter 63 Parameter 64 Parameter 65 Parameter 66 Parameter 67 Parameter 68 Parameter 69 Parameter 70 Parameter 71 Parameter 72 Parameter 73 Parameter 74 Parameter 75 Parameter 76 Parameter 77 Parameter 78 Parameter 79 Parameter 80 Parameter 81 Parameter 82 Parameter 83 Parameter 84 Parameter 85 Parameter 86 Parameter 87 Parameter 88 Parameter 89 Parameter 90 Parameter 91 Parameter 92 Parameter 93 Parameter 94 Parameter 95 Parameter 96 Parameter 97 0.6331 0.7301 0.6545 0.6763 0.6775 0.7049 0.6863 0.621 0.5948 0.7033 0.6108 0.674 0.7468 0.7543 0.7357 0.7275 0.7487 0.7399 0.7156 0.7663 0.7877 0.7246 0.7179 0.7248 0.7486 0.7561 0.7373 0.7261 0.7585 0.753 0.7146 0.7413 0.7508 0.7649 0.7266 0.7246 0.7277 0.7628 0.759 0.7388 0.714 0.7519 0.7131 0.7435 0.7382 0.713 0.7073 0.7067 0.6519 0.6488 0.6956 0.6893 0.3886 0.5831 0.4696 0.4481 0.4697 0.484 0.4699 0.378 0.3139 0.5407 0.3324 0.5055 0.5899 0.5793 0.5797 0.569 0.6062 0.592 0.581 0.5504 0.582 0.5852 0.5747 0.5564 0.5931 0.5763 0.4902 0.527 0.6226 0.5877 0.5667 0.5316 0.3458 0.5498 0.5455 0.5251 0.5173 0.6386 0.5869 0.5712 0.5242 0.532 0.5329 0.6071 0.5863 0.5063 0.4943 0.5282 0.3745 0.3403 0.5238 0.4741 3.527 3.5719 3.4952 3.5603 3.5083 3.5747 3.5391 3.5249 3.5618 3.5771 3.5449 3.571 3.5716 3.5756 3.5781 3.5772 3.5763 3.576 3.5757 3.5709 3.5681 3.5766 3.5559 3.5768 3.5771 3.5748 3.5717 3.574 3.5743 3.5725 3.5725 3.5759 3.5711 3.564 3.5791 3.5254 3.5587 3.576 3.5777 3.5734 3.5767 3.5709 3.5677 3.5761 3.578 3.5738 3.5659 3.5704 3.5667 3.5415 3.571 3.5511 BME499 CAPSTONE PROJECT FINAL REPORT 9.65E+07 2.69E+07 7.05E+07 3.26E+07 2.23E+07 1.19E+07 2.12E+07 7.99E+07 9.30E+07 2.30E+07 9.18E+07 2.09E+07 6.17E+07 5.18E+07 1.04E+08 8.18E+07 6.47E+07 9.70E+07 1.75E+08 2.17E+08 9.31E+07 2.69E+08 1.28E+08 8.89E+07 5.56E+07 4.67E+07 1.78E+08 5.93E+07 5.28E+07 5.32E+07 1.33E+08 1.65E+08 9.54E+07 5.61E+07 1.79E+08 9.11E+07 6.71E+07 4.20E+07 3.77E+07 6.30E+07 9.46E+07 1.32E+08 1.53E+08 6.46E+07 4.67E+07 4.91E+07 8.98E+07 1.09E+08 3.50E+08 2.50E+08 6.29E+07 4.35E+07 16.8901 15.2001 13.2438 13.3322 11.6810 17.4159 19.8429 15.8875 17.1906 52.9503 16.2072 20.0572 123.2505 21.2825 17.8876 15.5575 20.3451 20.4632 18.1143 11.7983 20.9500 15.9903 7.5520 30.2541 48.1632 10.4162 17.6112 18.2658 32.6094 32.1391 15.3009 11.4079 12.3254 18.7462 18.4704 51.9833 29.0205 18.6890 41.2413 16.6170 15.0938 15.9059 18.0313 101.4129 20.5337 19.3481 22.7685 11.6882 19.9906 18.0131 18.3512 20.8720 10.2508 6.8565 9.5614 7.2937 7.9839 4.9490 12.9050 11.0295 16.0757 24.4431 11.9075 7.7290 113.8084 15.0838 9.1866 5.9266 9.3544 6.8841 16.5302 7.1260 14.6780 8.1147 6.2182 11.8759 12.1611 3.0299 5.8727 9.1470 20.7528 19.0333 8.7926 23.5874 7.0044 8.6811 11.3416 33.7283 18.7483 8.1883 15.0462 8.2777 4.5339 4.2902 8.5597 27.5777 9.4536 11.3173 4.9090 9.5947 15.4760 12.1881 13.7238 10.7103 16.6757 18.6859 15.8909 16.0869 17.3558 18.3866 18.5634 16.8386 16.6184 17.5016 16.6957 15.6774 20.6100 21.2670 19.7354 19.8498 21.3089 20.4939 19.2937 23.4303 23.9087 19.0209 19.0626 19.9871 20.6921 20.9938 21.3962 19.9919 21.6167 21.4254 19.3047 21.5077 21.6156 21.9082 19.9208 19.1494 20.3784 21.8762 21.2883 20.9196 19.2675 22.0813 19.6130 20.4775 20.6099 18.4354 18.7307 18.5574 18.5025 18.5780 18.6324 18.3159 8.3297 8.0323 7.2533 6.9275 7.5654 7.7502 8.7892 8.2603 8.7446 7.2313 9.0879 6.9945 8.6135 9.0075 8.5923 7.9278 9.1035 9.3660 8.6181 9.4118 9.3903 8.2530 7.6817 8.3800 8.8637 8.5944 8.4496 7.7288 9.3300 8.6747 8.4789 8.9225 8.2344 8.5229 8.7105 7.6931 7.7544 9.2435 8.3482 9.0078 8.3956 8.4734 7.9233 8.2583 7.9244 8.2975 8.5829 8.4351 9.4077 9.6567 9.3883 8.2240 47 Parameter 98 Parameter 99 Parameter100 0.7117 0.7154 0.6564 0.4811 0.5497 0.4054 3.5728 3.5178 3.5373 4.13E+07 9.37E+07 3.36E+08 12.4408 7.9596 16.1264 7.9796 10.3286 8.5258 18.6885 17.9616 17.9045 7.9141 8.0973 8.3778 wc3 9.6499 9.4298 9.1250 8.8416 14.2679 9.6003 8.2421 9.2440 10.3723 9.6047 8.4440 8.9473 7.0209 10.5704 12.1855 8.1321 13.6153 10.3405 7.5340 9.5041 8.6075 9.5085 10.8098 9.6834 8.4580 8.9744 10.1568 8.5045 9.0353 9.3795 8.4761 8.8760 6.9894 5.7782 8.1126 5.4437 10.9318 10.8340 11.2503 7.3092 7.2520 9.3347 9.5161 8.2277 wc4 4.5116 4.1667 4.1383 3.8357 5.4863 4.0207 3.5825 3.8129 4.4213 4.1940 3.6751 4.0438 3.4522 4.6448 4.9298 3.6143 5.5109 4.8755 3.4406 4.3030 3.8850 4.5205 4.1203 4.1053 4.0582 3.8004 4.5242 3.5373 3.8939 3.6847 4.0823 3.9129 3.2755 2.9029 3.7493 3.1117 4.2825 4.1597 4.5529 3.5926 3.1338 3.9465 4.0364 3.6905 HOS FEATURES FOR BACKGROUND SIGNAL Background Parameter 1 Parameter 2 Parameter 3 Parameter 4 Parameter 5 Parameter 6 Parameter 7 Parameter 8 Parameter 9 Parameter10 Parameter 11 Parameter 12 Parameter 13 Parameter 14 Parameter 15 Parameter 16 Parameter 17 Parameter 18 Parameter 19 Parameter 20 Parameter 21 Parameter 22 Parameter 23 Parameter 24 Parameter 25 Parameter 26 Parameter 27 Parameter 28 Parameter 29 Parameter 30 Parameter 31 Parameter 32 Parameter 33 Parameter 34 Parameter 35 Parameter 36 Parameter 37 Parameter 38 Parameter 39 Parameter 40 Parameter 41 Parameter 42 Parameter 43 Parameter 44 ent1 0.5468 0.5327 0.5353 0.5096 0.6458 0.5265 0.4723 0.5073 0.5581 0.5344 0.4804 0.5324 0.4398 0.575 0.5951 0.5063 0.6358 0.5709 0.4447 0.5216 0.5064 0.5485 0.5463 0.5388 0.5127 0.5094 0.563 0.4853 0.511 0.5164 0.5123 0.5155 0.4244 0.3842 0.5 0.3891 0.5717 0.546 0.5776 0.4728 0.4099 0.5293 0.5242 0.4933 ent2 0.3743 0.3506 0.2893 0.1799 0.2929 0.2177 0.1524 0.1725 0.3173 0.2843 0.1693 0.3577 0.1768 0.3486 0.2925 0.2505 0.371 0.422 0.1105 0.1598 0.2067 0.3844 0.2809 0.2564 0.3204 0.2774 0.3294 0.2041 0.2839 0.2521 0.3273 0.2586 0.1634 0.183 0.2688 0.2075 0.3368 0.2253 0.295 0.2562 0.1541 0.2397 0.1749 0.2352 entPh 3.4188 3.4136 3.5737 3.5377 3.5711 3.4181 3.5103 3.5776 3.5444 3.5504 3.5577 3.5274 3.5256 3.5109 3.5727 3.4316 3.5771 3.5688 3.5603 3.5548 3.5732 3.5688 3.5772 3.5436 3.5354 3.5596 3.5418 3.5743 3.4908 3.5491 3.4965 3.561 3.4 3.5589 3.5734 3.3999 3.4042 3.5774 3.5765 3.5633 3.5706 3.5773 3.5731 3.56 BME499 CAPSTONE PROJECT FINAL REPORT mAmp 4.2741E+07 1.1543E+08 4.0812E+07 4.0043E+07 8.1497E+08 6.0707E+07 3.8241E+07 1.8159E+07 9.6380E+07 1.7963E+07 5.4297E+06 9.8529E+07 1.8146E+07 1.7932E+07 1.6481E+08 5.5040E+07 1.4282E+08 1.9169E+07 5.9306E+07 1.7541E+07 6.1440E+07 4.0881E+07 5.4076E+06 1.0093E+08 3.7136E+07 5.0234E+06 7.4553E+06 2.8529E+06 4.6518E+07 4.1450E+07 3.9142E+07 1.8628E+07 9.1594E+07 1.0967E+08 3.5248E+07 9.6484E+07 6.2860E+07 2.8226E+07 7.2284E+07 5.9149E+07 9.3448E+06 1.2938E+08 1.0312E+08 3.1871E+07 wc1 9.2870 5.5961 8.5404 8.3733 7.9379 5.2311 3.2793 5.0610 4.4080 7.3762 4.4826 6.7810 4.2050 8.4827 19.8877 7.4874 9.6089 9.2115 3.2421 2.0207 8.2159 7.6799 3.7535 7.5239 4.9563 3.4712 33.2129 5.2691 13.3349 2.1739 5.4320 5.5852 2.9595 3.8419 9.6766 3.8686 9.0340 5.0920 0.9425 2.5306 2.6609 5.8229 1.2560 2.8303 wc2 4.7006 2.5709 3.7322 3.2784 2.8344 2.1059 1.9365 2.3845 3.0199 3.5285 2.4952 3.0061 3.0094 3.8890 5.9832 3.2471 3.9548 5.4465 2.6294 2.1658 3.6541 4.9664 2.9434 3.2861 2.2445 2.7504 42.2619 2.4990 8.1384 1.3561 2.2192 3.2595 1.4072 1.4462 3.1261 2.4530 3.7041 2.3561 0.9324 2.7932 2.2206 3.1772 1.0661 2.2975 48 Parameter 45 Parameter 46 Parameter 47 Parameter 48 Parameter 49 Parameter 50 Parameter 51 Parameter 52 Parameter 53 Parameter 54 Parameter 55 Parameter 56 Parameter 57 Parameter 58 Parameter 59 Parameter 60 Parameter 61 Parameter 62 Parameter 63 Parameter 64 Parameter 65 Parameter 66 Parameter 67 Parameter 68 Parameter 69 Parameter 70 Parameter 71 Parameter 72 Parameter 73 Parameter 74 Parameter 75 Parameter 76 Parameter 77 Parameter 78 Parameter 79 Parameter 80 Parameter 81 Parameter 82 Parameter 83 Parameter 84 Parameter 85 Parameter 86 Parameter 87 Parameter 88 Parameter 89 Parameter 90 Parameter 91 Parameter 92 Parameter 93 Parameter 94 Parameter 95 0.5363 0.5296 0.552 0.7181 0.6172 0.5708 0.5407 0.7071 0.57 0.5323 0.5087 0.629 0.4918 0.5148 0.5772 0.5933 0.5815 0.5778 0.5485 0.5375 0.5098 0.37 0.5188 0.5647 0.5531 0.566 0.4851 0.5503 0.5364 0.5789 0.5282 0.4757 0.6884 0.5109 0.5591 0.5968 0.5294 0.5403 0.5593 0.5328 0.6778 0.6027 0.5401 0.5856 0.3583 0.5153 0.6691 0.6095 0.4941 0.5603 0.4374 0.3426 0.2823 0.2565 0.4934 0.4345 0.2316 0.3463 0.4383 0.3724 0.2737 0.2397 0.3662 0.1753 0.3323 0.3311 0.3655 0.3932 0.3015 0.3717 0.3616 0.2612 0.1656 0.2317 0.2269 0.3862 0.3821 0.1373 0.3835 0.1931 0.2718 0.2395 0.1485 0.4075 0.1646 0.3408 0.2362 0.292 0.1411 0.2969 0.3844 0.4228 0.4198 0.3078 0.408 0.1961 0.2374 0.4321 0.2971 0.246 0.353 0.1799 3.534 3.5612 3.5664 3.5792 3.5564 3.5764 3.5483 3.5688 3.5528 3.575 3.5258 3.5674 3.5703 3.5452 3.5648 3.5646 3.5683 3.5772 3.5505 3.4923 3.3446 3.5421 3.5572 3.5784 3.5732 3.5514 3.459 3.4111 3.5521 3.5735 3.5596 3.5557 3.5767 3.5425 3.5734 3.5792 3.5591 3.5409 3.5718 3.5661 3.5724 3.5674 3.5488 3.4973 3.5153 3.5772 3.5759 3.5776 3.5776 3.511 3.4222 BME499 CAPSTONE PROJECT FINAL REPORT 2.8410E+07 7.2857E+06 1.0945E+08 6.8257E+07 2.5279E+07 3.2298E+08 1.5242E+08 1.3030E+08 5.1372E+07 6.7940E+07 1.9700E+07 1.3729E+08 3.0609E+06 6.6544E+07 2.0766E+06 1.3938E+08 1.0890E+07 1.2651E+07 1.8421E+07 3.7888E+07 5.6376E+07 1.6022E+08 7.5889E+06 1.9476E+08 2.7990E+07 5.4312E+07 1.6315E+08 3.7898E+07 2.2566E+07 2.2800E+06 3.6587E+07 3.5310E+07 1.0255E+08 1.2393E+08 1.4008E+08 1.6500E+08 7.7775E+06 2.7035E+07 2.4714E+06 3.5777E+07 7.7736E+07 1.3986E+07 8.9422E+06 1.3407E+07 1.1961E+08 1.1448E+07 3.4595E+08 1.5303E+08 5.4246E+06 1.4669E+08 1.1453E+08 6.8207 4.3052 4.3130 5.3274 10.1876 4.6044 7.8051 16.1197 2.6014 10.7410 6.1253 8.7904 4.1694 7.3490 6.6254 11.0569 5.3032 6.8894 5.3966 7.4238 7.3443 4.9733 2.7269 3.9513 14.7574 8.0590 5.0033 5.7309 4.7317 5.3699 16.1172 3.4465 9.5079 3.5688 11.2017 4.7607 4.5290 11.0107 6.4037 6.2674 7.6353 15.3225 8.5089 9.5157 4.9953 3.7474 8.8138 3.3087 4.7212 8.1576 7.2696 4.1557 2.4613 3.4432 3.8498 3.9698 2.7844 2.9172 7.6666 2.0670 3.7373 1.7094 5.2376 2.4997 3.2714 3.2405 3.5105 2.6391 3.6015 2.1383 4.6494 3.1613 2.7159 2.0442 1.7113 3.8225 3.8383 2.2784 4.1541 3.0238 2.3830 7.1657 2.7939 3.5983 2.3458 4.3227 3.0678 2.9149 3.4120 3.5612 2.9988 3.1266 13.5702 0.9529 2.0852 2.5082 2.2110 3.6178 3.2862 3.2081 4.1824 2.9982 9.2060 9.9808 10.1749 17.7535 12.1791 12.3004 9.2666 17.4912 10.7087 9.8253 8.8923 13.6167 8.6586 8.4308 11.4157 11.3208 10.9091 11.0871 9.6277 9.1868 8.2719 5.5298 9.5674 11.1230 9.3111 9.9659 9.7690 9.6731 9.6654 11.7709 9.4028 8.1096 16.6898 10.1015 10.1253 12.4509 9.5519 10.7712 10.6802 8.7105 15.5381 11.2970 9.4912 10.8757 5.1798 8.9847 14.9629 13.2082 8.6135 10.3154 7.0076 4.4801 3.9379 4.5110 7.1832 5.1863 4.4344 4.2259 6.6890 4.3540 3.8648 4.1271 5.2929 3.6267 3.6824 4.4808 4.7714 4.7956 4.5591 4.5381 4.4300 3.6104 3.0495 4.0350 4.5854 4.2587 4.6043 3.8129 4.6188 4.1948 4.5701 4.3418 3.6721 6.3137 3.9642 4.2593 4.7882 4.0195 4.3139 4.3521 4.2156 6.1104 5.1504 4.1982 4.7507 2.8758 3.7612 6.0013 4.8951 3.7181 4.3896 3.2985 49 Parameter 96 Parameter 97 Parameter 98 Parameter 99 Parameter 100 0.6527 0.5045 0.5907 0.3968 0.5075 0.2617 0.2145 0.3331 0.1602 0.2567 3.5679 3.5742 3.5746 3.4409 3.54 1.3882E+08 3.1259E+06 8.2211E+07 1.0365E+08 3.9011E+07 3.8113 4.4524 4.3727 5.4284 4.5391 2.6733 2.4788 2.5653 2.5723 1.9706 14.8203 8.8691 11.9605 6.0998 8.8381 5.7663 3.6874 4.9203 3.0739 3.7910 HOS FEATURES FOR EPILEPSY SIGNAL Epileptic Parameter 1 Parameter 2 Parameter 3 Parameter 4 Parameter 5 Parameter 6 Parameter 7 Parameter 8 Parameter 9 Parameter 10 Parameter 11 Parameter 12 Parameter 13 Parameter 14 Parameter 15 Parameter 16 Parameter 17 Parameter 18 Parameter 19 Parameter 20 Parameter 21 Parameter 22 Parameter 23 Parameter 24 Parameter 25 Parameter 26 Parameter 27 Parameter 28 Parameter 29 Parameter 30 Parameter 31 Parameter 32 Parameter 33 Parameter 34 Parameter 35 Parameter 36 Parameter 37 Parameter 38 Parameter 39 Parameter 40 Parameter 41 Parameter 42 ent1 0.6889 0.6868 0.7077 0.5671 0.6209 0.5996 0.7544 0.4388 0.5376 0.7455 0.7337 0.573 0.527 0.6556 0.6274 0.4431 0.6966 0.6973 0.5972 0.5251 0.6396 0.6664 0.6396 0.6668 0.6463 0.5268 0.6935 0.5748 0.6353 0.7099 0.5306 0.6334 0.5676 0.7363 0.7015 0.5011 0.7062 0.6514 0.4805 0.6019 0.6798 0.5401 ent2 0.5125 0.4996 0.5659 0.2754 0.4345 0.3023 0.4478 0.1462 0.1882 0.6076 0.6064 0.1914 0.2239 0.3657 0.3452 0.2007 0.4935 0.4183 0.3546 0.1716 0.3859 0.4646 0.4279 0.5181 0.3654 0.2063 0.5495 0.3329 0.3001 0.5743 0.1916 0.4361 0.4 0.5793 0.5557 0.0789 0.5423 0.5273 0.1894 0.2671 0.4313 0.234 entPh 3.3951 3.5045 3.5716 3.5372 3.4236 3.5118 3.5186 3.4313 3.5597 3.5453 3.4674 3.4118 3.5341 3.4962 3.5297 3.5649 3.5611 3.5423 3.4248 3.5725 3.422 3.5395 3.5376 3.5537 3.5255 3.5471 3.5497 3.5546 3.5713 3.5638 3.5607 3.3024 3.4889 3.4666 3.5677 3.5437 3.4812 3.5172 3.5147 3.495 3.5546 3.5632 BME499 CAPSTONE PROJECT FINAL REPORT mAmp 7.47E+10 7.11E+10 2.60E+10 2.20E+09 2.05E+10 9.04E+08 1.39E+10 3.17E+10 1.92E+10 8.31E+10 3.54E+10 6.65E+10 1.05E+11 1.45E+09 5.11E+09 7.08E+08 1.14E+11 2.74E+09 6.21E+10 4.81E+09 1.23E+09 4.97E+09 6.62E+09 1.29E+10 3.13E+10 4.69E+09 7.75E+10 5.32E+10 3.35E+09 5.79E+10 1.24E+10 1.03E+09 2.10E+10 3.54E+10 6.64E+10 3.40E+09 1.38E+11 3.23E+09 5.42E+08 3.61E+09 4.61E+10 2.00E+10 wc1 18.4051 18.2409 20.2247 10.3980 14.2566 15.4071 22.4715 11.9494 11.3421 24.2489 20.0806 13.6438 14.3176 13.4513 9.5751 6.2638 16.4640 16.0862 12.0828 13.5263 13.4714 16.4543 16.0565 15.4091 19.4026 13.3589 17.2018 11.2371 10.4039 17.0329 14.2177 12.1986 11.1920 19.8069 19.7371 11.8722 19.6662 14.2136 9.7402 10.7318 18.5041 10.9914 wc2 7.9880 8.0223 5.5538 8.7679 7.9225 9.5429 8.6489 9.9204 8.6340 11.7469 10.7297 8.6879 9.8168 6.0320 0.6876 2.5583 6.7387 4.1400 6.7843 9.4245 6.5954 6.8871 5.9160 6.4961 7.2881 9.7860 8.4269 6.6630 1.6676 10.1500 9.4193 5.4935 7.1078 9.9682 8.9772 8.6215 8.4069 5.7239 9.7831 1.6813 6.3332 9.8200 wc3 17.7792 17.6637 20.4704 13.5586 12.5714 13.0371 24.5414 12.6296 13.6621 23.5485 19.7337 13.0437 15.3347 13.9917 13.2607 7.6510 17.9731 16.8379 12.7658 15.4021 13.8010 16.4844 15.3905 15.0163 14.9749 13.8983 17.8180 11.8563 15.6066 17.9446 14.6897 13.0371 10.7098 19.6615 19.9698 12.4030 19.2655 13.4492 13.1048 14.3621 17.4077 13.4326 50 wc4 7.6611 7.2575 8.0995 8.1458 6.5239 7.2652 8.0314 9.5274 8.7210 11.1083 9.9679 7.6939 10.1238 5.7615 5.2380 3.1914 7.3481 6.5074 7.0596 9.9724 6.6993 7.5559 6.6936 7.6879 6.3790 9.1179 8.1075 6.6956 5.4567 9.0854 9.2032 6.0885 6.3616 9.5529 8.2873 8.2035 8.0911 6.3276 9.1277 4.9942 6.5018 8.9123 Parameter 43 Parameter 44 Parameter 45 Parameter 46 Parameter 47 Parameter 48 Parameter 49 Parameter 50 Parameter 51 Parameter 52 Parameter 53 Parameter 54 Parameter 55 Parameter 56 Parameter 57 Parameter 58 Parameter 59 Parameter 60 Parameter 61 Parameter 62 Parameter 63 Parameter 64 Parameter 65 Parameter 66 Parameter 67 Parameter 68 Parameter 69 Parameter 70 Parameter 71 Parameter 72 Parameter 73 Parameter 74 Parameter 75 Parameter 76 Parameter 77 Parameter 78 Parameter 79 Parameter 80 Parameter 81 Parameter 82 Parameter 83 Parameter 84 Parameter 85 Parameter 86 Parameter 87 Parameter 88 Parameter 89 Parameter 90 Parameter 91 Parameter 92 Parameter 93 0.5902 0.6136 0.5281 0.6172 0.7327 0.5982 0.7388 0.5742 0.622 0.7379 0.6412 0.5205 0.5936 0.6623 0.5228 0.5837 0.6128 0.6404 0.5397 0.6596 0.598 0.665 0.5219 0.6334 0.6406 0.724 0.658 0.4619 0.5739 0.5699 0.5953 0.6806 0.4895 0.7102 0.662 0.6795 0.587 0.4567 0.6275 0.5201 0.653 0.5561 0.7176 0.741 0.569 0.5164 0.5813 0.7653 0.6463 0.6498 0.6613 0.2521 0.3942 0.1973 0.3874 0.58 0.336 0.598 0.2886 0.3775 0.6097 0.3552 0.2306 0.3614 0.5027 0.2388 0.2962 0.4139 0.3933 0.1871 0.4639 0.21 0.4843 0.2609 0.4526 0.4023 0.5682 0.339 0.0907 0.2534 0.2334 0.3985 0.2986 0.0717 0.5744 0.4994 0.4979 0.1841 0.1862 0.2609 0.1875 0.3014 0.2352 0.5701 0.5492 0.4032 0.1052 0.2323 0.6038 0.3461 0.4519 0.4405 3.5756 3.5292 3.5443 3.5241 3.4899 3.5143 3.491 3.4947 3.5481 3.5777 3.5399 3.49 3.5708 3.4506 3.5223 3.5434 3.5545 3.4787 3.571 3.5227 3.5646 3.555 3.4526 3.4145 3.5059 3.4761 3.54 3.5566 3.4804 3.5408 3.5396 3.5238 3.4634 3.5524 3.5529 3.544 3.5001 3.4389 3.5219 3.4785 3.5471 3.5703 3.4645 3.5469 3.4286 3.493 3.5522 3.5769 3.5248 3.5053 3.4742 BME499 CAPSTONE PROJECT FINAL REPORT 5.42E+08 2.47E+10 4.72E+09 1.35E+10 1.36E+11 7.49E+09 8.03E+10 9.92E+09 1.52E+09 8.31E+09 7.12E+09 9.42E+09 1.48E+09 4.48E+09 1.13E+10 1.77E+10 1.49E+11 8.68E+10 1.02E+10 1.44E+10 1.06E+09 1.21E+09 4.50E+10 1.12E+10 7.12E+10 1.19E+11 8.13E+09 2.67E+09 1.88E+09 7.73E+09 1.87E+10 9.37E+08 4.03E+09 6.92E+10 7.88E+08 1.83E+09 9.86E+10 7.53E+10 5.90E+10 3.86E+10 5.23E+08 2.31E+09 6.42E+10 3.45E+09 2.66E+10 3.18E+09 2.83E+09 1.02E+10 3.32E+10 1.01E+10 7.93E+10 11.4396 11.4485 10.1507 13.2830 23.5100 12.0862 20.5829 14.2360 10.1377 20.2915 12.4134 12.9606 13.4948 14.1838 11.2504 10.6791 12.6358 16.0743 10.8864 16.0227 13.7124 13.7101 7.5731 13.6254 15.3635 20.3064 12.5698 11.6756 7.3422 16.0847 11.0928 8.7212 12.3559 20.6035 13.5606 17.3370 15.0829 12.1126 15.3760 13.4131 15.7852 8.7081 21.3796 22.0580 11.1529 12.7138 10.2822 20.1497 14.9294 14.3396 16.2198 6.5512 6.3352 3.5126 7.8843 9.8610 7.5318 11.8694 9.8391 4.8853 8.4972 3.6741 9.4763 6.3024 6.7231 9.8933 6.1308 7.2390 5.0004 8.7653 8.6890 8.0127 6.9404 4.0176 7.5682 8.1318 11.0483 4.1509 9.7108 1.5387 10.0983 5.7026 4.3826 9.0154 8.3960 7.1307 6.9063 9.1232 9.7463 5.9704 9.9195 10.3220 2.3221 9.1028 13.1645 6.7800 9.0693 1.9940 8.0796 7.8464 7.0193 5.3849 12.4006 13.0617 11.1002 14.0045 22.5110 13.0972 19.5919 14.6785 12.5750 21.4595 14.7441 13.9058 11.8645 14.1977 12.5138 12.0220 12.8342 16.0463 16.9592 14.4949 14.0432 14.3804 8.1604 13.0676 14.2272 19.0429 15.9111 12.8970 11.1337 15.7778 11.5649 16.6226 12.6468 20.3966 14.0106 16.1882 15.4518 12.5478 14.8335 14.3052 17.3047 10.5588 20.1763 21.8130 10.7559 13.0759 13.6669 22.4910 15.6304 14.3452 16.5808 51 6.2333 6.8679 4.0372 7.9963 9.7751 7.5598 10.0685 9.5579 5.5262 8.7052 5.3833 9.3484 6.0478 6.6925 8.4726 6.5341 7.0741 5.2939 10.9212 7.5327 8.0964 6.5485 4.1302 6.7260 7.5000 9.8576 5.6165 8.8780 4.6165 9.2261 5.9769 6.2373 8.4663 8.2993 6.5781 7.8800 9.0128 9.2899 6.2218 9.6843 9.2181 4.3076 8.9027 11.2148 6.2562 8.4610 4.6529 9.7291 7.7463 6.9944 5.8283 Parameter 94 Parameter 95 Parameter 96 Parameter 97 Parameter 98 Parameter 99 Parameter100 0.5358 0.528 0.5865 0.4863 0.4946 0.6914 0.6001 0.2399 0.1959 0.1454 0.207 0.1947 0.4516 0.3067 3.5668 3.5458 3.4816 3.5451 3.5131 3.4993 3.5645 BME499 CAPSTONE PROJECT FINAL REPORT 1.56E+10 6.65E+09 5.49E+08 9.41E+10 1.38E+10 4.11E+10 7.88E+09 11.3955 11.8396 11.9796 12.5710 10.7254 18.6015 14.2493 9.9592 9.8752 7.9916 9.6221 9.7255 10.7346 9.4313 13.0602 14.4817 13.7675 12.7911 12.8990 18.2191 14.1297 52 8.7246 9.9132 7.7615 9.0840 9.1270 9.4879 8.2262 APPENDIX B- MEETING LOGS ________________________________________________________________________ Meeting Log 1 Date of Meeting Venue Time : 14th August 2010 : Ngee Ann Polytechnic, Block 8, Level 3, Room 9A : 11.30am -12.30pm (1hr) Discussion Details: Dr Rajendra explains to me what is expected from my project development. I am required to understand the anatomy of the brain, what is Epilepsy, how seizures comes about, what are the current methods that the researcher has done and discuss the area on improvising early detection of epilepsy. I must also learn and progress my project with the knowledge of knowing everything by the fingertips in order to produce a good project outcomes. He also gives me eight journal articles to read and I must understand them. The 2nd meet up session will take place at the same place on 23rd August 2010, time: 11am. Meeting Log 2 Date of Meeting Venue Time : 23rd August 2010 : Ngee Ann Polytechnic, Block 8, Level 3, Room 9A : 11am – 12pm (1hr) Discussion Details: Dr Rajendra gives me a clear overview on the area of research. He asked if I have completed the eight journal articles and check if I can understand all the methodology that is being used and what are the types of features being used to obtain an automatic classification of the three clinical states such as pre-ictal, normal or ictal, as well as the types of features obtained to be fed into different types of classifiers in order to automatic detect the mental clinical states. Literature Review: I update Dr Raj what I have done over the week. I went to National Libraries for books on neurology, surfing online for researches on epilepsy and read up related journals to gather the information that aids in my project. Now I have a better understanding on the brain anatomy, biochemical states of the neurons, the cause and effect of epilepsy and seizures. I have also extended my source of information through newspaper articles and got to know about the population, computational data of epilepsy and appreciate the importance to have an early detection for epilepsy. Project Proposal: BME499 CAPSTONE PROJECT FINAL REPORT 53 Dr Raj has given me guidance of what is required to be included in my project proposal and ask me to come out with a simple process flow diagram to have an idea how I should carry out my proposal. The literature reviews is my guidelines which I can refer to get my idea to get new innovative ideas on what others has done and I allows me to explore what others have yet accomplish. Meeting Log 3 Date of Meeting Venue Time : 9th September 2010 : Ngee Ann Polytechnic, Block 8, Level 3, Room 9A : 11am-11.30am (30mins) Discussion Details: Short Meeting is about updating my progress and findings I have gathered from the literature review. The Matlab tutorial practices outcome and Dr Raj asks me if I have any questions on regards to the project. However, I am still reading on my journal papers for details and planning on my project development progress. The 4th meet up session will take place at the same place on 25th September 2010, time: 11am. Meeting Log 4 Date of Meeting Venue Time : 25th September 2010 : Ngee Ann Polytechnic, Block 8, Level 3, Room 9A : 11am-12pm (1hr) Discussion Details: Dr Raj prepared a few set of MATLAB worksheets for enhancing my MATLAB programming knowledge. He go through with me some of the basic programming commands, knowing how to plot different types of waveforms in the graph, setting the x,y axis, changing font size and adjust scaling. I am required to practice on the questions in the MATLAB worksheets, on top of my own MATLAB tutorials and I have to see him again. The 5th meet up session will take place at the same place on 2nd October 2010, time: 11am. Meeting Log 5 Date of Meeting Venue Time : 2nd October 2010 : Ngee Ann Polytechnic, Block 8, Level 3, Room 9A : 11am-12pm (1hr) BME499 CAPSTONE PROJECT FINAL REPORT 54 Discussion Details: Dr Raj taught plotting of the discrete time and frequency signals, advice me on the programming codes. He also reminded what is the important codes like stem (n,x) when we want to plot a discrete waveform in the graph and how to compute in a large scales type of EEG signals when we have many sets of EEG data. I need to have more MATLAB tutorial practices. Discussion also covers drafting the interim report for the coming submission in 8th Nov 2010. I have also informed Dr Raj that I be setting aside 10 for exam revision and will continue with literature review for Discrete Wavelet Transform (DWT) after exam. Should the literature review be done as per schedule, I will proceed with DWT programming and let Dr Raj review the results. Meeting Log 6 Date of Meeting Venue Time : 11th February 2011 : Ngee Ann Polytechnic, Block 8, Level 3, Room 9A : 11am -12pm (1hr) Discussion Details: Dr Raj reviewed on my 200 normal, 200 background and 100 epilepsy EEG data processed by the discrete wavelet transformation method through email. However, after performing the ANOVA analysis on all the data, the data is not significant. Hence, I am encouraged to try on Higher Order Spectra analysis (HOS). As I have too much information on DWT, I need to revise all the journal reading related to HOS and collect more information for HOS programming in extracting the HOS features. I am required to prepare another 3 sets (normal, background and epilepsy) of 100 EEG signals from Bonn University database and run them all to get the data for the various features. Will email Dr Raj the results and check if it is ok to proceed on for classifications. Meeting Log 7 Date of Meeting Venue Time : 26th February 2011 : Ngee Ann Polytechnic, Block 8, Level 3, Room 9A : 11am -12pm (1hr) Discussion Details: The data of the HOS features were emailed to Dr Raj and reviewed. The ANOVA test has shown good significant p-values of less than 0.0001. Hence, I need to start the preparation of MATLAB programming for each of the classifiers. This is to process all BME499 CAPSTONE PROJECT FINAL REPORT 55 the good HOS features and perform an automatic classification of epilepsy. The comparative study will be done based on the results of the various classifiers. Meanwhile, I also start to tabulate the tables to display the results in my Final Year report. Meeting Log 8 Date of Meeting Venue Time : 22nd March 2011 : Ngee Ann Polytechnic, Block 8, Level 3, Room 9A : 11.30am -12pm (30 mins) Dr Raj reviewed the results of the various classifications. The result is ok. I may start to write the first chapter for the Final Year report and show him the content of each chapter. I am required to write about the anatomy, epilepsy, seizures, EEG and etc as informative as possible. Chapter one will be on the fundamentals from Literature review. Chapter two will be on project methodology. Chapter three is all about results and discussion on the HOS extracted features, classifier performances and outcome. Chapter four will cover the summary, conclusion and recommendation. Chapter five and six is about project development and reflection respectively. He also reminded me about plagiarism when submitting the final year report and all references are to be cited accordingly. Meeting Log 9 Date of Meeting Venue Time : 11th April 2011 : Ngee Ann Polytechnic, Block 8, Level 3, Room 9A : 11.30am -12pm (30 mins) Chapter One on all literature review is done and reviewed by Dr Raj. However, I need to write more in Chapter Two regarding on the methodology, I need to improve on the numbers of tables that is used to describe my work. Need to show the distinct between the good and less significant data. Meeting Log 10 Date of Meeting Venue Time : 14th May 2011 : Ngee Ann Polytechnic, Block 8, Level 3, Room 9A : 11.30am -12pm (30 mins) Dr Raj reviewed the Final Year Report. It is ready for submission. The coming Poster Presentations and the information required for Poster are discussed. I need to refer to the Capstone handbook for more information BME499 CAPSTONE PROJECT FINAL REPORT and get the template ready. 56 APPENDIX C- PROGRAMMING CODES ________________________________________________________________________ 1. Main Program: Features extraction for three classes of EEG data. % HOSoneD.mat, a main program for the extraction of HOS features. clear all clc tmp = []; starttime=0; %Temporary space for data %maxFrm= 2048 (Length of Data) t = []; t1 =[]; t2 = []; t3=[]; t4=[];t5=[]; t6=[]; tH=[]; tWcob =[]; %Storing HOS features data nfft=256; shift=128; %nfft=128; shift=64; nv=load('O100.txt'); m = length(nv); nFrm = floor((m-nfft)/shift)+1; % Loading the EEG signal % Return the largest dimension of the EEG data % Perform FFT algoritm and rounding the contents in nFrm to the nearest integers if nFrm > 1 %Features Extraction perform by sub function [ent1,ent2,ent3,entPh,mAmp, H, WC]= bispFeaturesWSWcob(nv,nfft,shift); % Directory of containing the HOS extracted features t1 =[t1 ent1]; % Storing data for normalized bispectral entropy t2 =[t2 ent2]; % Storing data for normalized bispectral squared entropy t3 =[t3 ent3]; % Storing data for normalized bispectral cubed entropy t5 = [t5 mAmp]; % Storing data for mean bispectrum magnitude t6 = [t6 entPh]; % Storing data for bispectrum phase entropy tH = [tH; H]; % Storing data for moments of bispectrum tWcob =[tWcob; WC]; % Storing data for weighted center of bispectrum end ent1 = t1'; ent2 = t2'; ent3 = t3'; mAmp = t5'; entPh = t6'; Wcob = tWcob; H = tH; %Display result for normalized bispectral entropy %Display result for bispectral squared entropy %Display result for normalized bispectral cubed entropy %Display result for mean bispectrum magnitude %Display result for bispectrum Phase entropy %Display result for weighted center of bispectrum %Display result for moments of bispectrum BME499 CAPSTONE PROJECT FINAL REPORT 57 2. Sub Function for Main Program on Features extraction % Sub function of HOSoneD.mat % bispectral features with shift % bispectrum plotting % function of bisp_plot(input,Xsize) function [ent1,ent2,ent3,entPh,mAmp,H,wcob ]= bispFeaturesWSWcob(nv,Xsize,shift) m = length(nv); nFrm = floor((m-Xsize)/shift)+1; B_sum = zeros(Xsize/2, Xsize/4); sPt = 1; ePt = Xsize; for i = 1:nFrm input = nv(sPt:ePt); Fx_input = fft(input,Xsize); % Convert time domain to frequency domain by applying Fast Fourier Transform algorithm to the “input” Fx_input(1) = 0 + i*0; Fx_input(Xsize/2+2) = 0 + i*0; %set dc = 0 else interpolation will cause dc dependence %set = 0 else interpolation will cause problem % 3rd Cumulant Function of Bispectrum B_input = zeros(Xsize/2, Xsize/4); % Form the triangle at the Non-Redundant Region for k1 = 1:Xsize/2; for k2 = 1:min(k1,Xsize/2-k1) % Return the same size of array that is same as k1 and Xsize/2-k1with the smallest elements taken from Xsize/2-k1 B_input(k1,k2) = Fx_input(k1) * Fx_input(k2) * conj(Fx_input(k1+k2-1)); % The complex conjugate: real to imaginary. end end B_sum = B_sum+B_input; sPt = sPt+shift; ePt=ePt+shift; end; B_input = B_sum/nFrm; %x = [1 0 0 0; 1 2 0 0; 1 2 3 0; 1 2 3 4]; sxw = 0; sb = 0; syw = 0; asxw = 0; asb = 0; asyw = 0; for k1 = 1:Xsize/2; for k2 = 1:min(k1,Xsize/2-k1) sxw = sxw + k1*B_input(k1,k2); syw = syw + k2*B_input(k1,k2); asxw = asxw + k1*abs(B_input(k1,k2)); asyw = asyw + k2*abs(B_input(k1,k2)); sb = sb + B_input(k1,k2); asb = asb + abs(B_input(k1,k2)); end; end; BME499 CAPSTONE PROJECT FINAL REPORT 58 %sxw %sb %syw wcobx = abs(sxw)/abs(sb); wcoby = abs(syw)/abs(sb); awcobx = abs(asxw)/abs(asb); awcoby = abs(asyw)/abs(asb); wcob = [ wcobx wcoby awcobx awcoby]; B_ent2 = B_input(find(B_input)).*conj(B_input(find(B_input))); % Return a non-zero value. B_ent1 = sqrt(B_ent2); B_ent3 =(B_ent1.^3)./sum(B_ent1.^3); B_ent2 = B_ent2./sum(B_ent2); % Probability Computation B_ent1 = B_ent1./sum(B_ent1); [m,n] = size(B_ent2); ent2 = -sum(B_ent2.*log(eps+B_ent2))/log(m); %Log(m): An average of obtaining a relative bispectrum estimation ent1 = -sum(B_ent1.*log(eps+B_ent1))/log(m); ent3 = -sum(B_ent3.*log(eps+B_ent3))/log(m); % Defining the Bispectra phase entropy & Mean bispectra amplitude (mAmp) Equation for the features to be extracted B_phi = angle(B_input(find(B_input))); N = 36; p = zeros(1,N); theta=-pi; delTheta = 2*pi/N; for k3=1:N-1 tt = find(B_phi>=theta&B_phi<(theta+delTheta)); [m,n] = size(tt); p(k3) = m; theta = theta+delTheta; end; tt = find(B_phi>=theta&B_phi<=pi); [m,n] = size(tt); p(N) = m; %Probability Computation [m,n] = size(B_phi); p=p/m; entPh = -sum(p.*log(eps+p)); mAmp = sum(abs(B_input(find(B_input))))/m; %computing the Moments of Bispectra (diagonal 1st and 2nd moment) %the values of the H features extracted for diagonal components could be very small H1 = sum(log10(abs(B_input(find(B_input))))); H2 = 0;H3=0; BME499 CAPSTONE PROJECT FINAL REPORT 59 for i=2:Xsize/4 if abs(B_input(i,i))> eps H2=H2+log10(abs(B_input(i,i))); H3=H3+i*log10(abs(B_input(i,i))); end end; H4=0; for i=2:Xsize/4 if abs(B_input(i,i))> eps H4=H4+(i-H3)*(i-H3)*log10(abs(B_input(i,i))); end; end; H5 = 0; for k1 = 1:Xsize/2; for k2 = 1:min(k1,Xsize/2-k1) H5 = H5 + sqrt(k1^2+k2^2)*abs(B_input(k1,k2)); end; end; %H5 = log10(H5); H = [H1 H2 H3 H4 H5]; %B_input_imag = imag(B_input); %B_input_real = real(B_input); %B_inputimag_log = log10(abs(flipud(B_input_imag')+eps)); %avoid log(0) %figure(1), subplot(2,1,1, 'align'), imagesc(B_inputimag_log); colorbar; %B_inputreal_log = log10(abs(flipud(B_input_real')+eps)); %figure(1), subplot(2,1,2, 'align'), imagesc(B_inputreal_log); colorbar; %end 3. Various Classifiers Fuzzy Sugeno Classifier clear all; clc; close all; %Load the Testing and Training sets of data for pp=1:3 filename1=['testing',num2str(pp)] filename2=['training',num2str(pp)] load(filename1) load(filename2) load class; BME499 CAPSTONE PROJECT FINAL REPORT 60 %Training various HOS features p1 = training(:,1); p2 = training(:,2); p3 = training(:,3); p4 = training(:,4); p5 = training(:,5); p6 = training(:,6); p7 = training(:,7); p8 = training(:,8); %Define the three classes of Data t1 = class(:,1); t2 = class(:,2); t3 = class(:,3); p = [p1';p2';p3';p4';p5';p6';p7';p8']; t = [t1';t2';t3']; %Testing various HOS features test1 = testing(:,1); test2 = testing(:,2); test3 = testing(:,3); test4 = testing(:,4); test5 = testing(:,5); test6 = testing(:,6); test7 = testing(:,7); test8 = testing(:,8); test = [test1';test2';test3';test4';test5';test6';test7';test8']; ptest=test'; %18 0 and 18 1 fismat = genfis2(p',t',0.5,[0 0 0 0 0 0 0 0 0 0 0;1 1 1 1 1 1 1 1 1 1 1]); y=evalfis(ptest,fismat); outres=y'; yj=outres'; for i=1:length(yj) a=yj(i,:); maxi=max(a); %8 classes for j=1:3 if yj(i,j)==maxi yj(i,j)=1; else yj(i,j)=0; end end end yj result1=0; BME499 CAPSTONE PROJECT FINAL REPORT 61 result2=0; result3=0; for i=1:90 if(yj(i,1)==1) result1(i,1)=0.1; else result1(i,1)=0; end end for i=1:90 if(yj(i,2)==1) result2(i,1)=0.01; else result2(i,1)=0; end end for i=1:90 if(yj(i,3)==1) result3(i,1)=0.001; else result3(i,1)=0; end end result=result1+result2+result3; output=0; j=1; for i=1:90 if(result(i,1)==0.001) output(j,1)=1; else if(result(i,1)==0.01) output(j,1)=2; else output(j,1)=3; end end j=j+1; end y=output'; normwrong=0; normright=0; duringseizurewrong=0; duringseizureright=0; beforeseizurewrong=0; beforeseizureright=0; for i=1:30 if y(1,i)==1 duringseizureright=duringseizureright+1; BME499 CAPSTONE PROJECT FINAL REPORT 62 else duringseizurewrong=duringseizurewrong+1; end end for i=31:60 if y(1,i)==2 beforeseizureright=beforeseizureright+1; else beforeseizurewrong=beforeseizurewrong+1; end end for i=61:90 if y(1,i)==3 normright=normright+1; else normwrong=normwrong+1; end end ans=(beforeseizureright+duringseizureright+normright)/90*100; TN=normright; FP=normwrong; e=0 for i=1:60 if(y(i)==3) e=e+1 end end FN=e; TP=60-FN; sensi=(TP/(TP+FN))*100; speci=(TN/(TN+FP))*100; ppv=(TP/(TP+FP))*100; final(pp,:)=[TN;FN;TP;FP;ans;ppv;sensi;speci]' TN=num2str(TN) FN=num2str(FN) TP=num2str(TP) FP=num2str(FP) ppv=num2str(round(ppv)) sensi=num2str(round(sensi)) speci=num2str(round(speci)) BME499 CAPSTONE PROJECT FINAL REPORT 63 end final(4,1)=round(mean(final(1:3,1))); final(4,2)=round(mean(final(1:3,2))); final(4,3)=round(mean(final(1:3,3))); final(4,4)=round(mean(final(1:3,4))); final(4,5)=mean(final(1:3,5)); a=([num2str(final(4,5),'%.1f')]); final(4,5)=str2num(a); final(4,6)=mean(final(1:3,6)); b=([num2str(final(4,6),'%.1f')]); final(4,6)=str2num(b); final(4,7)=mean(final(1:3,7)); c=([num2str(final(4,7),'%.1f')]); final(4,7)=str2num(c); final(4,8)=mean(final(1:3,8)); d=([num2str(final(4,8),'%.1f')]); final(4,8)=str2num(d); Probabilistic Neural Network Classifier (PNN) %Training the set of HOS features clc; close all; clear all; for pp=1:3 filename1=['training',num2str(pp)]; filename2=['net',num2str(pp)]; load(filename1) P = training(:,1:8); P=P'; class=training(:,9)'; T = ind2vec(class); net = newpnn(P,T,0.015); save(filename2,'net'); end figure clc close all; clear all; for pp=1:3 filename1=['testing',num2str(pp)]; filename2=['net',num2str(pp)]; load(filename1) load(filename2) % Testing the set of HOS features BME499 CAPSTONE PROJECT FINAL REPORT 64 P = testing(:,1:8); P=P' Y = sim(net,P); y = vec2ind(Y) normwrong=0; normright=0; duringseizurewrong=0; duringseizureright=0; beforeseizurewrong=0; beforeseizureright=0; for i=1:30 if y(1,i)==1 duringseizureright=duringseizureright+1; else duringseizurewrong=duringseizurewrong+1; end end for i=31:60 if y(1,i)==2 beforeseizureright=beforeseizureright+1; else beforeseizurewrong=beforeseizurewrong+1; end end for i=61:90 if y(1,i)==3 normright=normright+1; else normwrong=normwrong+1; end end ans=(beforeseizureright+duringseizureright+normright)/90*100; TN=normright; FP=normwrong; e=0 for i=1:60 BME499 CAPSTONE PROJECT FINAL REPORT 65 if(y(i)==3) e=e+1 end end FN=e; TP=60-FN; sensi=(TP/(TP+FN))*100; speci=(TN/(TN+FP))*100; ppv=(TP/(TP+FP))*100; final(pp,:)=[TN;FN;TP;FP;ans;ppv;sensi;speci]' TN=num2str(TN) FN=num2str(FN) TP=num2str(TP) FP=num2str(FP) ppv=num2str(round(ppv)) sensi=num2str(round(sensi)) speci=num2str(round(speci)) end final(4,1)=round(mean(final(1:3,1))); final(4,2)=round(mean(final(1:3,2))); final(4,3)=round(mean(final(1:3,3))); final(4,4)=round(mean(final(1:3,4))); final(4,5)=mean(final(1:3,5)); a=([num2str(final(4,5),'%.1f')]); final(4,5)=str2num(a); final(4,6)=mean(final(1:3,6)); b=([num2str(final(4,6),'%.1f')]); final(4,6)=str2num(b); final(4,7)=mean(final(1:3,7)); c=([num2str(final(4,7),'%.1f')]); final(4,7)=str2num(c); final(4,8)=mean(final(1:3,8)); d=([num2str(final(4,8),'%.1f')]); final(4,8)=str2num(d); K-Nearest Neighbor Classifier (KNN) clc; clear all; close all; %Loading training and testing sets of data for pp=1:3 filename1=['training',num2str(pp)]; filename2=['testing',num2str(pp)]; load(filename1) load(filename2) %load training80; BME499 CAPSTONE PROJECT FINAL REPORT 66 %load testing80; % classify the sample using the nearest neighbor classification y = knnclassify(testing(:,1:8), training(:,1:8), training(:,9)); y=y'; normwrong=0; normright=0; duringseizurewrong=0; duringseizureright=0; beforeseizurewrong=0; beforeseizureright=0; for i=1:30 if y(1,i)==1 duringseizureright=duringseizureright+1; else duringseizurewrong=duringseizurewrong+1; end end for i=31:60 if y(1,i)==2 beforeseizureright=beforeseizureright+1; else beforeseizurewrong=beforeseizurewrong+1; end end for i=61:90 if y(1,i)==3 normright=normright+1; else normwrong=normwrong+1; end end ans=(beforeseizureright+duringseizureright+normright)/90*100; TN=normright; FP=normwrong; BME499 CAPSTONE PROJECT FINAL REPORT 67 e=0 for i=1:60 if(y(i)==3) e=e+1 end end FN=e; TP=60-FN; sensi=(TP/(TP+FN))*100; speci=(TN/(TN+FP))*100; ppv=(TP/(TP+FP))*100; final(pp,:)=[TN;FN;TP;FP;ans;ppv;sensi;speci]' TN=num2str(TN) FN=num2str(FN) TP=num2str(TP) FP=num2str(FP) ppv=num2str(round(ppv)) sensi=num2str(round(sensi)) speci=num2str(round(speci)) end final(4,1)=round(mean(final(1:3,1))); final(4,2)=round(mean(final(1:3,2))); final(4,3)=round(mean(final(1:3,3))); final(4,4)=round(mean(final(1:3,4))); final(4,5)=mean(final(1:3,5)); a=([num2str(final(4,5),'%.1f')]); final(4,5)=str2num(a); final(4,6)=mean(final(1:3,6)); b=([num2str(final(4,6),'%.1f')]); final(4,6)=str2num(b); final(4,7)=mean(final(1:3,7)); c=([num2str(final(4,7),'%.1f')]); final(4,7)=str2num(c); final(4,8)=mean(final(1:3,8)); d=([num2str(final(4,8),'%.1f')]); final(4,8)=str2num(d); Decision Tree (DT) clear all; clc; close all; % Loading the sets of Testing and Training data for pp=1:3 filename1=['testing',num2str(pp)] filename2=['training',num2str(pp)] load(filename1) load(filename2) BME499 CAPSTONE PROJECT FINAL REPORT 68 X=training(:,1:8); size(X); Y=training(:,9); size(Y); % Build Decision Tree BuiltTree = classregtree(X,Y,'method', 'classification','names',{'a1','a2','a3','a4','a5','a6','a7','a8'}); % Evaluate the establised tree using the test data yfit = eval(BuiltTree,testing(:,1:8)); % Determine the accuracy. pct = mean(strcmp(yfit,num2str(testing(:,9)))); output=cell2mat(yfit); y=str2num(output); y=y'; % Tabulate Accuracy fprintf('%s %6.2f\n', 'Decision tree accuracy for the build dataset:', pct*100); normwrong=0; normright=0; duringseizurewrong=0; duringseizureright=0; beforeseizurewrong=0; beforeseizureright=0; for i=1:30 if y(1,i)==1 duringseizureright=duringseizureright+1; else duringseizurewrong=duringseizurewrong+1; end end for i=31:60 if y(1,i)==2 beforeseizureright=beforeseizureright+1; else beforeseizurewrong=beforeseizurewrong+1; end end for i=61:90 if y(1,i)==3 normright=normright+1; BME499 CAPSTONE PROJECT FINAL REPORT 69 else normwrong=normwrong+1; end end ans=(beforeseizureright+duringseizureright+normright)/90*100; %ans=round(ans); str11=([num2str(ans,'%.1f')]); TN=normright; FP=normwrong; e=0 for i=1:60 if(y(i)==3) e=e+1 end end FN=e; TP=60-FN; sensi=(TP/(TP+FN))*100 speci=(TN/(TN+FP))*100 ppv=(TP/(TP+FP))*100 final(pp,:)=[TN;FN;TP;FP;ans;ppv;sensi;speci]' TN=num2str(TN) FN=num2str(FN) TP=num2str(TP) FP=num2str(FP) ppv=num2str(round(ppv)) sensi=num2str(round(sensi)) speci=num2str(round(speci)) end final(4,1)=round(mean(final(1:3,1))); final(4,2)=round(mean(final(1:3,2))); final(4,3)=round(mean(final(1:3,3))); final(4,4)=round(mean(final(1:3,4))); final(4,5)=mean(final(1:3,5)); a=([num2str(final(4,5),'%.1f')]); final(4,5)=str2num(a); final(4,6)=mean(final(1:3,6)); b=([num2str(final(4,6),'%.1f')]); final(4,6)=str2num(b); final(4,7)=mean(final(1:3,7)); c=([num2str(final(4,7),'%.1f')]); final(4,7)=str2num(c); final(4,8)=mean(final(1:3,8)); d=([num2str(final(4,8),'%.1f')]); final(4,8)=str2num(d); BME499 CAPSTONE PROJECT FINAL REPORT 70