9
Journal of Neuroscience Methods 191 (2010) 101–109 Contents lists available at ScienceDirect Journal of Neuroscience Methods journal homepage: www.elsevier.com/locate/jneumeth Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks Ling Guo , Daniel Rivero, Julián Dorado, Juan R. Rabu ˜ nal, Alejandro Pazos Department of Information Technologies and Communications, University of La Coru˜ na, Campus Elvi˜ na, 15071 A Coru˜ na, Spain article info Article history: Received 14 April 2010 Received in revised form 23 May 2010 Accepted 26 May 2010 Keywords: Electroencephalogram (EEG) Epileptic seizure detection Discrete wavelet transform (DWT) Line length feature Artificial neural network (ANN) abstract About 1% of the people in the world suffer from epilepsy. The main characteristic of epilepsy is the recurrent seizures. Careful analysis of the electroencephalogram (EEG) recordings can provide valuable information for understanding the mechanisms behind epileptic disorders. Since epileptic seizures occur irregularly and unpredictably, automatic seizure detection in EEG recordings is highly required. Wavelet transform (WT) is an effective analysis tool for non-stationary signals, such as EEGs. The line length feature reflects the waveform dimensionality changes and is a measure sensitive to variation of the signal amplitude and frequency. This paper presents a novel method for automatic epileptic seizure detection, which uses line length features based on wavelet transform multiresolution decomposition and combines with an artificial neural network (ANN) to classify the EEG signals regarding the existence of seizure or not. To the knowledge of the authors, there exists no similar work in the literature. A famous public dataset was used to evaluate the proposed method. The high accuracy obtained for three different classification problems testified the great success of the method. © 2010 Elsevier B.V. All rights reserved. 1. Introduction Epilepsy is a type of neurological disorder disease. It is the sec- ond most prevalent neurological disorder in humans after stroke. About 40 or 50 million people in the world suffer from epilepsy (Kandel et al., 2000). In epilepsy, the normal pattern of neuronal activity becomes disturbed, causing strange sensations, emotions, and behavior or sometimes convulsions, muscle spasms, and loss of consciousness. Epilepsy is characterized by recurrent seizure in which abnormal electrical activity in the brain causes altered per- ception or behavior. Patients experience varied symptoms during seizures depending on the location and extent of the affected brain tissue. Depending on the extent of the involvement of brain areas during the seizure, epilepsy can be divided into two main types. Generalized seizures involve almost the entire brain, while par- tial seizures originate from a circumscribed area of the brain and remain restricted to this area. Epileptic seizures may cause nega- tive physical, psychological and social consequences, including loss of consciousness, injuries and sudden death. Until now, the specific cause of epilepsy in individuals is unknown and the mechanisms behind the seizure are little understood. Thus, efforts towards its diagnosis and treatment are of great importance. Corresponding author. Tel.: +34 981 167000x1302; fax: +34 981 167160. E-mail address: [email protected] (L. Guo). Electroencephalogram (EEG) is the recording of the electrical activity of the brain. There are two different types of EEG depend- ing on the location of electrodes on the head: scalp and intracranial. For scalp EEG, electrodes are placed on the scalp with good mechan- ical and electrical contacts. However, intracranial EEG is obtained through special electrodes implanted in the brain during a surgery. Scalp EEG, which is the focus of this research, is the most common diagnostic method to detect abnormalities of the brain’s electri- cal activity. EEG recordings contain lots of valuable information for understanding epilepsy. The detection of seizures occurring in the EEGs is an important component in the diagnosis and treatment of epilepsy (Subasi, 2005a). However, visual inspect for discriminat- ing EEGs is a time consuming and high costly process because of the tons of data included in EEG recordings. Thus, developing automatic seizure detection methods is of great significance for reviewing the EEGs. Researches on automatic seizure detection began in the 1970s and various methods addressing this problem have been presented. Mohseni et al. (2006) applied short time Fourier transform anal- ysis of EEG signals and extracted features based on the pseudo Wigner-Ville and the smoothed-pseudo Wigner-Ville distribution. Then those features are used as inputs to an artificial neural net- work for classification. Kalayci and Ozdamar (1995) used wavelet transform to capture some specific characteristic features of the EEG signals and then combined with ANN to get satisfying clas- sification result. Nigam and Graupe (2004) described a method for automated detection of epileptic seizures from EEG signals 0165-0270/$ – see front matter © 2010 Elsevier B.V. All rights reserved. doi:10.1016/j.jneumeth.2010.05.020

Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks

Embed Size (px)

Citation preview

Page 1: Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks

Aa

LD

a

ARRA

KEEDLA

1

oA(aaowcstdGtrtocbd

0d

Journal of Neuroscience Methods 191 (2010) 101–109

Contents lists available at ScienceDirect

Journal of Neuroscience Methods

journa l homepage: www.e lsev ier .com/ locate / jneumeth

utomatic epileptic seizure detection in EEGs based on line length feature andrtificial neural networks

ing Guo ∗, Daniel Rivero, Julián Dorado, Juan R. Rabunal, Alejandro Pazosepartment of Information Technologies and Communications, University of La Coruna, Campus Elvina, 15071 A Coruna, Spain

r t i c l e i n f o

rticle history:eceived 14 April 2010eceived in revised form 23 May 2010ccepted 26 May 2010

eywords:

a b s t r a c t

About 1% of the people in the world suffer from epilepsy. The main characteristic of epilepsy is therecurrent seizures. Careful analysis of the electroencephalogram (EEG) recordings can provide valuableinformation for understanding the mechanisms behind epileptic disorders. Since epileptic seizures occurirregularly and unpredictably, automatic seizure detection in EEG recordings is highly required. Wavelettransform (WT) is an effective analysis tool for non-stationary signals, such as EEGs. The line length

lectroencephalogram (EEG)pileptic seizure detectioniscrete wavelet transform (DWT)ine length featurertificial neural network (ANN)

feature reflects the waveform dimensionality changes and is a measure sensitive to variation of thesignal amplitude and frequency. This paper presents a novel method for automatic epileptic seizuredetection, which uses line length features based on wavelet transform multiresolution decompositionand combines with an artificial neural network (ANN) to classify the EEG signals regarding the existenceof seizure or not. To the knowledge of the authors, there exists no similar work in the literature. A famouspublic dataset was used to evaluate the proposed method. The high accuracy obtained for three differentclassification problems testified the great success of the method.

. Introduction

Epilepsy is a type of neurological disorder disease. It is the sec-nd most prevalent neurological disorder in humans after stroke.bout 40 or 50 million people in the world suffer from epilepsy

Kandel et al., 2000). In epilepsy, the normal pattern of neuronalctivity becomes disturbed, causing strange sensations, emotions,nd behavior or sometimes convulsions, muscle spasms, and lossf consciousness. Epilepsy is characterized by recurrent seizure inhich abnormal electrical activity in the brain causes altered per-

eption or behavior. Patients experience varied symptoms duringeizures depending on the location and extent of the affected brainissue. Depending on the extent of the involvement of brain areasuring the seizure, epilepsy can be divided into two main types.eneralized seizures involve almost the entire brain, while par-

ial seizures originate from a circumscribed area of the brain andemain restricted to this area. Epileptic seizures may cause nega-ive physical, psychological and social consequences, including lossf consciousness, injuries and sudden death. Until now, the specific

ause of epilepsy in individuals is unknown and the mechanismsehind the seizure are little understood. Thus, efforts towards itsiagnosis and treatment are of great importance.

∗ Corresponding author. Tel.: +34 981 167000x1302; fax: +34 981 167160.E-mail address: [email protected] (L. Guo).

165-0270/$ – see front matter © 2010 Elsevier B.V. All rights reserved.oi:10.1016/j.jneumeth.2010.05.020

© 2010 Elsevier B.V. All rights reserved.

Electroencephalogram (EEG) is the recording of the electricalactivity of the brain. There are two different types of EEG depend-ing on the location of electrodes on the head: scalp and intracranial.For scalp EEG, electrodes are placed on the scalp with good mechan-ical and electrical contacts. However, intracranial EEG is obtainedthrough special electrodes implanted in the brain during a surgery.Scalp EEG, which is the focus of this research, is the most commondiagnostic method to detect abnormalities of the brain’s electri-cal activity. EEG recordings contain lots of valuable information forunderstanding epilepsy. The detection of seizures occurring in theEEGs is an important component in the diagnosis and treatment ofepilepsy (Subasi, 2005a). However, visual inspect for discriminat-ing EEGs is a time consuming and high costly process because of thetons of data included in EEG recordings. Thus, developing automaticseizure detection methods is of great significance for reviewing theEEGs.

Researches on automatic seizure detection began in the 1970sand various methods addressing this problem have been presented.Mohseni et al. (2006) applied short time Fourier transform anal-ysis of EEG signals and extracted features based on the pseudoWigner-Ville and the smoothed-pseudo Wigner-Ville distribution.Then those features are used as inputs to an artificial neural net-

work for classification. Kalayci and Ozdamar (1995) used wavelettransform to capture some specific characteristic features of theEEG signals and then combined with ANN to get satisfying clas-sification result. Nigam and Graupe (2004) described a methodfor automated detection of epileptic seizures from EEG signals
Page 2: Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks

1 cience

uifcEsmf(cntvmled(c

tiIetroonbadtsdLMfwpofotdr

tEtftetfcelaet

cabc

02 L. Guo et al. / Journal of Neuros

sing a multistage nonlinear pre-processing filter for extract-ng two features: relative spike amplitude and spike occurrencerequency. Then they fed those features to a diagnostic artifi-ial neural network. In the work of Jahankhani et al. (2006), theEGs were decomposed with wavelet transform into differentub-bands and some statistical information, such as maximum,inimum, mean, and standard deviation value, were extracted

rom the wavelet coefficients. Radial basis function networkRBF) and multi-layer perceptron network (MLP) were utilized aslassifiers. Subasi (2005b, 2006, 2007) decomposed the EEG sig-als into time–frequency representations using discrete waveletransform (DWT). Some features, such as mean of the absolutealue, average power, standard deviation, ratio of the absoluteean value derived from the wavelet coefficients were calcu-

ated and applied to different classifiers, such as feed-forwardrror back-propagation artificial neural network (FEBANN),ynamic wavelet network (DWN), dynamic fuzzy neural networkDFNN) and mixture of expert system (ME), for epileptic EEGlassification.

Among the works for seizure detection, instead of applying fea-ures derived from DWT to discriminate EEGs, other quantitativenformation from time series of signals were also investigated.n the work of Güler et al. (2005), Layapunov exponents werextracted from EEGs with Jacobi matrices and then applied as inputso recurrent neural networks (RNNs) to obtain good classificationesults. Übeyli (2006b) classified the EEG signals by combinationf Lyapunov exponents and fuzzy similarity index. Fuzzy sets werebtained from the feature sets (Lyapunov exponents) of the sig-als under study. The results demonstrated that the similarityetween the fuzzy sets of the studied signals indicated the vari-bilities in the EEG signals. Thus, the fuzzy similarity index couldiscriminate the different EEGs. In the work of Übeyli (2006a),he author used the computed Lyapunov exponents of the EEGignals as inputs of the MLPNNs trained with back propagation,elta-bar-delta, extended delta-bar-delta, quick propagation, andevenberg-Marquardt algorithms. The classification accuracy ofLPNN trained with the Levenberg-Marquardt algorithm was 95%

or healthy, seizure-free and seizure EEGs discrimination. In theork presented by Übeyli and Güler (2007), decision making waserformed in two stages: feature extraction by eigenvector meth-ds and classification using the classifiers trained on the extractedeatures. The inputs of these expert systems composed of diverser composite features were chosen according to the network struc-ures. The five-class classification accuracies of expert system withiverse features and with composite feature were 95.53% and 98.6%,espectively.

Choosing suitable features that can best represent the charac-eristics of the EEG signals is important for seizure detection inEGs. Many types of features have been investigated based on spec-ral (Nigam and Graupe, 2004; Polat and Günes, 2007) or waveleteatures (Adeli et al., 2003; Sadati et al., 2006; Subasi, 2007), ampli-ude relative to background activity (Murro et al., 1991; Dinglet al., 1993), spatial context (Tzallas et al., 2007a), energy dis-ribution in time–frequency plane (Tzallas et al., 2007b), chaoticeatures (Kannathal et al., 2005a; Päivinen et al., 2005) such asorrelation dimension (Lerner, 1996), Lyapunov exponents (Gülert al., 2005), and entropy (Kannathal et al., 2005b). In this work,ine length feature, which is sensitive to variations of the signalmplitude and frequency with low computational cost (Estellert al., 2004), is used to epileptic seizure detection for the firstime.

Artificial Neural Networks (ANNs) have been used as the mostommon classifier for discriminating the EEGs based on the liter-ture review. ANN is an information processing system inspiredy the biological nervous systems. It is a parallel highly inter-onnected structure consisting of a number of simple, non-linear

Methods 191 (2010) 101–109

processing elements. ANN can perform computations at a very highspeed if implemented on a dedicated hardware. Because of its adap-tive nature, it can adapt itself to learn the knowledge of inputsignals. Thus, an ANN model was chosen as the classifier system forthe current work. Multilayer perceptron neural network (MLPNN)is the most frequently used feedforward neural network for patternrecognition including diagnosis of diseases.

Apart from ANNs are used as classifier systems, other types ofclassifiers are also utilized for EEG discrimination, which includesLinear discriminant analysis (LDA), Multiclass support vectormachines (SVMs), Bayesian classifier, and Nearest neighbor clas-sifier. LDA assumes normal distribution of the data, with equalcovariance matrix for two classes. The separating hyperplane isobtained by seeking the projection that maximizes the distancebetween the two classes’ means and minimizes the interclass vari-ance. This technique has a very low computational requirementwhich makes it suitable for the online and real-time classificationproblem (Garrett et al., 2003). SVM also uses a discriminant hyper-plane to identify classes. However, concerning SVM, the selectedhyperplane is the one that maximizes the margins, i.e., the distancefrom the nearest training points. Maximizing the margins is knownto increase the generalization capabilities (Blankertz et al., 2002).The main weak of SVM is its relatively low execution speed. Übeyli(2008) presented the multiclass support vector machine with theerror correcting output codes (ECOC) for EEGs classification. Thefeatures were extracted by the usage of eigenvector methods whichwere used to train novel classifier (multiclass SVM with the ECOC)for the EEG signals. The Bayesian classifier aims at assigning to a fea-ture vector the class based on highest probability. The Bayers rule isused to compute the so-called a posteriori probability that a featurevector has of belonging to a given class. Using the MAP (maximum aposteriori) rule and these probabilities, the class of this feature vec-tor can be estimated (Fukunaga, 1990). Nearest neighbor classifiersare relatively simple. They assign a feature vector to a class accord-ing to its nearest neighbor(s) and they are discriminative non-linearclassifiers (Garrett et al., 2003).

The results of the studies in the literature have demonstratedthat the wavelet transform (WT) is a powerful tool for analyz-ing EEG signals (Kalayci and Ozdamar, 1995; Subasi, 2005b, 2006,2007; Jahankhani et al., 2006). Compared with the conventional sig-nal analysis techniques such as Fourier transform and short timeFourier transform with fixed time–frequency resolution, WT ana-lyzes the signal with a flexible time–frequency resolution. The WTextracts the wavelet coefficients in different scales of the signals.This procedure makes use of multi-rate signal processing methodsand is named multiresolution signal analysis. The multiresolutionfeature of the WT allows the decomposition of a signal into severalsub-signals, each sub-signal representing a particular coarseness ofthe signal under study (Güler and Übeyli, 2005). Through multires-olution decomposition, transient events which always occur duringepileptic seizures in EEGs are precisely captured. In this respect, inthe present study the WT was used for analyzing the EEG signals.

In current work, a novel automatic epileptic seizure detectionmethod is proposed. The method consists of three steps. Initially,discrete wavelet transform is used to decompose the EEG sig-nal to several sub-signals in different frequency bands. Then, theline length feature is extracted from each sub-signal. Finally, theextracted features are put as input to an artificial neural network,which discriminates the EEGs according to the specified classi-fication problems. To the knowledge of the authors, there is noother work in the literature related to use line length feature as

the input to an ANN for automatic epileptic seizure detection inEEGs. A dataset containing 500 EEG segments is employed. The pro-posed method is testified for three classification problems, whiledifferent selection of EEGs from the whole dataset is required foreach classification problem. The obtained high accuracies indicate
Page 3: Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks

L. Guo et al. / Journal of Neuroscience Methods 191 (2010) 101–109 103

(Z, O, N

tc

tdttwS

2

2

cZowraths(arhWfwass0d

fm

More clear description of the classification problems consideredis shown in Table 1.

Table 1The classes and the corresponding number of EEG segments for three classificationproblems.

Classification problem Classes Number of EEGsegments

Z − S Normal (Z) 100Seizure (S) 100

Total 200

ZNF − S Non-seizure excluding healthywith eyes closed (Z,N, F)

300

Seizure (S) 100

Total 400

Fig. 1. Example EEG segments from each of the five sets

he excellent classification performance of the proposed method inomparison with other approaches.

The rest of the paper is organized as follows. In Section 2,he dataset used in this work and the proposed methodology areescribed in detail. Then in Section 3, the evaluation procedure andhe obtained experimental results are presented, following by fur-her discussion through comparison with the results from othersork. Finally, some conclusions and future work are included in

ection 4.

. Materials and methods

.1. Dataset description

The data described by Andrzejak et al. (2001) was used inurrent work. The whole dataset consists of five sets (denoted as, O,N, F and S), each containing 100 single-channel EEG segmentsf 23.6 s duration, with sampling rate of 173.6 Hz. These segmentsere selected and cut out from continuous multi-channel EEG

ecordings after visual inspection for artifacts, e.g., due to musclectivity or eye movements. Sets Z and O consisted of segmentsaken from surface EEG recordings that were carried out on fiveealthy volunteers using a standardized electrode placementcheme. Volunteers were relaxed in an awake state with eyes openZ) and eyes closed (O), respectively. Sets N, F and S originated fromn EEG archive of presurgical diagnosis. Segments in set F wereecorded from the epileptogenic zone, and those in set N from theippocampal formation of the opposite hemisphere of the brain.hile sets N and F contained only activity measured during seizure

ree intervals, set S only contained seizure activity. All EEG signalsere recorded with the same 128-channel amplifier system, using

n average common reference. The data were digitized at 173.61amples per second using 12 bit resolution and they have thepectral bandwidth of the acquisition system, which varies from

.5 Hz to 85 Hz. Typical EEG segments (one from each of the fiveescribed sets) are shown in Fig. 1.

In this work, three different classification problems are createdrom the above dataset in order to compare the performance of our

ethod with other approaches.

, F, and S). From top to bottom: segment Z to segment S.

• In the first, two sets were examined, normal and seizure. Thenormal class includes only set Z while the seizure class includesset S.

• In the second, four sets from the dataset were used and they wereclassified into two different classes: non-seizure sets excludinghealthy with eyes closed are employed in the first class (sets Z, N,F) and set S in the second class.

• In the third, all the EEGs from the dataset were used andthey were classified into two different classes: sets Z, O, Nand F are included in the non-seizure class and set S in theseizure class. This classification problem is close to the clinicalapplications.

ZONF − S Non-seizure (Z,O,N, F) 400Seizure (S) 100

Total 500

Page 4: Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks

104 L. Guo et al. / Journal of Neuroscience Methods 191 (2010) 101–109

2

2

i(nFoFdaahstta

tviaTssd

d

C

walda{

E

D

Dpsps

Table 2Frequency bands of EEG signals with four-level DWT decomposition.

Sub-signal Frequency band (Hz) Decomposition level

D1 43.4–86.8 1

Fig. 2. Sub-band decomposition of DWT implementation.

.2. Methods

.2.1. Analysis with discrete wavelet transform (DWT)Recently, wavelet transform (WT) has been widely applied

n many engineering fields for solving various real-life problemsSubasi, 2005b). EEG is a complicated and non-stationary sig-al and its characteristics are spatio-temporal dependent. Theourier transform (FT) of a signal obtains the frequency contentf the signal and eliminates time information. The short-timeourier transform (STFT) is a series of FT with a fixed win-ow size. Because a large window loses time resolution andshort window loses frequency resolution, there always existstrade-off between time and frequency resolutions: on one

and, a good time resolution requires a short window withhort time support; on the other hand, a good frequency resolu-ion requires a long time window. The fixed window size (fixedime–frequency resolution) of the STFT results in constraint in somepplications.

Contrary to STFT, WT provides a more flexible way ofime–frequency representation of a signal by allowing the use ofariable sized analysis windows. The attractive feature of WT is thatt provides accurate frequency information at low frequencies andccurate time information at high frequencies (Adeli et al., 2003).his property is important in biomedical applications, because mostignals in this field always contain high frequency information withhort time duration and low frequency information with long timeuration.

The continuous wavelet transform (CWT) of a signal S(t) isefined as the correlation between S(t) and the wavelet functiona,b as follows (Chui, 1992):

WT(a,b) = |a|−1/2

∫ ∞

−∞S(t) ∗

(t − ba

)dt (1)

here the star symbol ‘*’ denotes the complex conjugation, a, bre called the scale (reciprocal of frequency) and translation (timeocalization) parameters, respectively. When a and b are taken asiscrete numbers and defined on the basis of power of two, whichre like the following:

aj = 2j

bj,k = 2jk j, k∈ Z (2)

Then the discrete wavelet transform (DWT) is obtained and theq. (1) becomes (Chui, 1992):

WT(j,k) = 2−j/2

∫ ∞

−∞S(t) ∗

(t − 2jk

2j

)dt (3)

Mallat (1989) developed an efficient way of implementation

WT by passing the signal through a series of low-pass and high-ass filters. The DWT implementation procedure is schematicallyhown in Fig. 2, where filters h[n] and g[n] correspond to high-ass and low-pass filters, respectively (Subasi, 2007). In the firsttage, the signal is simultaneously passed through h[n] and g[n]

D2 21.7–43.4 2D3 10.8–21.7 3D4 5.4–10.8 4A4 0–5.4 4

filters with the cut-off frequency being the one fourth of the sam-pling frequency. The outputs of h[n] and g[n] filters are referredto as detail (D1) and approximation (A1) coefficients of the firstlevel, respectively. The same procedure is repeated for the first levelapproximation coefficients to get the second level coefficients. Thisprocess is called multiresolution decomposition. At each decompo-sition stage, the frequency resolution is doubled through filteringand the time resolution is halved through downsampling. The coef-ficients A1, D1, A2, and D2 represent the frequency content of theoriginal signal within the band 0 − fS/4, fS/4 − fS/2, 0 − fS/8, andfS/8 − fS/4, respectively, where fS is the sampling frequency of theoriginal signal x[n]. Through multiresolution decomposition, tran-sient events are precisely captured and localized in both time andfrequency domain.

For the multiresolution decomposition process, selection of theappropriate wavelet function and the number of decompositionlevels are very important. The number of decomposition levelsis decided based on the dominant frequency components of thesignal. The levels are chosen such that those parts of the signalthat correlate well with the frequencies necessary for classifi-cation of the signal are retained in the wavelet coefficients. Incurrent work, the number of decomposition levels is chosen 4,which is recommended by others’ work (Subasi, 2006). Usually,tests are performed with different types of wavelet function andthe one which gives maximum efficiency is selected for the par-ticular application. In this study, Daubechies wavelet of order 4(db4) is selected because its smoothing feature was suitable fordetecting changes of the EEGs, as proven in other work (Subasi,2007).

The frequency bands corresponding to 4-level DWT decompo-sition with sampling frequency of 173.6 Hz on the EEG signal areshown in Table 2. One EEG signal was decomposed into four detailsub-signalsD1–D4 and one final approximation sub-signalA4. Eachsub-signal corresponds to the signal information within differentfrequency bands.

2.2.2. Line length feature extractionLine length is a measure of the signal complexity or wave-

form fractal dimension, and it is similar to Katz’s fractal dimensionpresented in Esteller et al. (2001). Since line length is sensitiveto amplitude and frequency variations of the signals, it is alsotreated as a measure of “seizureness” or pathology of the com-bined amplitude–frequency characteristics of the EEGs (Esteller etal., 2004).

The line length of a signal, L, is sum of the vertical distancebetween successive samples of the signal, defined as (Esteller etal., 2004):

L = 1N − 1

N−1∑i=1

abs(xi+1 − xi) (4)

where x stands for the signal considered, i represents the index

of the signal samples, abs means absolute value, and N is thetotal number of samples of the signal. The line length feature welldemonstrates the amplitude–frequency characteristics of the EEGs(Esteller et al., 2004) and thus it is good for epileptic seizure detec-tion. The another reason of choosing line length feature in this work
Page 5: Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks

cience

iws

sdsn

2

spcincm

aeita

sratdhrf

y

wwth

v

E

wora

trwruuvidwr

x

L. Guo et al. / Journal of Neuros

s because of its low computational burden (Esteller et al., 2001),hich makes it suitable for developing a real time seizure detection

ystem in the future.After the EEG signal is decomposed by DWT into five sub-

ignals, which individually correspond to different frequency bandsescribed in Table 2, line length feature is calculated on each sub-ignal to form the feature vector as the input of an artificial neuraletwork for classification EEGs.

.2.3. Classification using Artificial Neural Networks (ANNs)An Artificial Neural Network is an information-processing

ystem that is based on simulation of the human cognitionrocess. An ANN consists of many computational neural unitsonnected to each other. In ANNs, knowledge about the problems distributed through the connection weights of links betweeneurons. The neural network has to be trained to adjust theonnection weights and biases in order to produce the desireapping.ANNs are widely used in biomedical field for modeling, data

nalysis, and diagnostic recognition. The capability of learning fromxamples, the ability to reproduce arbitrary non-linear functions ofnput, and the highly parallel and regular structure of ANNs makehem especially suitable for pattern recognition problems (Basheernd Hajmeer, 2000; Sun and Sclabassi, 2000).

Multi-layer perceptron neural network (MLPNN) has featuresuch as the ability to learn and generalize, smaller training dataequirement, fast operation, easy implementation (Subasi, 2007)nd thus it is one of the most widely used neural network archi-ectures. The MLPNN is a neural network for performing variedetection and classification tasks. In MLPNNs, each neuron j in theidden layer sums its input signals xi after multiplying them by theespective connection weights wji and computes its output yj as aunction of the sum (Subasi, 2007):

i = f(∑

wjixi

)(5)

here f is the activation function that is essential to transform theeighted sum of all signals inputting onto a neuron. The activa-

ion function (f) can be a simple threshold function, or a sigmoid,yperbolic tangent, or radial basis function.

The sum of squared differences between the target and actualalues of the output neurons E is defined as (Subasi, 2007):

= 12

∑j

(ydj − yj)2 (6)

here ydj is the desired value of output neuron j and yj is the actualutput of that neuron. Each weight wji is adjusted to reduce E asapidly as possible. How wji is adjusted depends on the traininglgorithm applied.

Training algorithm is an important part of ANN model. A goodopology can be inefficient if trained by an inappropriate algo-ithm. A suitable training algorithm has short training processhile achieving better accuracy. There are many training algo-

ithms used to train MLPNN and one of the most commonlysed is Bayesian regularization back-propagation, which is alsosed in current work. This algorithm updates the weight and biasalues according to Levenberg-Marquardt optimization. It min-mizes a combination of squared errors and weights and thenetermines the correct combination so as to produce a net-

ork that generalizes well. The process is also called Bayesian

egularization.The basic step of iteration is (Mathworks, 2002):

k+1 = xk − [JT J +�I]−1JT e (7)

Methods 191 (2010) 101–109 105

where J is the Jacobian matrix that contain first derivatives of thenetwork errors with respect to the weights and biases, e is a vectorof network error and � is the Marquardt adjustment parameter. Iis an identity matrix. The performance function in this algorithm ismodified by mean square errormsebr:

msebr = �mse+ (1 − �)msw

mse = 1n

n∑i=1

e2i

msw = 1n

n∑j=1

w2j

where � is the performance ratio and msw is mean square weights.The optimum value of msw is determined using Bayesian frame-work (MacKay, 1992).

2.3. Statistical parameters

The evaluation of the proposed method on classification prob-lems is determined by computing the statistical parameters ofsensitivity, specificity and classification accuracy. The definitionsof these parameters are as (Srinivasan et al., 2005):

• Sensitivity: Number of correctly detected positive patterns/totalnumber of actual positive patterns. A positive pattern indicates adetected seizure.

• Specificity: Number of correctly detected negative patterns/totalnumber of actual negative patterns. A negative pattern indicatesa detected normal/non-seizure.

• Classification accuracy: Number of correctly classified pat-terns/total number of patterns.

3. Results and discussion

3.1. Results

The three classification problems, described above, are used toevaluate the proposed method. The classification implementationprocedure is: EEG signal under study is firstly decomposed intofive sub-signals through DWT (D1–D4 and A4), that each sub-signalrepresents the different frequency bands information (shown inTable 2). Figs. 3–7 show decomposition a sample EEG segment fromeach of five sets (Z, O, N, F, S), respectively.

Then the line length feature is extracted from each of five sub-signals. Table 3 presents the line length value of the sample EEGsegments from five sets. From Table 3, one can see that the extractedline length features of the five classes EEG are different each other.Thus, line length can been treated as a useful feature in classifyingthe EEG signals.

Finally, the extracted five line length features for each EEGsegment are fed into an MLPNN to classify normal/non-seizureand seizure EEGs. For addressing the specific problems, severaldifferent MLPNN structures have been tried. The network structurethat gave the best results for three classification problems of thiswork is: one input layer with 5 neurons (equals to the number ofline length features extracted for each EEG segment), one hiddenlayer with 10 neurons and one output layer with 1 neuron. Theunits in the hidden layer are sigmoid units with hyperbolic tangentas transfer function, while the output is linear. The target value ofthe MLPNN output layer was defined as 0 or 1, which 0 represents

the normal/non-seizure EEG and 1 represents the seizure EEG.The MLPNN was implemented by using MATLAB software version7.9. Half of the data were randomly selected for training, whilethe rest for testing. The training data set was used to train theMLPNN network, whereas the testing data was used to verify the
Page 6: Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks

106 L. Guo et al. / Journal of Neuroscience Methods 191 (2010) 101–109

Fig. 3. Approximation and details of a sample normal EEG with eyes open in set Z.

Fig. 4. Approximation and details of a sample normal EEG with eyes closed in set O.

Table 3The line length value of the samples from five sets.

Class Sub-signal

D1 D2 D3 D4 A4

Z 4.7852 24.8986 74.8035 87.9123 108.6114O 4.6522 31.0668 142.2140 93.4973 84.4104N 15.3599 72.6791 163.3145 258.3563 344.6266F 5.4545 32.8615 88.2338 180.2990 271.8491S 18.8 137.4 542.8 1217.5 1283.6

Page 7: Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks

L. Guo et al. / Journal of Neuroscience Methods 191 (2010) 101–109 107

Fig. 5. Approximation and details of a sample seizure-free EEG opposite to epileptogenic zone in set N.

seizur

aEstc

TT

Fig. 6. Approximation and details of a sample

ccuracy and the effectiveness of the trained MLPNN for specific

EG classification problems. One hundred different training-testets were randomly created for each classification problem. Theest performance of the proposed method is determined byomputation three statistical parameters described in Section 2.3,

able 4he performance evaluation parameters.

Classification problem Specificity (%)

Z − S 100ZNF − S 95.61ZONF − S 94.60

e-free EEG within epileptogenic zone in set F.

which the average results of 100 executions are given in Table 4

for three classification problems.

From the results shown in Table 4, it can be concluded that: forZ − S classification problem, the specificity reaches 100%, whichmeans that all normal EEGs in the test data are correctly classi-

Sensitivity (%) Classification accuracy (%)

99.40 99.6098.55 97.7598.61 97.77

Page 8: Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks

108 L. Guo et al. / Journal of Neuroscience Methods 191 (2010) 101–109

f a sa

ficesafwsstt

3

sbpdf

TA

Fig. 7. Approximation and details o

ed and none of them are misclassified as epileptic EEG. The totallassification accuracy for Z − S reaches 99.6%, which indicates anxcellent classification performance; forZNF − S andZONF − S clas-ification problems, the total classification accuracies are 97.75%nd 97.77%, respectively. The significant high accuracies obtainedor three classification problems proved that the line length featureell represents characteristic of the EEG signals. In addition, con-

idering low computation requirement of the line length, a real timeystem may be developed as a result of this work which can assisthe medical professionals to detect seizures quickly and accuratelyhrough examining the EEG recordings.

.2. Comparison with others work

There are many other methods proposed for the epileptic

eizure detection. Table 5 presents a comparison on the resultsetween the method developed in this work and other methodsroposed in the literature. Only methods evaluated in the sameataset are included so that a comparison between the results iseasible.

able 5comparison of the classification accuracy obtained by our method and others’ method f

Researchers Method

Nigam and Graupe (2004) Nonlinear pre-processing filter-Diagnostic neurSrinivasan et al. (2005) Time & frequency domain features-Recurrent nKannathal et al. (2005b) Entropy measures-Adaptive neuro-fuzzy infereKannathal et al. (2005a) Chaotic measures-Surrogate data analysisPolat and Günes (2007) Fast Fourier transform-Decision treeSubasi (2007) Discrete wavelet transform-Mixture of expert mTzallas et al. (2007b) Time frequency analysis-Artificial neural netwoGuo et al. (2009) Discrete wavelet transform-relative wavelet en

This work Discrete wavelet transform-line length feature-

Ocak (2009) Discrete wavelet transform-approximate entro

This work Discrete wavelet transform-line length feature-

Tzallas et al. (2007b) Time frequency analysis-Artificial neural netwoThis work Discrete wavelet transform-line length feature-

mple epileptic seizure EEG in set S.

For Z − S classification problem, the accuracy obtained fromour method (99.6%) is the second best presented for thisdataset. The best result is 100% in Tzallas’s work, which wasobtained from the time–frequency analysis combination withANN.

For ZNF − S classification problem, the result obtained fromthe evaluation of our method is better than Ocak’s work with1% difference, in which the author developed a scheme based onapproximate entropy (ApEn) and discrete wavelet transform todiscriminate EEGs.

For ZONF − S classification problem, which is a case more closeto the clinic expert needs, the result obtained in our work is asgood as that of the Tzallas’s work, in which the authors employedthe energy distribution features extracted from the time–frequencyplane to an ANN for classifying EEGs. Although the classification

accuracies are almost the same for these two works, the line lengthfeatures applied in our method are much simpler and lower com-putation cost compared with those in Tzallas’s work. This makes asystem developed from current work more suitable for real timeseizure detection in clinical epilepsy diagnostics.

or three classification problems.

Dataset Classification accuracy (%)

al network Z, S 97.2eural network Z, S 99.6nce system Z, S 92.22

Z, S ∼90Z, S 98.72

odel Z, S 95rk Z, S 100ergy-MLPNN Z, S 95.2

MLPNN Z, S 99.6

py (ApEn) (Z,N, F), S 96.65

MLPNN (Z,N, F), S 97.75

rk (Z,O,N, F), S 97.73MLPNN (Z,O,N, F), S 97.77

Page 9: Automatic epileptic seizure detection in EEGs based on line length feature and artificial neural networks

cience

4

tEswseBututs

tiuhlohtw

A

tS

R

A

A

B

B

CD

E

E

F

G

G

L. Guo et al. / Journal of Neuros

. Conclusion and future work

In this paper, the capability of line length feature combina-ion with artificial neural network to detect epileptic seizure inEGs is explored. The EEG signals were first decomposed intoeveral sub-signals of different frequency bands through discreteavelet transform, and then line length feature, which is sen-

itive to the amplitude–frequency variation of the signal, wasxtracted from each sub-signal. Finally, a three-layer MLPNN withayesian regularization back-propagation training algorithm wassed for classification. High classification accuracies obtained forhree different classification problems, derived from a commonsed database, verified the success of the proposed method. Addi-ionally, the low computation burden of the line length makes ituitable for developing a real time seizure detection system.

The database considered in current work has been preprocessedhrough removing the artifacts by visual inspection. This is a lim-tation of assessing our method and thus extensive assessmentnder real clinical situations is required. The proposed methodas shown great success on epileptic EEG classification prob-

ems. The same method can be applied to a more wide rangef pattern recognition problems which are also important toumans, such as the Alzheimer’s and Parkinson’s diseases detec-ion and diagnosis. These are all interesting directions for the futureork.

cknowledgements

Ling Guo was financially supported through a fellowship ofhe Agencia Espanola de Cooperación International (AECI) and thepanish Ministry of Foreign Affairs.

eferences

deli H, Zhou Z, Dadmehr N. Analysis of EEG records in an epileptic patientusing wavelet transform. Journal of Neuroscience Methods 2003;123(1):69–87.

ndrzejak R, Lehnertz K, Mormann F, Rieke C, David P, Elger C. Indications of non-linear deterministic and finite-dimensional structures in time series of brainelectrical activity: Dependence on recording region and brain state. PhysicalReview E 2001;64(6):061907-1–8.

asheer I, Hajmeer M. Artificial neural networks: Fundamentals, computing, design,and application. Journal of Microbiological Methods 2000;43(1):3–31.

lankertz B, Curio G, Müller K. Classifying single trial EEG: Towards brain computerinterfacing. In: Advances in Neural Information Processing Systems: Proceedingsof the Conference. Cambridge, Massachusetts: MIT Press; 2002. p. 157–64.

hui C. An Introduction to Wavelets. Boston: Academic Press; 1992.ingle A, Jones R, Carroll G, Fright W. A multistage system to detect epilep-

tiform activity in the EEG. IEEE Transactions on Biomedical Engineering1993;40(12):1260–8.

steller R, Echauz J, Tcheng T. Comparison of line length feature before and afterbrain electrical stimulation in epileptic patients. In: Engineering in Medicine andBiology Society. IEMBS’04. 26th Annual International Conference of the IEEE, vol.2; 2004. p. 4710–13.

steller R, Echauz J, Tcheng T, Litt B, Pless B. Line length: An efficient feature forseizure onset detection. In: 23rd Annual International Conference of the IEEEEngineering in Medicine and Biology Society; 2001. p. 4.

ukunaga K. Introduction to Statistical Pattern Recognition. 2nd ed. Boston: Aca-demic Press; 1990.

arrett D, Peterson D, Anderson C, Thaut M. Comparison of linear and nonlinearmethods for EEG signal classification. IEEE Transactions on Neural Systems andRehabilitative Engineering 2003;11(2):141–4.

üler I, Übeyli E. Adaptive neuro-fuzzy inference system for classification ofEEG signals using wavelet coefficients. Journal of Neuroscience Methods2005;148(2):113–21.

Methods 191 (2010) 101–109 109

Güler N, Übeyli E, Güler I. Recurrent neural networks employing Lyapunovexponents for EEG signals classification. Expert Systems with Applications2005;29(3):506–14.

Guo L, Rivero D, Seoane J, Pazos A. Classification of EEG signals using relative waveletenergy and artificial neural networks. In: Proceedings of the first ACM/SIGEVOSummit on Genetic and Evolutionary Computation; 2009. p. 177–84.

Jahankhani P, Kodogiannis V, Revett K. EEG signal classification using wavelet featureextraction and neural networks. In: IEEE John Vincent Atanasoff 2006 Interna-tional Symposium on Modern Computing (JVA’06); 2006. p. 52–7.

Kalayci T, Ozdamar O. Wavelet preprocessing for automated neural networkdetection of EEG spikes. IEEE Engineering in Medicine and Biology Magazine1995;14(2):160–6.

Kandel E, Schwartz J, Jessell T. Principles of Neural Science. New York: McGraw-Hill,Health Professions Division; 2000.

Kannathal N, Acharya U, Lim C, Sadasivan P. Characterization of EEG—A comparativestudy. Computer methods and Programs in Biomedicine 2005a;80(1):17–23.

Kannathal N, Choo M, Acharya U, Sadasivan P. Entropies for detection of epilepsy inEEG. Computer Methods and Programs in Biomedicine 2005b;80(3):187–94.

Lerner D. Monitoring changing dynamics with correlation integrals: Case study ofan epileptic seizure. Physica D: Nonlinear Phenomena 1996;97(4):563–76.

MacKay D. A practical Bayesian framework for backpropagation networks. NeuralComputation 1992;4(3):448–72.

Mallat S. A theory for multiresolution signal decomposition: The wavelet rep-resentation. IEEE Transactions on Pattern Analysis and Machine Intelligence1989;11(7):674–93.

Mathworks. MATLAB V.6.5.0 Help files; 2002.Mohseni H, Maghsoudi A, Kadbi M, Hashemi J, Ashourvan A. Automatic detection of

epileptic seizure using time–frequency distributions. In: IET 3rd InternationalConference on Advances in Medical, Signal and Information Processing, MEDSIP;2006. p. 1–4.

Murro A, King D, Smith J, Gallagher B, Flanigin H, Meador K. Computerized seizuredetection of complex partial seizures. Electroencephalography and Clinical Neu-rophysiology 1991;79(4):330–3.

Nigam V, Graupe D. A neural-network-based detection of epilepsy. NeurologicalResearch 2004;26(1):55–60.

Ocak H. Automatic detection of epileptic seizures in EEG using discrete wavelettransform and approximate entropy. Expert Systems with Applications2009;36(2):2027–36.

Päivinen N, Lammi S, Pitkäanen A, Nissinen J, Penttonen M, Grönfors T. Epilepticseizure detection: A nonlinear viewpoint. Computer methods and programs inbiomedicine 2005;79(2):151–9.

Polat K, Günes S. Classification of epileptiform EEG using a hybrid system basedon decision tree classifier and fast Fourier transform. Applied Mathematics andComputation 2007;187(2):1017–26.

Sadati N, Mohseni H, Maghsoudi A. Epileptic seizure detection using neural fuzzynetworks. In: IEEE International Conference on Fuzzy Systems; 2006. p. 596–600.

Srinivasan V, Eswaran C, Sriraam N. Artificial neural network based epileptic detec-tion using time-domain and frequency-domain features. Journal of MedicalSystems 2005;29(6):647–60.

Subasi A. Automatic recognition of alertness level from EEG by using neu-ral network and wavelet coefficients. Expert Systems with Applications2005a;28(4):701–11.

Subasi A. Epileptic seizure detection using dynamic wavelet network. Expert Sys-tems with Applications 2005b;29(2):343–55.

Subasi A. Automatic detection of epileptic seizure using dynamic fuzzy neural net-works. Expert Systems with Applications 2006;31(2):320–8.

Subasi A. EEG signal classification using wavelet feature extraction and a mixture ofexpert model. Expert Systems with Applications 2007;32(4):1084–93.

Sun M, Sclabassi R. The forward EEG solutions can be computed using artificial neuralnetworks. IEEE Transactions on Biomedical Engineering 2000;47(8):1044–50.

Tzallas A, Karvelis P, Katsis C, Fotiadis D, Giannopoulos S, Konitsiotis S. A methodfor classification of transient events in EEG recordings: application to epilepsydiagnosis. Nervenheilkunde 2007a;26(11):965–8.

Tzallas A, Tsipouras M, Fotiadis D. Automatic seizure detection based ontime–frequency analysis and artificial neural networks. Computational Intel-ligence and Neuroscience 2007b:13, article ID 80510.

Übeyli E. Analysis of EEG signals using Lyapunov exponents. Neural Network World2006a;16(3):257–73.

Übeyli E. Fuzzy similarity index employing Lyapunov exponents for discrimination

of EEG signals. Neural Network World 2006b;16(5):421–31.

Übeyli E. Analysis of EEG signals by combining eigenvector methods andmulticlass support vector machines. Computers in Biology and Medicine2008;38(1):14–22.

Übeyli E, Güler I. Features extracted by eigenvector methods for detecting variabilityof EEG signals. Pattern Recognition Letters 2007;28(5):592–603.