Wavelet Transform for Classification of EEG Signal using SVM and ANN

One of the most challenging research areas in the field of biomedical signal is feature extraction and classification of electroencephalogram (EEG) signal for normal and epileptic patients. Epileptic seizures are manifestations of epilepsy and epileptic seizures are disclosures of epilepsy. This paper illustrates the use of wavelet transform (WT) used for feature extraction of EEG signals and the classifiers used are Artificial Neural Network (ANN) and Support Vector Machine (SVM). For feature extraction the EEG signal is decomposed using Daubechies wavelet. Performances of classifiers are based on the parameters such as Accuracy, Sensitivity and Specificity.


INTRODUCTION
One of the most important organs of human body is brain.Brain is the vertebrate central nervous system that is enclosed within the cranium, spinal cord and also composed of gray and white matter.Brain is the prime centre for regulation and controls the functioning of the human body including heart bit and respiration.It is an extremely complex system in the entire body and exhibits rich spatiotemporal dynamics 1 .And it is often affected by some disorder and malfunction.One of the most common brain disorders is Epilepsy.Today about 60 million people are affected by this disorder.
The Electroencephalogram which is abbreviated as (EEG) that is clinically used to investigate brain disorders or to diagnosis various brain functionalities 2 .The first attempt at measuring this brain disorder activity was done by British Physician Richard Caton in the year 1875.Electroencephalographic record is one of the most important tools for the study of the brain electrical activity and for the diagnosis of neurological diseases 3 .It is also the electrical interpretation of the heart activity.Epileptic seizures are basically the manifestations of epilepsy.Electroencephalograph (EEG) records can provide valuable insight and improved understanding of the mechanisms causing epileptic disorders by careful analysis 4 .Epileptic seizure is due to the temporary electrical disturbance of the brain.Epileptic seizure sometimes, goes unnoticed and sometimes bit confused with other events prevailing depending on their presentations such as strokes, cause falls and migraines.Out of every 100 persons, one is experiencing a seizure at sometime in their whole life.Unfortunately, the occurrence of epileptic seizure seems somehow unpredictable and very little understood 5 .In the diagnosis of epilepsy, the detection of epileptiform discharges in the EEG is an important component.EEG signals are non-stationary 3 .The most important, useful and cost effective modality for the study of epilepsy is EEG.Also, EEG is a graphical representation of cardiac activity which uses primary measure for the identification of various heart diseases and heart abnormalities.EEG signal is basically a one-dimensional biological signal.Analyzing of EEG signal is based on its frequency content.Hence we can say that interpretation of EEG signal is based on the power of the frequencies it contains 6 .
The first remarkable work was done by Gotman in the year 1982 in the field related to seizures.Till now different methods have been proposed for the detection of epileptic seizures.Neep Hazarika et al did the classification of EEG signals using wavelet transform (WT) in the year 1997 and also described the application of an artificial neural network (ANN) technique [2].In the year 2005, Inan Guler, described the application of adaptive neuro-fuzzy interference system (ANFIS) model for the classification of EEG signals.In their work decision making was performed in two stages: feature extraction using wavelet transform and ANFIS trained with backpropagation gradient descent method in combination with the least squares method.Five different types of EEG signals were used as input patterns of the five ANFIS classifiers.For diagnostic accuracy, the sixth AFNIS classifier was trained fuzzy logic approach.The classification results as well as statistical measures were used for evaluating the ANFIS.For ANFIS model, the total classification accuracy was obtained as 98.68% [3].In 2005, Abdulhamit Subasi et al in October, 2005 classified EEG signals using neural network and logical regression (LR).They introduced two fundamentally different approaches for designing classification models (classifiers) the traditional statistical method which was based on logistic regression and ANN.Logistic regression and multilayer preceptor neural network (MLPNN) based classifiers were developed and were compared in relation to their accuracy in respect to classification of EEG signals.An LBDWT coefficient of EEG signals as an input to classification system with two discrete outputs was used: epileptic seizure or non-epileptic seizure [4].Abdulhamit Subasi in 2007 developed two approaches for the identification of epileptic seizure.The first one was based on the traditional neural network that used Multi-layer perceptron neural network (MLPNN).The other one was Mixture of Expert (ME).Use of ME network structures was presented to improve the accuracy of epileptic seizure detection in EEG [5].In 2010 R. Panda et al proposed a work on classification of EEG signal using wavelet transform and support vector machine (SVM) for epileptic seizure detection.In their work, five different types of EEG signals were selected for analysis purpose.Preprocessing and decomposition of signals were done using DWT till 5 th level of decomposition tree.Features like energy, entropy and standard deviation were computed and hence consequently used for classification of EEG signals.Classification accuracy of 91.2% was achieved in detection of abnormal from normal EEG signals [7].Kavita Mahajan et al in 2012 did a comparative study of ANN and SVM for EEG signal classification.In their work, various dimension reduction methods were used for reduction of decomposed data.The Classification was done using two classifiers for data as normal or abnormal.Performance of classifiers was compared to show the improved method.In their implemented system, the ANN classified the EEG signal with overall accuracy of 97% correct rate and the SVM classifier used classified the EEG signal with overall accuracy of 98.67%.The SVM gave better and improved result for LDA as compared to ICA and PCA i.e. (100 %).More consistent results were produced in combination of LDA+SVM in comparison to the combination of PCA+SVM and ICA+SVM [8].Pravin A. Kharat  The percentage classification accuracy for MLP and SVM was found to be highest in comparison to other four neural networks.Sensitivity of 96.42% was achieved using MLP, and 94.11% was obtained for Interictal EEG and Ictal EEG respectively.100% of classification accuracy was achieved for both Interictal EEG and Ictal EEG for SVM.For MLP and SVM, 100% specificity was obtained [9].Arslan Shahid et al in 2014 introduced a new method based on the singular values as a detector for epileptic seizures in EEG signals.Decomposition of singular values was performed on an EEG signal in epochs of 8 seconds.After the extraction from each epoch, singular values were fed into a support vector machine (SVM) for the purpose of binary classification between epileptic seizure and non-seizure events.In their work, a classification accuracy of 90%, average sensitivity 91% and specificity of 89% was achieved 10 .

Epilepsy
Epilepsy is one of the major fields of application of EEG and it is classified as one of the common chronic neurological disorders characterized by recurrent seizures that affect the brain.These epileptic seizures can occur in the brain locally and are seen as sudden abnormal functions of the body such as increase in muscular activities, loss of consciousness or abnormal sensations.It is mostly seen in children and adults at the age of 65 to 70. 1% of total world's population is affected by the disease.It is curable if it is detected in initial stages.About 80% of the epileptic seizure activities can be treated or controlled, if it is diagnosed properly and remaining 20% continue to get seizures even after medical treatment 7 .

Seizure Detection
Seizures are transient abbreviations in the brain's electrical activity.Basically the seizure detection is a classification between normal and seizure EEG.There are three functional modules of EEG processing systems namely, preprocessing, feature extraction and classification.Normally the EEG data gets corrupted by the artifacts.Artifacts are generally electrical signals that are picked up by the scalp electrodes.These electrodes do not originate from cortical neurons.Eye movement, blinking and muscular movements are the most common causes of artifacts.People having seizures suffer from recurrent seizures that occur at unpredictable times and that too without warnings.Sometimes it results in a lapse of attention or whole body convulsion.There is also risk of sustaining physical injuries and may even lead to death due to increment in frequent seizures.Analysis of scalp EEG that is a non-invasive, multichannel recording of the brain's electrical activity is one of the most common way to infer the onset of a seizure before it becomes clinically manifest 11 .

Feature extraction method
Signal analysis plays an important role

Wavelet Transform
The electrical activities of the brain since 1930s has been measured by making use of surface electrodes connected to the scalp.But nowadays various mathematical tools such as Fourier Transform (FT), Fast Fourier Transform (FFT), Short Time Fourier Transform (STFT) and Wavelet Transform (WT) have been introduced for EEG signal feature extraction.However in Fast Fourier Transform, there was information loss about time domain and gave only spectral information in the frequency domain.
To overcome the problems related to FFT, STFT was introduced that represented the signal in both time as well as in frequency domain using moving window function.The main problem associated with STFT is that it does not give multi-resolution information of the signals as it always has constant size 12,13 .In order to overcome the problems related to Fourier transform, Fat Fourier Transform and Short Time Fourier transform, a powerful method was proposed in the late 1980s, known as Wavelet transform.Wavelet Transform can be thought as an extension to Fourier Transform and also instead of working on a single scale (time or frequency) rather it works on multi-scale basis and also addresses the problems related to non-stationary signals.Wavelet transform theory has found many interesting many interesting applications in the field of Digital Signal Processing.In recent years, Wavelet analysis plays an important role for analyzing time -domain signals.Wavelet is a type of time-frequency analysis, which provides information about both frequency and time within signals.Analysis by wavelet represents a special type of linear transform of signals and also physical data represented by the signals about processes and physical properties of mediums and objects.Wavelet Transform has been more efficient for signal analysis in comparison to other transform methods such as Fourier transform, Short Time Fourier Transform.The main advantage of wavelet transform is that it has a varying window size which is broad at low frequencies and narrow at high frequencies leading to an optimal time frequency resolution in all frequency ranges i.e. it holds the multiresolution properties).In mathematics, a wavelet series is a representation of square integrable which can be real or complex valued function.A wavelet is a wave like oscillation with amplitude that begins at zero, increases and then decreases back to zero.Wavelets are generally crafted to have specific properties that make them useful for signal processing.Wavelets can be combined using a reverse, shift, multiply and integrate technique known as convolution 13 .Wavelets transforms are broadly divided into three classes: continuous, discrete, and multiresolution-based.

Continuous Wavelet Transform (CWT)
In continuous wavelet transform, a given signal of finite energy is projected on a continuous Fig. 2: EEG Processing System family of frequency bands.
The above equation shows a function f (t) is decomposed into a set of basis functions s, (t) τ ψ , called the wavelets.The variable s and τ , are scale and translation.

Inverse Continuous wavelet transforms
The wavelets are generated from a single basic wavelet (t) ψ , so called mother wavelet, by scaling and translation s, In equation no.3's' is the scale factor, ' τ ' is the translation factor and the factor ' s ' is for energy normalization across the different scales.

Wavelet properties
Admissibility condition: It is the most important property of wavelets.a zero at the zero frequency also means that the average value of the wavelet in the time domain must be zero, and it must be oscillatory.
also ' (t) ψ ' must be a wave.
The admissibility condition gave the wave, regularity and vanishing moments gave the fast decay [13].

Discrete Wavelet Transform (DWT)
It is just another form of representing the signal and does not change the information content in the signal.The wavelet series is simply a sampled version of the continuous wavelet transform and the information provided by it is highly redundant as far as the reconstruction of the signal is concerned.DWT is more efficient in removing redundancy than continuous wavelet transform.It provides sufficient   .Hence this is called dyadic wavelet transform and in this case the wavelet transform becomes On setting nor m of scale and shift parameters consisting an orthonormal basis for 2 ( ) L R is given as: Based on low pass and high pass filters, the DWT consists of applying the discrete signal to a bank of octave band filters.The function f (t) is expressed as: Where, (t) φ is the scaling function associated with the wavelet function (t) ψ that is governed by the condition:

Wavelet Transform Implementation
The above figure shows a sub band decomposition of wavelet transform implementation or procedure (scheme) for multiresolution decomposition of a signal given by x[n].In this scheme, each stage consists of high pass and low pass filters.These filters are basically digital filters.It also consists of two down sampler by 2. In this scheme, the first type of filter is high pass in nature and the second filter is low pass filter in nature.The second type of filter is basically a mirror version to the first filter.The down sampled outputs of first high pass filter and low pass filter helps in providing the detail D1and the A1 as the approximation.These approximations are further decomposed and the same process is being continued.
Accuracy are used to test the performance analysis of classifier 10 .

Sensitivity
Number et al in 2012 proposed Daubechies Wavelet Neural Network classifier for the diagnosis of epilepsy.In their proposed work, wavelet transform was used feature extraction.Methods such as Generalized Feed Forward Neural Network (GFFNN), Multilayer Perceptron (MLP), Elman Neural Network (ENN) and Support Vector Machine (SVM) were used for classification.The problem of classification was modeled as three class classification problem and the three groups were: Healthy subjects (Normal EEG), Epileptic subjects during seizure free interval (Intericatal EEG) and Epileptic subjects during seizure activity (Ictal EEG).

Fig. 1 :
Fig. 1: 1D EEG Signal is used to first analyze and then reconstruct a signal without loss of information.In equation (4) ' ( ) ψ ω ' is the Fourier Transform of ' ( ) ψ ω '.The admissibility condition implies that the Fourier Transform of ' ( ) tψ ' vanishes at the zero frequency i.e.

Table 2 : Classification using ANN
Discrete wavelets are applied to discrete data sets and produce discrete outputs.DWT decomposes the signal into mutually orthogonal set of wavelets and this is the main difference of DWT from CWT.It is a very common discretization of CWT and also a very redundant representation.It consists of setting the shift and scale value as13,14,15,16 : of true positive decisions / Number of actually positive decisions Visual inspection of signals does not provide much information regarding about the health of individual.We have proposed a wavelet based feature extraction technique for epileptic EEG signal classification.In our implemented work, the parameters such as accuracy, sensitivity and specificity are calculated and for these parameters we have drawn following conclusions: ANN classified the EEG signal having accuracy 96%, sensitivity 100% and specificity 77.77% for wavelet feature extraction.For SVM classifier we have achieved accuracy 85.46%, sensitivity 90% and specificity 89% for wavelet feature extraction.