10
Journal of Neuroscience Methods 148 (2005) 167–176 Automatic seizure detection in EEG using logistic regression and artificial neural network Ahmet Alkan a,, Etem Koklukaya b , Abdulhamit Subasi a a Department of Electrical and Electronics Engineering, Kahramanmaras Sutcu Imam University, 46050-9 Kahramanmara¸ s, Turkey b Department of Electrical and Electronics Engineering, Sakarya University, 54187 Sakarya, Turkey Received 31 January 2005; received in revised form 25 April 2005; accepted 26 April 2005 Abstract The detection of epileptiform discharges in the EEG is an important component in the diagnosis of epilepsy. In this study, multiple signal classification (MUSIC), autoregressive (AR) and periodogram methods were used to get power spectra in patients with absence seizure. The EEG power spectra were used as an input to a classifier. We introduce two fundamentally different approaches for designing classification models (classifiers); the traditional statistical method based on logistic regression (LR) and the emerging computationally powerful techniques based on artificial neural networks (ANNs). LR as well as multilayer perceptron neural network (MLPNN) based classifiers were developed and compared in relation to their accuracy in classification of EEG signals. The comparisons between the developed classifiers were primarily based on analysis of the receiver operating characteristic (ROC) curves as well as a number of scalar performance measures pertaining to the classification. The MLPNN based classifier outperformed the LR based counterpart. Within the same group, the MLPNN-based classifier was more accurate than the LR-based classifier. © 2005 Published by Elsevier B.V. Keywords: EEG; Spectral analysis; Epileptic seizure; Logistic regression; Multilayer perceptron neural network 1. Introduction Electroencephalography is an important clinical tool for the evaluation and treatment of neurophysiologic disorders related to epilepsy. Careful analyses of the EEG records can provide valuable insight and improved understanding of the mechanisms causing epileptic disorders. About 1% of the people in the world suffer from epilepsy and about 30% of epileptics are not helped by medication (Adeli et al., 2003). Research is needed for better understanding of the mech- anisms causing epileptic disorders. The detection of epilepti- form discharges occurring in the EEG between seizures is an important component in the diagnosis of epilepsy. EEG sig- nals contain a wide range of frequency components. However, the range of clinical and physiological interests is between 0.5 Corresponding author. Tel.: +90 505 234 80 17; fax: +90 344 219 10 52. E-mail address: [email protected] (A. Alkan). and 30 Hz. This range is classified approximately in a num- ber of frequency bands as follows: δ (0.5–4 Hz), θ (4–8 Hz), α (8–13 Hz), β (13–30 Hz) (Adeli et al., 2003; Gevins and Remond, 1987; Schneble and Matthes, 1996). Since there is no definite criterion evaluated by the experts, visual analysis of EEG signals in time domain may be insuffi- cient. Routine clinical diagnosis needs to analysis of EEG sig- nals. Therefore, some automation and computer techniques have been used for this aim. Periodogram method used for calculating the power density of the frequency components in a signal is based on Fourier conversion. Non-parametric power spectrum estimation methods can be calculated using FFT and understood easily compared with the paramet- ric methods. But these methods are powerful tool for the analysis of stationary signals and need long duration data records for suitable frequency resolution. For shorter signals, non-parametric spectral estimation is less reliable. In non- parametric applications, FFT is applied to windowed data which assumes all data zero except window. Also some spec- 0165-0270/$ – see front matter © 2005 Published by Elsevier B.V. doi:10.1016/j.jneumeth.2005.04.009

Automatic seizure detection in EEG using logistic regression and artificial neural network

Embed Size (px)

Citation preview

Page 1: Automatic seizure detection in EEG using logistic regression and artificial neural network

Journal of Neuroscience Methods 148 (2005) 167–176

Automatic seizure detection in EEG using logistic regression andartificial neural network

Ahmet Alkana,∗, Etem Koklukayab, Abdulhamit Subasia

a Department of Electrical and Electronics Engineering, Kahramanmaras Sutcu Imam University, 46050-9 Kahramanmaras, Turkeyb Department of Electrical and Electronics Engineering, Sakarya University, 54187 Sakarya, Turkey

Received 31 January 2005; received in revised form 25 April 2005; accepted 26 April 2005

Abstract

The detection of epileptiform discharges in the EEG is an important component in the diagnosis of epilepsy. In this study, multiple signalclassification (MUSIC), autoregressive (AR) and periodogram methods were used to get power spectra in patients with absence seizure. TheEEG power spectra were used as an input to a classifier. We introduce two fundamentally different approaches for designing classificationmodels (classifiers); the traditional statistical method based on logistic regression (LR) and the emerging computationally powerful techniques

developedre primarilytaining to thessifier was

um-

d

erts,uffi-sig-

iquesd forentsetricusingmet-thedatanals,non-dataspec-

based on artificial neural networks (ANNs). LR as well as multilayer perceptron neural network (MLPNN) based classifiers wereand compared in relation to their accuracy in classification of EEG signals. The comparisons between the developed classifiers webased on analysis of the receiver operating characteristic (ROC) curves as well as a number of scalar performance measures perclassification. The MLPNN based classifier outperformed the LR based counterpart. Within the same group, the MLPNN-based clamore accurate than the LR-based classifier.© 2005 Published by Elsevier B.V.

Keywords: EEG; Spectral analysis; Epileptic seizure; Logistic regression; Multilayer perceptron neural network

1. Introduction

Electroencephalography is an important clinical tool forthe evaluation and treatment of neurophysiologic disordersrelated to epilepsy. Careful analyses of the EEG records canprovide valuable insight and improved understanding of themechanisms causing epileptic disorders. About 1% of thepeople in the world suffer from epilepsy and about 30% ofepileptics are not helped by medication (Adeli et al., 2003).

Research is needed for better understanding of the mech-anisms causing epileptic disorders. The detection of epilepti-form discharges occurring in the EEG between seizures is animportant component in the diagnosis of epilepsy. EEG sig-nals contain a wide range of frequency components. However,the range of clinical and physiological interests is between 0.5

∗ Corresponding author. Tel.: +90 505 234 80 17; fax: +90 344 219 10 52.E-mail address: [email protected] (A. Alkan).

and 30 Hz. This range is classified approximately in a nber of frequency bands as follows:δ (0.5–4 Hz),θ (4–8 Hz),α (8–13 Hz),β (13–30 Hz) (Adeli et al., 2003; Gevins anRemond, 1987; Schneble and Matthes, 1996).

Since there is no definite criterion evaluated by the expvisual analysis of EEG signals in time domain may be inscient. Routine clinical diagnosis needs to analysis of EEGnals. Therefore, some automation and computer technhave been used for this aim. Periodogram method usecalculating the power density of the frequency componin a signal is based on Fourier conversion. Non-parampower spectrum estimation methods can be calculatedFFT and understood easily compared with the pararic methods. But these methods are powerful tool foranalysis of stationary signals and need long durationrecords for suitable frequency resolution. For shorter signon-parametric spectral estimation is less reliable. Inparametric applications, FFT is applied to windowedwhich assumes all data zero except window. Also some

0165-0270/$ – see front matter © 2005 Published by Elsevier B.V.doi:10.1016/j.jneumeth.2005.04.009

Page 2: Automatic seizure detection in EEG using logistic regression and artificial neural network

168 A. Alkan et al. / Journal of Neuroscience Methods 148 (2005) 167–176

tral losses occur because of window and these losses maskweak signals in the data.

Parametric power spectrum estimation methods reduce thespectral loss problems and gives better frequency resolution.Also AR method has an advantage over FFT that, it needsshorter duration data records than FFT. Autoregressive (AR)model is suitable for signals which have sudden peaks in theirfrequency spectrums. Inversely, moving average (MA) modelis suitable for signals which have no sharp peaks in their fre-quency spectrums. But the autoregressive moving average(ARMA) model is suitable for signals which have both typepeaks in their frequency spectrums. AR model parameterscan be calculated by solving a set of linear equations but cal-culating ARMA parameters requires the solution of a set ofnonlinear equations, which is computationally expensive. Forthis reason, AR models are more commonly used than ARMAmodel (Akin and Kiymik, 2000; Cohen, 2000; Guler et al.,2001; Marchant, 2003). Since, EEG signals contain peaks atsome frequencies AR model can be used by using Burg orLevinson–Durbin Algorithm. Multiple signal classification(MUSIC) method have been used for estimating frequenciesof different signals, and can be used for obtaining PSD esti-mates of various signals (Ubeyli and Guler, 2003).

The STFT and wavelet are popular methods of analyzingnonstationary signals. Since STFT is simple and computa-tionally efficient and yields reliable time–frequency plots fors erei n oft e thet nnert ncyr offerg encyr use-f highfm tech-n

nal-y ct thef net-w beena temsh dH 2003;H assi,2 uttta poorf

dsw rdedb petitm diag-n lled

3 Hz spike and wave complex (Kiymik et al., 2004; Subasi,2005). Power spectral densities (PSDs) of EEG signalsobtained from healthy and unhealthy (epileptic patient)subjects were computed by MUSIC, AR and periodogrammethods. Then these PSDs were used as an input to classifi-cation system. For developing classifiers for the detection ofepileptic seizure in multi-channel EEG the traditional methodof LR to the more advanced neural network techniques. Inthe neural network techniques, the multilayer perceptronneural network (MLPNN) was used with backpropagationtraining algorithm. The choice of this network was based onthe fact that it is the most popular type of ANNs. In thesemethods we used PSDs of EEG signals as an input to classifi-cation system with two discrete outputs: epileptic seizure ornot.

2. Materials and method

2.1. Subjects and data acquisition

The EEG data used in our study was recorded from bothepileptic patients and normal subjects. The following bipo-lar EEG channels were selected for analysis: F7–C3, F8–C4,T5–O1 and T6–O2. In our study we used 11 subjects, five ofthem epileptic patients. Twenty absence seizures (petit mal)f tor-i withan ofE dataw singt r thiss ents( s pers

ysiso udedi ventw cingw twoe inings holdf weent s ther ed byb mane ileptico fore g thefi val-i e thes the-l entsi efinites

lowly varying signals. The major drawback is that ths a compromise between time and frequency resolutiohe decomposition. On the other hand, wavelets handlime–frequency resolution compromise in a different mao the STFT. Rather than having uniform time and frequeesolution across the time–frequency plane, waveletsood time resolution at high frequencies and good frequesolution at low frequencies. This property can be veryul in the detection of short-time transients, such asrequency waves (Marchant, 2003). But AR and MUSICethods are faster than Continuous Wavelet transformiques, especially in real time applications.

Numerous other techniques from the theory of signal asis have been used to obtain representations and extraeatures of interest for classification purposes. Neuralorks and statistical pattern recognition methods havepplied to EEG analysis. Neural network detection sysave been proposed by a number of researchers (Basheer anajmeer, 2000; Fausett, 1994; Hajmeer and Basheer,aselsteiner and Pfurtscheller, 2000; Sun and Sclab000). Pradhan et al. (1996)uses the raw EEG as an inp

o a neural network whileWeng and Khorasani (1996)useshe features proposed byGotman and Wang (1991)with andaptive structure neural network, but his results show a

alse detection rate.In this work, the MUSIC, AR and periodogram metho

ere used to analyze epileptiform discharges in recorain waves (EEG) for patient with absence seizure (al). Neurologists make the absence seizure epilepticosis primarily through visual identification of the so-ca

rom five epileptic patients admitted for video-EEG moning were analyzed. EEG signals recorded from a patientbsence seizure epileptic discharge is shown inFig. 1, andormal EEG signal is shown inFig. 2. The different stagesEG signals were determined by two physicians. EEGere acquired with Ag/AgCl disk electrodes placed u

he 10–20 international electrode placement system. Fotudy, four channel recordings containing epileptiform evspikes, spike and waves) were digitized at 200 sampleecond using 12-bit resolution.

Two neurologists with experience in the clinical analf EEG signals separately inspected every recording incl

n this study to score epileptic and normal signals. Each eas filed on the computer memory and linked to the traith its start and duration. These were then revised by thexperts jointly to solve disagreements and set up the traet for the program, consenting to the choice of thresor the epileptic seizure detection. The agreement bethe two experts was evaluated – for the testing set – aate between the numbers of epileptic seizures detectoth experts. When revising this unified event set, the huxperts, by mutual consent, marked each state as epr normal. They also reviewed each recording entirelypileptic seizures that had been overlooked by all durinrst pass and marked them as definite or possible. Thisdated set provided the reference evaluation to estimatensitivity and specificity of computer scorings. Neveress, a preliminary analysis was carried out solely on evn the training set, as each stage in these sets had a dtart and duration.

Page 3: Automatic seizure detection in EEG using logistic regression and artificial neural network

A. Alkan et al. / Journal of Neuroscience Methods 148 (2005) 167–176 169

Fig. 1. Epileptic EEG signal.

2.2. Periodogram method

FFT methods such as periodogram are defined as non-parametric methods. The periodogram method used for deter-mining the power density of the frequency components ina signal is based on Fourier conversion. For obtaining thepower spectrum of an EEG signal with periodogram, EEG

signals were divided into frames as 64, 128, 256, which arethe powers of 2. To increase the resolution, zero-padding pro-cess was performed, because the resolution of FFT is inverseat the time when the sampled data were presented.

It is impossible to work with an infinite length signalpractically. Therefore the signal is windowed with a properwindow. When the bioelectric signals are studied, especially

rmal E

Fig. 2. No EG signal.
Page 4: Automatic seizure detection in EEG using logistic regression and artificial neural network

170 A. Alkan et al. / Journal of Neuroscience Methods 148 (2005) 167–176

better appropriate windows are rectangular and Hanning win-dows on the spectral analysis of these signals (Akin andKiymik, 2000).

Periodogram spectral estimator is one of the FFT methodsand relies on the definition of the power spectrum density(PSD) given by

P(f ) = limN→∞ E

1

N

∣∣∣∣∣N∑

n=1

x(n) e−2πfn

∣∣∣∣∣2 (1)

By neglecting the expectation operator and the limit operationin Eq.(1), which cannot be performed when the only availableinformation on the signal consists of the samples{x(n)}Nn=1the periodogram spectral estimator is defined as

(PPER(f ) = limN→∞

1

N

∣∣∣∣∣N∑

n=1

x(n) e−2πfn

∣∣∣∣∣2

(2)

Then, evaluation ofPPER(f) at the frequency samples basi-cally reduces to the computation of the following discreteFourier transform (DFT):

X(k) =N∑

n=1

x(n) e−j(2π/N)nk, k = 0, . . . , N − 1 (3)

whereX(k) is expressed as the discrete Fourier coefficient,Nt etF utedb byt

2

mod-e mc eth-o teps.T datas theP fre-q f theA qua-t tputo hiten

omef ion oft rder,t velo ta

tima-t nts.T tioni ard

prediction errors and on estimation of the reflection coef-ficient. The forward and backward prediction errors for apth-order model are defined as

ef,p(n) = x(n) +p∑

i=1

ap,ix(n − i), n = p + 1, . . . , N (4)

eb,p(n) = x(n − p) +p∑

i=1

a∗p,ix(n − p + i),

n = p + 1, . . . , N (5)

The AR parameters related to the reflection coefficientkp,are given by

ap,i ={

ap−1,i + kpa∗p−1,p−i, i = 1, . . . , p − 1

kp, i = p(6)

The Burg method considers the recursive-in-order estimationof kp, given that the AR coefficients for orderp − 1 have beencomputed. The reflection coefficient estimate is given by

kp = − 2∑N

n−p+1ef,p−1(n)e∗b,p−1(n − 1)∑N

n−p+1[|ef,p−1(n)|2 + |e∗b,p−1(n − 1)|2]

(7)

T dere

e

e

a -ordera sti-m as

P

w ,2

2

quen-c hesem rrela-t oiser fre-q bests f sev-e s,1 990;W edM esti-m nit

he length of available data andx(n) is the input signal on thime domain. The procedure that computes Eq.(3) is called asFT algorithm. The estimated periodogram can be compy use of the DFT, which in turn is efficiently computed

he FFT algorithm (Proakis and Manolakis, 1996).

.3. AR method for spectral analysis

The model-based (parametric) methods are based onlling the data sequencex(n) as the output of a linear systeharacterized by a rational system. In the model-based mds, the spectrum estimation procedure consists of two she parameters of the method are estimated from givenequencex(n), 0≤ n ≤ N−1. Then from these estimates,SD estimate is computed. AR method is the mostuently used parametric method because estimation oR parameters can be done easily by solving linear e

ions. In the AR method, data can be modelled as ouf a causal, all-pole, discrete filter whose input is woise.

To obtain stable and high performance AR method, sactors must be taken into consideration such as selecthe optimum estimation method, selection of the model ohe length of the signal which will be modelled, and the lef stationary of the data (Akin and Kiymik, 2000; Guler el., 2001).

The AR spectral estimation methods are based on esion of either the AR parameters or the reflection coefficiehe method developed by Burg for AR parameter estima

s based on the minimization of the forward and backw

he prediction errors satisfy the following recursive-in-orxpressions:

ˆf,p(n) = ef,p−1(n) + kpeb,p−1(n − 1) (8)

ˆb,p(n) = eb,p−1(n − 1) + k∗pef,p−1(n) (9)

nd these expressions are used to develop a recursive-inlgorithm for estimating the AR coefficients. From the eates of the AR parameters, PSD estimation is defined

ˆ (f ) = ep∣∣1 + ∑pk=1ap(k) e−j2πjk

∣∣2 (10)

hereep = ef,p + eb,p is the total least-squares error (Cohen000; Guler et al., 2001).

.4. MUSIC method

Subspace-based methods are used for estimating freies and powers of signals from noisy measurements. Tethods are based on an eigen-decomposition of the co

ion matrix of the noisy signal. Even when the signal-to-natio (SNR) is low, the subspace-based methods giveuency spectra of high resolution. These methods areuited to signals that can be assumed to be composed oral special sinusoids buried in noise (Friedlander and Weis994; Porat and Friedlander, 1988; Stoica and Nehorai, 1eiss and Friedlander, 1994). In this study, subspace-basUSIC method had been selected to generate the PSDates. The polynomialA(f) which contains zeros on the u

Page 5: Automatic seizure detection in EEG using logistic regression and artificial neural network

A. Alkan et al. / Journal of Neuroscience Methods 148 (2005) 167–176 171

circle can then be used to estimate the PSD:

A(f ) =m∑

k=0

ak e−j2πfk (11)

whereA(f) represents the desired polynomial,ak representscoefficients of the desired polynomial, andm represents theorder of the eigenfilter,A(f).

The polynomial can also be expressed in terms of the auto-correlation matrixR of the input signal. Assuming that thenoise is white:

R = E{x(n)∗x(n)T} = σv2 (12)

wherex(n) is the observed signal,S represents the signaldirection matrix of dimension (m + 1)× L andL is the dimen-sion of the signal subspace,R the autocorrelation matrixof dimension (m + 1)× (m + 1), P the signal power matrixof dimension (L) × (L), σν2 represents the noise power, *represents the complex conjugate, # represents the complexconjugate transposed, T shows the matrix transposed.S thesignal direction matrix is expressed as

S = [ Sw1 Sw2 · · · SwL ] (13)

wherew1, w2, . . ., wL represent the signal frequencies:

Sw = [ 1 ejwi ej2wi · · · ejmwi ]T i = 1, 2, . . . , L

I cor-r

R

w ro ationm

R

M trixa

R

w ocor-r

vectorc t thed m.T

can then be considered to lie in the noise subspace, and Eq.(17) reduces to

Ra = σv2a (18)

under the constrainta#a = 1 whereσν2 is the noise powerwhich in the subspace-based method is the same as the min-imum eigenvalue corresponding to the eigenvectora.

In principle, under the assumption of white noise all noisesubspace eigenvalues should be equal:

λ1 = λ2 = · · · = λk = σv2, (19)

whereλi represents the noise subspace eigenvalues,i = 1, 2,. . ., K andK represents the dimension of the noise subspace.

The multiple signal classification (MUSIC) method is anoise subspace frequency estimator. This method proposedby Schmidt (1986)eliminates the effects of spurious zerosby using the averaged spectra of all of the eigenvectorscorresponding to the noise subspace. The resultant PSD isdetermined from

PMUSIC(f ) = 1

(1/K)∑k−1

i=0 |Ai(f )|2 (20)

whereK represents the dimension of noise subspace,Ai(f)represents the desired polynomial that corresponds to all theeigenvectors of the noise subspace (Friedlander, 1990; Fried-l oakisa

2

od-e so es int

l

t ablex wov allyr event( ent)v com-b sedo ouldl e( ddsr t ane g.,p sesl not

i

(14)

n practice, it is common to construct the estimated autoelation matrixR from the autocorrelation lags:

ˆ (k) = 1

N

N−1−k∑n=0

x(n + k)x(n), k = 0, 2, . . . , m (15)

herek is the autocorrelation lag index andN is the numbef the signal samples. Then, the estimated autocorrelatrix becomes:

ˆ (k) =

R(0) R(1) R(2) · · R(m)

R(1) · · R(m − 1)

R(2) · R(m − 2)

· . ·· · ·

R(m) R(m − 1) · · · R(0)

(16)

ultiplying by the eigenvector of the autocorrelation ma, Eq.(7) can be rewritten as

ˆa = SPSa + σv2a (17)

herea represents the eigenvector of the estimated autelation matrixR anda is expressed as [a0 a1 · · · am ]T.

The subspace-based method uses only the eigenorresponding to the minimum eigenvalue to construcesired polynomial (Eq.(11)) and to calculate the spectruhus, it determinesa, such thatS#a = 0. The eigenvectora

ander and Weiss, 1994; Porat and Friedlander, 1988; Prnd Manolakis, 1996; Stoica and Nehorai, 1990).

.5. Logistic regression

Logistic regression (LR) is a widely used statistical mlling technique in which the probability,P1, of dichotomouutcome event is related to a set of explanatory variabl

he form:

ogit(P1) = ln

(P1

1 − P1

)= β0 + β1x1 + · · · + βnxn

= β0 +n∑

i=1

βixi (21)

In Eq. (21), β0 is the intercept andβ1, β2, . . ., βn arehe coefficients associated with the explanatory vari1, x2, . . ., xn. A dichotomous variable is restricted to talues such as yes/no, on/off, survive/die, or 1/0, usuepresenting the occurrence or non-occurrence of somee.g., epileptic seizure/not). The explanatory (independariables may be continuous, dichotomous, discrete, orination. The use of ordinary linear regression (OLR) ban least squares method with dichotomous outcome w

ead to meaningless results. As in Eq.(21), the responsdependent) variable is the natural logarithm of the oatio representing the ratio between the probability thavent will occur to the probability that it will not occur (e.robability of being epileptic or not). In general, LR impo

ess stringent requirements than OLR in that it does

Page 6: Automatic seizure detection in EEG using logistic regression and artificial neural network

172 A. Alkan et al. / Journal of Neuroscience Methods 148 (2005) 167–176

assume linearity of the relationship between the explanatoryvariables and the response variable and does not requireGaussian distributed independent variables. LR calculatesthe changes in the logarithm of odds of the response variable,rather than the changes in the response variable itself, asOLR does. Because the logarithm of odds is linearly relatedto the explanatory variables, the regressed relationshipbetween the response and explanatory variables is not linear.The probability of occurrence of an event as function of theexplanatory variables is nonlinear as derived from Eq.(21)as

P1(x) = 1

1 + e−logit(P1(x)) = 1

1 + e−β0+∑n

i=1βixi

(22)

Unlike OLR, LR will force the probability values (P1) tolie between 0 and 1 (P1 → 0 as the right-hand side of Eq.(22) approaches−∞, and P1 → 1 as it approaches +∞).Commonly, the maximum likelihood estimation (MLE)method is used to estimate the coefficientsβ0, β1, . . ., βn inthe LR equation (Hajmeer and Basheer, 2003; Hosmer andLemeshow, 1989; Schumacher et al., 1996; Vach et al., 1996).

2.6. Artificial neural networks

Artificial neural networks (ANNs) are computing systemsmade up of large number of simple, highly interconnectedp ) thata bio-l hedt earn-i s ofb rchi-t wayt thel no-M rkr ifica-t ers;n

ay-e yerc ayerc rksi ver,f edi-a e thep n ofa iticalt tputl er ofh d bei ead-i rast,i then poorg er of

hidden layers, training becomes excessively time-consuming.The most popular approach to finding the optimal numberof hidden layers is by trial and error (Chaudhuri and Bhat-tacharya, 2000; Fausett, 1994). In the present study, MLPNNconsisted of one input layer, one hidden layer with 36 nodes,and one output layer.

Training algorithms are an integral part of ANN modeldevelopment. An appropriate topology may still fail to give abetter model, unless trained by a suitable training algorithm.A good training algorithm will shorten the training time,while achieving a better accuracy. Therefore, training processis an important characteristic of the ANNs, whereby repre-sentative examples of the knowledge are iteratively presentedto the network, so that it can integrate this knowledge withinits structure. There are a number of training algorithms usedto train a MLPNN, in our study we used the back propaga-tion training algorithm (Dreiseitl and Ohno-Machado, 2002;Fausett, 1994; Kiymik et al., 2004).

2.7. Evaluation of performance

The coherence of the diagnosis of the expert neurologistsand diagnosis information was calculated at the output of theclassifier. Prediction success of the classifier may be evalu-ated by examining the confusion matrix. In order to analyzethe output data obtained from the application, sensitivity (truep lcu-l truep neu-r osisn y thee itiver

s

O diag-n g thet t ares d thet

s

N eacho ysis.R sitiv-i t fort OCa totalsa lueb

out-p atedb ther-m d by

rocessing elements (called nodes or artificial neuronsbstractly emulate the structure and operation of the

ogical nervous system. Learning in ANNs is accomplishrough special training algorithms developed based on lng rules presumed to mimic the learning mechanismiological systems. There are many different types and a

ectures of neural networks varying fundamentally in thehey learn; the details of which are well documented initerature (Basheer and Hajmeer, 2000; Dreiseitl and Oh

achado, 2002; Fausett, 1994). In this paper, neural netwoelevant to the application being considered (i.e., classion of EEG data) will be employed for designing classifiamely the MLPNN.

The architecture of MLPNN may contain two or more lrs. A simple two-layer ANN consists only of an input laontaining the input variables to the problem, and output lontaining the solution of the problem. This type of netwos a satisfactory approximator for linear problems. Howeor approximating nonlinear systems, additional intermte (hidden) processing layers are employed to handlroblem’s nonlinearity and complexity. The determinatioppropriate number of hidden layers is one of the most cr

asks in neural network design. Unlike the input and ouayers, one starts with no prior knowledge as to the numbidden layers. A network with too few hidden nodes woul

ncapable of differentiating between complex patterns lng to only a linear estimate of the actual trend. In contf the network has too many hidden nodes it will followoise in the data due to over-parameterization leading toeneralization for untrained data. With increasing numb

ositive ratio) and specificity (true negative ratio) are caated by using confusion matrix. The sensitivity value (ositive, same positive result as the diagnosis of expertologists) was calculated by dividing the total of diagnumbers to total diagnosis numbers that are stated bxpert neurologists. Sensitivity, also called the true posatio, is calculated by the formula:

ensitivity= TPR= TP

TP+ FN× 100% (23)

n the other hand, specificity value (true negative, sameosis as the expert neurologists) is calculated by dividin

otal of diagnosis numbers to total diagnosis numbers thatated by the expert neurologists. Specificity, also callerue negative ratio, is calculated by the formula:

pecificity= TNR = TN

TN + FP× 100% (24)

eural network and LR analysis were also compared tother by receiver operating characteristic (ROC) analOC analysis is an appropriate means to display sen

ty and specificity relationships when a predictive outpuwo possibilities is continuous. In its tabular form, the Rnalysis displays true and false positive and negativend sensitivity and specificity for each listed cut-off vaetween 0 and 1.

In order to perform the performance measure of theut classification graphically, the ROC curve was calculy analyzing the output data obtained from the test. Furore, the performance of the model may be measure

Page 7: Automatic seizure detection in EEG using logistic regression and artificial neural network

A. Alkan et al. / Journal of Neuroscience Methods 148 (2005) 167–176 173

calculating the region under the ROC curve. The ROC curveis a plot of the true positive rate (sensitivity) against the falsepositive rate (1-specificity) for each possible cutoff. A cut-off value is selected that may classify the degree of epilepticseizure detection correctly by determining the input parame-ters optimally according to the used model.

3. Results and discussion

Diagnosing epilepsy is a difficult task requiring obser-vation of the patient, an EEG, and gathering of additionalclinical information. An artificial neural network that clas-sifies subjects as having or not having an epileptic seizureprovides a valuable diagnostic decision support tool for neu-rologists treating potential epilepsy, since differing etiologiesof seizures result in different treatments. In this study, wehave used periodogram, AR and MUSIC methods to com-pute PSDs of EEG signals. Then these PSDs of EEG signalswere used as an input to LR and MLPNN that could be usedto detect epileptic seizure.

In Fig. 3, periodogram, AR and MUSIC PSDs of an epilep-tic EEG signal is given. If frequency spectrum of this figureis examined visually, it can be seen that there are more mis-leading peaks in periodogram PSD. When we compare these

spectrums, it is seen that MUSIC method’s spectrum has gotsharper peaks and less misleading peaks than periodogramand AR PSDs.

Fig. 4 shows PSDs of a normal EEG signal. If thesetwo spectrums are examined visually, although periodogramspectrum has got wide and misleading peaks, AR spectrumhas got a smooth spectrum. We can say that MUSIC spectrumhas got sharper and clearer peaks than periodogram and ARPSDs. From these spectrums, delta activity, alpha activity,and beta activity can be seen easily. These results show thenature of a normal EEG signal (δ, θ, α, β bands).

3.1. Development of logistic regression model and ANNs

The objective of the modelling phase in this applicationwas to develop classifiers that are able to identify any inputcombination as belonging to either one of the two classes:normal or epileptic. For developing the LR and neural net-work classifiers, 300 examples were randomly taken fromthe 500 examples and used for deriving the LR models orfor training the neural networks. The remaining 200 exam-ples were kept aside and used for testing the validity of thedeveloped models. The class distribution of the samples inthe training, validation and test data set is summarized inTable 1.

Fig. 3. PSDs of epileptic EEG signal: (a) per

iodogram, (b) AR, and (c) MUSIC method.
Page 8: Automatic seizure detection in EEG using logistic regression and artificial neural network

174 A. Alkan et al. / Journal of Neuroscience Methods 148 (2005) 167–176

Fig. 4. PSDs of normal (healthy) EEG signal: (a) Periodogram, (b) AR, and (c) MUSIC method.

The MLPNN was designed with PSDs of EEG signal inthe input layer and the output layer consisted of one noderepresenting whether epileptic seizure was detected or not.A value of “0” was used when the experimental investigationindicated a normal and “1” for epileptic seizure. Thepreliminary architecture of the network was examined usingone and two hidden layers with a variable number of hiddennodes in each. It was found that one hidden layer is adequatefor the problem at hand.

Additionally, because the problem involves classificationinto two classes, accuracy, sensitivity and specificity wereused as a performance measure. These parameters wereobtained separately for both the training and validation setseach time a new network topology was examined. Computerprograms that we have written for the training algorithmbased on backpropagation of error were used to develop theMLPNNs.

Table 1Class distribution of the samples in the training and the validation data sets

Class Training set Validation set Total

Epileptic 102 88 190Normal 198 112 310Total 300 200 500

3.2. Applying test data

LR model and MLPNN classifier were developed usingthe 300 training examples, while the remaining 200 exampleswere used for validation of the model. Note that although LRdoes not involve training, we will use “training examples” torefer to that portion of database used to derive the regressionequations. In order to perform fair comparison between theneural network and LR-based model, only the 300 data setswere used in developing the model and the remaining data setswere kept aside for model validation. The developed logisticmodel was run on the 300 for training and 200 for validationexamples.

Firstly, we used periodogram, AR and MUSIC spectrumof EEG signals for LR and MLPNN classification. The proce-dure was repeated on EEG recordings of all subjects (healthyand epileptic patients). The correct classification results forperiodogram, AR and MUSIC are shown inTable 2. As seenin Table 2, periodogram spectrum gave the poorest result, ARis better than periodogram, and MUSIC is the best of all.

Table 3shows a summary of the performance measuresby using MUSIC preprocessing method. It is obvious fromTable 3 that the MLPNN is ranked first in terms of itsclassification accuracy of the EEG signals epileptic/normal

Page 9: Automatic seizure detection in EEG using logistic regression and artificial neural network

A. Alkan et al. / Journal of Neuroscience Methods 148 (2005) 167–176 175

Table 2Comparison of correct classification performance for the periodogram, ARand MUSIC methods

Preprocessing method Logistic regression (%) MLPNN (%)

Periodogram 88.5 88.5AR 89.5 90.5MUSIC 90.5 92

Table 3Comparison of LR and MLPNN for MUSIC preprocessing method

Classifier type Correctlyclassified (%)

Specificity(%)

Sensitivity(%)

Area underROC curve

Logisticregression

90.5 92.6 87.9 0.897

MLPNN 92 93.6 90 0.908

data 92%, while the LR-based classifier had lower accuracy(90.5%) compared to the MLPNN counterparts. The MLPNNwas able to accurately predict (detect) epileptic cases 90% ofsensitivity, while the LR-based classifiers indicated a detec-tion accuracy of only 87.9%.

Also, the area under ROC curves for the classifiers (LR andMLPNN) are given inTable 3. When the area under the ROCcurve inTable 3is examined, the MLPNN has achieved anacceptable classification success with the value 0.908. How-ever, the area under the curve has been found to be 0.897 in theLR analysis. Thus, it can be seen clearly that the performanceof the MLPNN is better than the LR model.

The testing performance of the neural network diagnos-tic system is found to be satisfactory and we think that thissystem can be used in clinical studies in the future after it isdeveloped. This application brings objectivity to the eval-uation of EEG signals and its automated nature makes iteasy to be used in clinical practice. Besides the feasibilityof a real-time implementation of the expert diagnosis system,diagnosis may be made faster. A “black box” device that maybe developed as a result of this study may provide feedback tothe neurologists for classification of the EEG signals quicklyand accurately by examining the EEG signals with real-timeimplementation.

4

s fori oachi aly-s . Theo logy.U cteda o theo wereb ristic( rfor-m melys ely

all the epileptic and normal cases. Out of the 200 epilep-tic/normal cases, the LR-based classifier misclassified a totalof 11 cases, while the MLPNN misclassified seven cases.

Essentially, MLPNNs require deciding on the number ofhidden layers, number of nodes in each hidden layer, num-ber of training iteration cycles, choice of activation function,selection of the optimal learning rate and momentum coef-ficient, as well as other parameters and problems pertainingto convergence of the solution. Compared to LR, MLPNNinclude their robustness to noisy data (with outliers) whichcan severely hamper many types of most traditional statis-tical methods. Other advantages of MLPNNs over LR thata MLPNN-based classifier can be developed quickly makessuch classifiers efficient tools that can be easily re-trained, asadditional data become available, when implemented in thehardware of EEG signal processing systems.

References

Adeli H, Zhou Z, Dadmehr N. Analysis of EEG records in an epilep-tic patient using wavelet transform. J Neurosci Meth 2003;123:69–87.

Akin M, Kiymik MK. Application of periodogram and AR spectral anal-ysis to EEG signals. J Med Syst 2000;24(4):247–56.

Basheer IA, Hajmeer M. Artificial neural networks: fundamentals, com-puting, design, and application. J Microbiol Meth 2000;43:3–31.

C rfor-com-

C tics;engi-

D l net-orm

F s, and

F ans

F esti-cess

G inicaland

G d pre-

G Ged

H neu-biol

H works

H iley;

K velrosci

M eview

. Conclusion

In this paper, two approaches to develop classifierdentifying epileptic seizure were discussed. One apprs based on the traditional method of statistical LR anis where logistic regression equations were developedther approach is based on the neural network technosing PSDs of EEG signals, two classifiers were constrund cross-compared in terms of their accuracy relative tbserved epileptic/normal patterns. The comparisonsased on analysis of the receiving operator characteROC) curves of the two classifiers and two scalar peance measures derived from the confusion matrices; na

pecificity and sensitivity. The MLPNN identified accurat

haudhuri BB, Bhattacharya U. Efficient training and improved pemance of multilayer perceptron in pattern classification. Neuroputing 2000;34:11–27.

ohen A. Biomedical signals: origin and dynamic characterisfrequency-domain analysis. In: Joseph D, editor. The biomedicalneering handbook. 2nd ed. Bronzino: CRC Press/LLC; 2000.

reiseitl S, Ohno-Machado L. Logistic regression and artificial neurawork classification models: a methodology review. J Biomed Inf2002;35:352–9.

ausett L. Fundamentals of neural networks architectures, algorithmapplications. Englewood Cliffs, NJ: Prentice-Hall; 1994.

riedlander B. A sensitivity analysis of the MUSIC algorithm. IEEE TrAcoust Speech Signal Process 1990;38(10):1740–51.

riedlander B, Weiss AJ. Effects of model errors on waveformmation using the MUSIC algorithm. IEEE Trans Signal Pro1994;42(1):147–55.

evins A, Remond A. Handbook of electroencephalography and clneurophysiology, vol. I: methods of analysis of brain electricalmagnetic signals. Amsterdam: Elsevier; 1987.

otman J, Wang L. State-dependent spike detection: concepts anliminary results. Electr Clin Neurophysiol 1991;79:11–9.

uler I, Kiymik MK, Akin M, Alkan A. AR spectral analysis of EEsignals by using maximum likelihood estimation. Comput Biol M2001;31:441–50.

ajmeer MM, Basheer IA. Comparison of logistic regression andral network-based classifiers for bacterial growth. Food Micro2003;20:43–55.

aselsteiner E, Pfurtscheller G. Using time-dependent neural netfor EEG classification. IEEE Trans Rehabil Eng 2000;8:457–63.

osmer DW, Lemeshow S. Applied logistic regression. New York: W1989.

iymik MK, Akin M, Subasi A. Automatic recognition of alertness leby using wavelet transform and artificial neural network. J NeuMeth 2004;139:231–40.

archant BP. Time frequency analysis for biosystems engineering rpaper. Biosyst Eng 2003;85(3):261–81.

Page 10: Automatic seizure detection in EEG using logistic regression and artificial neural network

176 A. Alkan et al. / Journal of Neuroscience Methods 148 (2005) 167–176

Porat B, Friedlander B. Analysis of the asymptotic relative efficiencyof the MUSIC algorithm. IEEE Trans Acoust Speech Signal Process1988;36(4):532–44.

Pradhan N, Sadasivan PK, Arunodaya GR. Detection of seizure activityin EEG by an artificial neural network: a preliminary study. ComputBiomed Res 1996;29:303–13.

Proakis JG, Manolakis DG. Digital signal processing principles, algo-rithms and applications. New Jersey: Prentice-Hall; 1996.

Schmidt RO. Multiple emitter location and signal parameter estimation.IEEE Trans Antennas Propag 1986;AP-34(3):276–80.

Schneble H, Matthes A. Epilepsy in children. Germany: Kork EpilepsyCenter; 1996. pp. 3–30.

Schumacher M, Robner R, Vach W. Neural networks and logistic regres-sion: part I. Comput Stat Data Anal 1996;21:661–82.

Stoica P, Nehorai A. MUSIC, maximum likelihood, and Cramer–Raobound: further results and comparisons. IEEE Trans Acoust SpeechSignal Process 1990;12:2140–50.

Subasi A. Automatic recognition of alertness level from EEG byusing neural network and wavelet coefficients. Expert Syst Appl2005;28:701–11.

Sun M, Sclabassi RJ. The forward EEG solutions can be computed usingartificial neural networks. IEEE Trans Biomed Eng 2000;47:1044–50.

Ubeyli ED, Guler I. Comparison of eigenvector methods with classi-cal and model-based methods in analysis of internal carotid arterialDoppler signals. Comput Biol Med 2003;33:473–93.

Vach W, Robner R, Schumacher M. Neural networks and logistic regres-sion: part II. Comput Stat Data Anal 1996;2:683–701.

Weiss AJ, Friedlander B. Effects of modeling errors on the resolu-tion threshold of the MUSIC algorithm. IEEE Trans Signal Process1994;42(6):1519–26.

Weng W, Khorasani K. An adaptive structure neural network withapplication to EEG automatic seizure detection. Neural Networks1996;9:1223–40.