Analysis and localization of epileptic events using wavelet packets

9
Medical Engineering & Physics 23 (2001) 623–631 www.elsevier.com/locate/medengphy Analysis and localization of epileptic events using wavelet packets Josefina Gutie ´rrez a, b , Rogelio Alca ´ntara b , Vero ´nica Medina c,* a Instituto National de Neurologı ´a y Neurocirugı ´a, Insurgentes Sur 3877, Col. La Fama, Me ´xico D.F., 14269, Mexico b Divisio ´n de Estudios de Posgrado, Facultad de Ingenierı ´a, Universidad Nacional Auto ´noma de Me ´xico, Apartado Postal 70-256, Me ´xico, D.F., 04510, Mexico c Departamento de Ingenierı ´a Ele ´ctrica, Universidad Auto ´noma Metropolitana-Iztapalapa, Av. Purı ´sima y Michoaca ´n S/N, Col. Vicentina, Me ´xico, D.F. 09340, Mexico Received 15 March 2001; received in revised form 31 July 2001; accepted 1 October 2001 Abstract This article compares results obtained in previous studies using time–frequency representations (Wigner–Ville, Choi–Williams and Parametric) and the wavelet transform with those obtained with wavelet packet functions to show new findings about their quality in the analysis of ECoG recordings in human intractable epilepsy: data from 21 patients have been analyzed and processed with four types of wavelet functions, including Orthogonal, Biorthogonal and Non-Orthogonal basis. These functions were compared in order to test their quality to represent spikes in the ECoG. The energy based on the wavelet coefficients to different scales was also calculated. The best results were found with the biorthogonal-6.8 wavelet on 5–7 scales, which gave 0.92 sensitivity, but with a high percentage of false positives; this representation was highly correlated with spike events on time and duration. To improve these results we have studied the wavelet packet coefficients energy. We found that reconstruction wavelet packet coefficients at 4 and 9 nodes contain significant information to characterize the spike event. These nodes’ reconstruction coefficients were multiplied and this product was highly correlated with spikes events on time and duration. With this procedure we improved the sensitivity up to 0.96 with the same biorthogonal-6.8 wavelet at four levels. With this technique we do not sacrifice computation time: 896 samples are processed at only 0.16 s, so that it is possible to show the spike scattering path on line, because 896 samples (7 s)/16 channels are processed at 3.13 s. 2002 IPEM. Elsevier Science Ltd. All rights reserved. Keywords: Epilepsy; Epileptic foci; Biomedical signal processing; Time-scale; Multiresolution decomposition; Wavelet transform; Time–frequency; Wavelet packets 1. Introduction The ECoG records the electrical activity of the brain cortex and provides important intraoperative information about the epileptic foci and the area of abnormal neural tissues responsible for the initiation of epileptic seizure. Epileptiform transients, such as spikes, slow waves, polyspikes and sharp waves are typical waveforms found in patients with epilepsy. The spike is the most important characteristic on epilepsy electrical recordings, and it is defined as a transient clearly distinguished from EEG background activity with pointed peaks, whose duration goes from 70 to 120 ms [3]. Detecting and classifying spikes by visual inspection on the ECoG records, is a * Corresponding author. E-mail address: [email protected] (V. Medina). 1350-4533/02/$22.00 2002 IPEM. Elsevier Science Ltd. All rights reserved. PII:S1350-4533(01)00096-0 complex and time consuming operation, that is very dif- ficult to carry out in an operating room Fig. 1 shows a sharp spike, recorded at the brain cortex during an intra- operative neurosurgical procedure. Most of the techniques currently applied to biological signals assume that the systems being analyzed are time- invariant, or at least time-invariant within the analysis window. However, many of them, and this is the case of epileptiform transients, show a highly non-stationary Fig. 1. ECoG segment showing a high-frequency spike at 1800 ms.

Transcript of Analysis and localization of epileptic events using wavelet packets

Medical Engineering & Physics 23 (2001) 623–631www.elsevier.com/locate/medengphy

Analysis and localization of epileptic events using wavelet packets

Josefina Gutie´rrez a, b, Rogelio Alcantarab, Veronica Medinac,*

a Instituto National de Neurologıa y Neurocirugıa, Insurgentes Sur 3877, Col. La Fama, Mexico D.F., 14269, Mexicob Division de Estudios de Posgrado, Facultad de Ingenierıa, Universidad Nacional Autonoma de Mexico, Apartado Postal 70-256, Mexico,

D.F., 04510, Mexicoc Departamento de Ingenierıa Electrica, Universidad Autonoma Metropolitana-Iztapalapa, Av. Purısima y Michoacan S/N, Col. Vicentina,

Mexico, D.F. 09340, Mexico

Received 15 March 2001; received in revised form 31 July 2001; accepted 1 October 2001

Abstract

This article compares results obtained in previous studies using time–frequency representations (Wigner–Ville, Choi–Williamsand Parametric) and the wavelet transform with those obtained with wavelet packet functions to show new findings about theirquality in the analysis of ECoG recordings in human intractable epilepsy: data from 21 patients have been analyzed and processedwith four types of wavelet functions, including Orthogonal, Biorthogonal and Non-Orthogonal basis. These functions were comparedin order to test their quality to represent spikes in the ECoG. The energy based on the wavelet coefficients to different scales wasalso calculated. The best results were found with the biorthogonal-6.8 wavelet on 5–7 scales, which gave 0.92 sensitivity, but witha high percentage of false positives; this representation was highly correlated with spike events on time and duration. To improvethese results we have studied the wavelet packet coefficients energy. We found that reconstruction wavelet packet coefficients at4 and 9 nodes contain significant information to characterize the spike event. These nodes’ reconstruction coefficients were multipliedand this product was highly correlated with spikes events on time and duration. With this procedure we improved the sensitivityup to 0.96 with the same biorthogonal-6.8 wavelet at four levels. With this technique we do not sacrifice computation time: 896samples are processed at only 0.16 s, so that it is possible to show the spike scattering path on line, because 896 samples (7 s)/16channels are processed at 3.13 s. 2002 IPEM. Elsevier Science Ltd. All rights reserved.

Keywords: Epilepsy; Epileptic foci; Biomedical signal processing; Time-scale; Multiresolution decomposition; Wavelet transform; Time–frequency;Wavelet packets

1. Introduction

The ECoG records the electrical activity of the braincortex and provides important intraoperative informationabout the epileptic foci and the area of abnormal neuraltissues responsible for the initiation of epileptic seizure.Epileptiform transients, such as spikes, slow waves,polyspikes and sharp waves are typical waveforms foundin patients with epilepsy. The spike is the most importantcharacteristic on epilepsy electrical recordings, and it isdefined as a transient clearly distinguished from EEGbackground activity with pointed peaks, whose durationgoes from 70 to 120 ms [3]. Detecting and classifyingspikes by visual inspection on the ECoG records, is a

* Corresponding author.E-mail address: [email protected] (V. Medina).

1350-4533/02/$22.00 2002 IPEM. Elsevier Science Ltd. All rights reserved.PII: S1350-4533 (01)00096-0

complex and time consuming operation, that is very dif-ficult to carry out in an operating room Fig. 1 shows asharp spike, recorded at the brain cortex during an intra-operative neurosurgical procedure.

Most of the techniques currently applied to biologicalsignals assume that the systems being analyzed are time-invariant, or at least time-invariant within the analysiswindow. However, many of them, and this is the caseof epileptiform transients, show a highly non-stationary

Fig. 1. ECoG segment showing a high-frequency spike at 1800 ms.

624 J. Gutierrez et al. / Medical Engineering & Physics 23 (2001) 623–631

behavior, which makes their study by conventionalmethods almost impossible. Moreover, their componentsshow a time–frequency structure that is not easilyrevealed by analysis on either domain alone. Severaltechniques have been developed for the detection andcharacterization of epileptiform activity in the EEG,some of which present important drawbacks, as the ShortTime Fourier Transform which uses short duration andoverlapped EEG signal segments [1]. This approach isnot adequate to identify sharp transient signals, becauseit is limited to fixed resolution windows. Another fre-quently used time–frequency method is the Wigner–Ville Distribution (WD) that does not permit a practicalanalysis due to the inherent cross-terms.

Other analysis techniques applied to EEG processinghave been reported, such as parametric methods [4].There are several researches [5,6] where power spectraldensity (PSD) is estimated using autoregressive models.However, its excessive computation time is an obstacleto on-line processing. We have applied the fast Kalmanalgorithm and the Levison–Durvin algorithm [1] toobtain a time–frequency representation with 16th-orderautoregressive model. In both cases the PSD was esti-mated as follows:

PSDECoG�s2

�1+�p

k�1

ake−jwk�2(1)

In spite of this method having a very high resolutionfor spike detection, it is not practical in intraoperativeprocedures, because of its high processing time (4.12min/7 s of raw signal). Other studies have been doneusing autospectra, coherence, phase spectra and periodo-gram averaging as tools in quantitative analysis of EEGrat recordings. It has been shown that these techniquesovercome the signal’s non-stationarity but at a high com-putational cost [7].

Williams and Zaveri [8,9] have worked with time–frequency distributions and have corroborated that theReduced Interference Distribution (RID) based on theChoi–Williams (CWD) kernel has a high efficacy in rep-resenting non-stationary electrocorticograms in humantemporal lobe epilepsy. They have shown that the RIDimproves the resolution over the spectrogram andreduces the cross-terms, but also has the inconvenienceof a high computation time. We have used the CWDkernel over ECoG 500 ms window analysis and we veri-fied that s=0.1 gives a good resolution as Zaveri et al.stated. However, this technique needs high computationtime (1.28 min/7 s of raw signal) which is an obstaclefor on-line processing.

On the other hand, Gotman et al. [10] applied syntac-tic methods, where the detection is based on the presenceof a structural combination of features for seizure recog-

nition. These and other techniques are used as the basisfor neural networks to classify characteristics of the epi-leptic waveform such as amplitude and slope [11].

Multiresolution analysis is a powerful concept that hasproven to be very efficient to reduce the drawbacks ofother techniques, whenever a signal is dominated bytransient behavior or discontinuities like epileptic events.This analysis is based on a function called wavelet whichis a short oscillating waveform that persists for only oneor a few cycles. Certain wavelets have a finite durationand nonzero values over a small time period; this pro-perty gives temporal compact support which allows tohave a good location in time. The multiresolution analy-sis uses a pair of functions: the scaling function j(t), torepresent the signal’s high frequencies, and the waveletfunction y(t), corresponding to smooth components. Onthe other hand, the efficiency of wavelet analysis isbased on the fast pyramid algorithm which permits tocarry out the process as efficiently as a fast Fourier trans-form, taking on the order of N log2 N operations [12].This technique has led to new developments in imageand signal processing. Concerning electroencephalogra-phy applications have been reported using the wavelettransform to reduce the amount of information to processlong-term EEG recordings [13] and to allow a grossdetection of epileptic events [14]. Other studies used thewavelet coefficients as the input of an artificial neuralnetwork for the classification of psychiatric disorders[15]. The representation of a discrete signal using wave-let functions can be improved by applying a waveletpacket decomposition, which can be seen as a waveformthat presents more oscillations than a regular wavelet butare still finite in duration [16]. A wavelet packet haslocation (position), scale (duration) and oscillatory(frequency) characteristics, and for this reason it is calleda time–frequency waveform; it has also the advantagethat this function uses the fast pyramid algorithm,involving filtering operations and down-sampling by twoof the output [16].

Summarizing, the aim of this paper is to apply thewavelet packet property, time–frequency waveforms, toclassify and characterize spikes on ECoG segments. Inaddition, we want to make use of the fast pyramid algor-ithm to get on-line processing and to be able to showthe spike’s scattering path. And finally we carry out acomparative evaluation of the efficiency to classify andcharacterize spikes on ECoG recordings with the waveletpacket coefficients.

The paper is organized into three parts: materials andmethods, results and discussion. In the first part, wepresent the data collection procedure, the multiresolutionframework implementation, a brief introduction aboutwavelet transform and wavelet packet. Finally, the detec-tion algorithm and diagnosis is tackled with the energycontribution.

625J. Gutierrez et al. / Medical Engineering & Physics 23 (2001) 623–631

2. Materials and methods

2.1. Data collection

Data used in this study were obtained from 21 con-senting patients aged 24–64 yr (mean 38 yr) whounderwent a neurosurgical procedure to resect the epi-leptic foci, at the Instituto Nacional de Neurologia yNeurocirugia, Mexico. ECoG segments were acquiredby placing a grid of 5×4 adjacent electrodes with a 1cminterelectrode spacing, over the right anterior and pos-terior temporal lobe of the cortex [Fig. 2(a)]. We useda differential bioamplifier EEG recording system with anamplitude gain between 4000 and 200,000, a bandpassfilter between 0.5 and 70 Hz, sampled at 128 Hz/channeland digitized at 12-bit resolution. Sixty-six raw ECoGsegments with epileptiform transients (spike, spike-wave, polyspikes) were visually inspected off-line andspikes were identified by experts. One hundred and fortyepileptic spikes were found over 3200 min of 16 channelECoG’s per patient. We show a 7 s segment of a 16-channel ECoG in Fig. 2(b).

All raw ECoGs were visually inspected off-line andspikes were identified and selected. Extensive collabor-ation with the electroencephalographer (EEGer) wasrequired to extract relevant knowledge and the criterionof the EEGer was considered to have 100% selectivityand 100% sensitivity (‘gold standard’ ) in ECoG rec-ording classification.

2.2. Multiresolution framework

The multiresolution framework software isimplemented on a Pentium III 430 MHz personal com-puter in MATLAB. As mentioned above, in previousreports we compared the classification performance ofseveral time–frequency representations [1,2]. The spec-

Fig. 2. (a) Placement of the 20 electrode grid, (b) multichannel subdural ECoG signals.

trogram representation shows a significant energy in thet–f regions corresponding to the spike’s components, butthe representation has very low resolution, as reportedin several papers concerning its capability to detectspikes. The Wigner–Ville distribution, on the other hand,shows a better location of the time–frequency compo-nents, corresponding to the epileptic spike; however,they are hidden by the cross-terms inherent to this cor-relative representation. Furthermore, the Choi–Williamsdistribution shows a very good time–frequency represen-tation but is also very time consuming.

To improve the above results, we applied multiresol-ution analysis based on the wavelet transform. We useddifferent functions to extract spike waveforms from themultichannel subdural ECoG signals previously classi-fied as epileptic events: (a) a B-spline biorthogonalwavelet, (b) orthogonal and compactly supported—Dau-bechies functions, (c) a non-orthogonal—Mexican Hatwavelet and (d) wavelet packets using biorthogonaleighth-order decomposition and sixth-order reconstruc-tion.

2.3. Wavelet transform

A wavelet is an oscillating waveform that persists forone or a few cycles. The wavelet analysis is based on apair of these basic functions, one to represent the highfrequencies corresponding to the detailed parts of a sig-nal y(t) and one for the signal’s low frequencies orsmooth parts f(t). The two shapes can be translated andscaled to produce wavelets at different locations(positions) and on different scales (duration), to get amultiresolution decomposition.

Singularities and edges which are hard to discern ina Fourier transform, stand out in the wavelet analysis.The Wavelet transform is defined by the basic formula:

626 J. Gutierrez et al. / Medical Engineering & Physics 23 (2001) 623–631

(Wyf)(a,b)��1a�f(t)ya,b�t−b

a �dt (2)

where f(t), in our case, is the input raw ECoG signal.Given a function y(t) and for given values of a and b,the ya,b constitutes an orthonormal, non-orthormal orbiorthogonal basis for L2(R). Mallat and Daubechiesshowed that any wavelet gives rise to a decompositionof the Hilbert space L2(R) into a direct sum of closedsubspaces Wj [17]. A set of subspaces V containing thecomplementary information is similarly obtained pro-jecting the signal into a set of scaling functions f(t). Cal-culating wavelet coefficients at every possible scale is afair amount of work. An efficient way to implement afast wavelet analysis is choosing scales and positionsbased on powers of two (dyadic) where a=2j. This algor-ithm, called fast pyramid algorithm, combines a series oflinear filters—low and high bands—with down-samplingoperations, halving the data each time and geometricallyreducing the computations at each iteration [12]. AfterJ iterations, the number of samples being manipulatedshrinks by 2J. The signal processing is split into: theapproximations cj which are the high-scale, low-fre-quency components of the signal and the details dj whichare the low-scale or high-frequency components of thesignal.

Discrete multiresolution representation of the digitalsignal f[n] is obtained by scaling and translating of a pairof functions y(j,k) and f(j,k):

f[n]��Nl�1

c(l)f(n)��J

j�1

�Nk�1

dj,k(j,k)2j/2yj,k(2jn�k) (3)

where c(l) are the approximation and dj,k are the detailcoefficients at each level decomposition j [12]. Table 1shows the main characteristics for different waveletfunctions.

Table 1Comparative main characteristics of some wavelets

Biorthogonal 6.8 Biorthogonal 3.1 Mexican Hat Daubechies-10

Decomposition

Reconstruction

Symmetry Symmetry and exact Symmetry and No Far fromreconstruction are possible reconstruction are possible

Orthoganality Biorthogonal Biorthogonal No YesCompact Support [17] for decomposition [3] for decomposition [�5,5] for decomposition [19] for decomposition

[13] for reconstruction [7] for reconstruction

2.4. Energy contribution

If the yj,k form an orthonormal base, the energy of thecoefficients series dj,k at level j and around time k is:

Ej=�|dj,k|2 and in the biorthogonal case, the energy of

the signal f[n] is given by Ej=�|dj,k|2 where dj,k are

called the dual wavelet coefficients.

2.5. Wavelet packet case

As mentioned above, the orthogonal decompositionanalysis is based on a pair of compact support functionswhich can be represented by two sequences {pk}, whichcontain all the information about the scaling functionf[k], and the sequence qk=(�1)kp−k+1 which characterizesits corresponding wavelet function y[k]. Starting withthese sequences we introduce a family of functions{mn}, n=2l or 2l+1, where l=0,1,%,N, called a ‘waveletpacket’ which is a generalization of the orthogonalwavelet y[k], and is used to improve the performanceof wavelets for time–frequency localization [18]

m2l[k]��k

pkf[2k�n] (4)

m2l+1[k]��k

qkf[2k�n] (5)

Wavelet packets are specially used when a better fre-quency localization is searched, because of their capa-bility of partitioning not only the low frequency of thesignal but also the higher-frequency octaves.

The wavelet packet transform’s structure is basedupon a binary tree, each node representing the appli-cation of a decimating, quadrature mirror filter (QMF)

627J. Gutierrez et al. / Medical Engineering & Physics 23 (2001) 623–631

pair to an input signal f[n]. Different decompositions canbe created by selectively pruning the binary tree. Thepruning also generates unique partitioning of the originalsignal bandwidth into a disjoint set of frequency sub-bands. It can be seen that the wavelet packet analysisacts like a filter on the signal, with each wavelet levelcorresponding to a different frequency band in the orig-inal signal.

It was shown [12] that wavelet packet functions areable to depict the locally oscillatory signals (as transientspikes in ECoG) better than the Fourier and Wavelettransforms do because the former is not able to localizea segment of the signal duration and the wavelets arenot highly oscillatory functions and its frequency resol-ution is lower than the Fourier transform.

Wavelet packet is a time–frequency decompositionand reconstruction method which can be computed usingthe fast pyramidal algorithm [16]. For an ECoG signalof N samples, the wavelet packet requires N log(N) CPUcycles (approximately 1 s with Pentium III), so that com-puting time–frequency transform, via wavelet packet,takes about the same amount of work as the fast Fouriertransform, but with an improved time resolution.

2.6. Detection algorithm and diagnosis

In this paper we compare results applying wavelettransform and wavelet packet. Summarizing the previoussignal analysis; (1) an ECoG segment is selected and thesharpest spike located, (2) the wavelet type is definedand packet transformation is carried out in order to pointout energy coefficients, (3) the characterization indi-cators based on level, time, scale and node to indicatesignificant energy and amplitude are estimated. A goodindicator, in terms of diagnosis, has to satisfy the follow-ing property: to be zero or statistically zero for non-epi-leptic events with a sensible deviation from zero in thepresence of a sharp spike.

After extensive analysis, the energy contribution ofdecomposition and reconstruction coefficients of eachresolution scale j was determined and an index for thecharacterization of epileptiform transients was defined,based on the energy of those coefficients. At each scalethe energy’s absolute value and time of interest segmentwere measured and the coefficients dj,k with the highestamplitude Mj were classified as ‘epileptic coefficients’ .

A waveform was classified as an epileptic spike if itsatisfied the following three conditions, measured fromthe wavelet decomposition coefficients:

1. Time duration between 70 and 120 ms2. Energy Ej larger than a threshold3. Amplitude Mj larger than a threshold

Wavelet packet decomposition is also applied, the binarytree being decomposed up to the fifth level and 62 nodes.

A biorthogonal 6.8 function is used because of its sym-metry property. The decomposition coefficients are reco-vered and the reconstruction procedure, for each node,is applied. The energy En, at each node, is calculated fordecomposition and reconstruction coefficients.

In a previous paper we showed [2] that when we mul-tiplied the Morlet wavelet coefficients the detectionalgorithm is more sensitive to signal variation concern-ing duration, increments or decrements in the signal, andwaveform classification. For this reason we applied herethe same operator and the proposed indexes depend onthe time-scale plane. The proposed indexes for the wave-let transform and the wavelet packet algorithms areexpressed by:

First Case: Wavelet Transformation

Wavelet Index: Iw�dlevel 1,k∗dlevel 2,k (6)

Second Case: Wavelet Packet

Packet Index: Iwp�dlevel 1,node 1∗dlevel 2,node 2 (7)

3. Results

Results are presented in a multiresolution decompo-sition as we can see in Fig. 3. The energy contributionof each resolution scale for the wavelet transform caseand for each node (level) for the wavelet packet casewas analyzed.

3.1. First case: wavelet transformation

The energy Ej is measured over 12 points aroundamplitude Mj. Table 2 shows the mean and standarddeviation for the resulting energy of the 140 tested spikesand the maximum amplitude Mj for the Daubechies 10,Mexican Hat and Biorthogonal 3.1–6.8 wavelets in adecomposition up to 10 levels. We highlight with graythe levels that gave the higher amplitudes and energiesto characterize the epileptic spike events for each wave-let. The Mexican Hat wavelet shows high-(2–4 levels)as well as low-(8–9 levels) frequency components. Thiscould be suitable to characterize the spike–wave com-plex. Daubechies 10 and Biorthogonal 3.1–6.8 allow tolimit most of the energy corresponding to the epilepti-form wave on the 5–7 levels.

Once the best levels to characterize the spikes weredetermined for every wavelet function, the signals wereanalyzed and the performance of each function was mea-sured with a sensitivity index. This index corresponds tothe number of epileptic events detected by the algorithmdivided by the total marked by the specialist. In ananalysis of the wavelet sensitivity for spike classi-

628 J. Gutierrez et al. / Medical Engineering & Physics 23 (2001) 623–631

Fig. 3. Multiresolution decomposition. (a) ECoG signal with three spike components at 1120, 1800 and 5860 ms, (b) decomposition usingbiorthogonal wavelet and (c) decomposition using wavelet packet.

fication, the orthonormal Daubechies gave the poorestresults compared to the non-orthonormal Mexican Hatand to the spline wavelets (Table 3). The sensitivity ismeasured considering all the detected epileptic events,while a more detailed analysis was carried out for thespecific detection of spikes.

The best result to characterize epileptiform events wasfound with the 6th-order biorthogonal wavelet for recon-struction, and 8th-order for decomposition with a timewindow of 93.75 ms. A 0.92 sensitivity was measuredas the ratio between true positives and the 140 spikes.However a high number of false positives was found,mainly due to other epileptic waveforms, giving only64% of positive predictive value. This value was com-puted as the quotient between true positives and the totalof detections. The scalogram and detection graph for thesignal of Fig. 1 are shown in Fig. 4 and Fig. 5, respect-ively.

In order to compare with the previous results obtainedwith the Morlet wavelet [2], we applied this function tothe same ECoG signal of Fig. 1. The scalogram shownin Fig. 6, clearly indicates the sharp spike but the smallerspikes are poorly represented. The decomposition withthis wavelet function is almost the same as the oneobtained with the biorthogonal wavelet function, but ittakes a higher computation time. Both redundant(Morlet) and non-redundant (biorthogonal) wavelets

allow us to show a very clear sharp transient at 1800ms; however the spikes at 1120 and 5860 ms are noteasily distinguished.

3.2. Second case: wavelet packets

To improve the above results we applied biorthogonalfunctions to wavelet packet analysis. We obtained adecomposition and reconstruction representation and wefound the best tree using a minimum entropy criterion[19]. We applied the detection algorithm indicated aboveto each node and we found (see Fig. 7) that the best pathstarts at the level 1 approximation, then follows throughthe detail coefficients at level 2 node 4, and then to theapproximation obtained at level 3 node 9. These resultsare in agreement with the spike characteristics of timeand frequency band. If we consider that a typical spikelasts 70–120 ms, node 4 represents high-frequencycomponents at 16 Hz and node 9 represents the approxi-mations (low-frequency components) at 8 Hz. In Table4 we show the most significant nodes that contribute tocharacterize the sharp spike, considering amplitude,energy and time duration.

The next step is the signal reconstruction starting fromthe coefficients for each node as those shown in Fig. 8.

Following the procedure described in Sections 2.6 and3.1, the sensitivity was calculated, taking into account

629J. Gutierrez et al. / Medical Engineering & Physics 23 (2001) 623–631

Table 2Energy (Ej) and maximum amplitude (Mj) up to 10 levels of decompo-sition using, (A) Daubechies 10, (B) Mexican Hat, (C) biorthogonal3.1 and (D) biorthogonal 6.8 wavelets

Level (j) Ej s2j Mj

(A) Mexican Hat1 2.06×103 1.38×103 4.63×103

2 5.18×103 3.00×103 9.76×103

3 5.36×103 2.86×103 1.01×103

4 4.94×103 2.42×103 9.11×103

5 4.56×103 2.2×103 8.15×103

6 4.29×103 2.29×103 8.84×103

7 4.27×103 2.43×103 9.96×103

8 4.72×103 2.99×103 1.11×104

9 4.88×103 3.44×103 1.17×104

10 5.66×103 3.47×103 1.27×104

(B) Daubechies 101 3.64×102 2.09×102 7.59×102

2 2.12×102 1.29×102 5.20×102

3 1.02×103 7.7×102 2.92×103

4 2.78×103 1.79×103 6.11×103

5 4.02×103 2.78×103 9.28×103

6 5.05×103 3.00×103 1.04×103

7 5.55×103 3.07×103 1.14×103

8 5.23×103 3.15×103 1.18×103

9 5.36×103 2.56×103 1.04×104

10 5.43×103 2.66×103 9.97×103

(C) Biorthogonal 3.11 2.65×103 1.5×103 4.91×103

2 5.84×102 4×102 1.86×103

3 1.69×103 7.46×102 2.72×103

4 4.18×103 2.58×103 9.96×103

5 4.62×103 3.65×103 1.29×103

6 1.14×103 7.91×103 2.58×103

7 1.03×103 7.58×103 2.21×103

8 1.37×104 9.38×103 2.75×104

9 1.29×104 7.73×103 2.38×104

10 1.73×104 9.63×103 3.11×104

(D) Biorthogonal 6.81 19.48 18.09 39.652 15.75 15.13 57.853 81.19 71.46 2.23×102

4 2.90×102 2.88×102 4.62×102

5 6.70×103 5.64×103 7.48×103

6 1.0×103 8.41×103 9.63×103

7 1.07×103 7.75×103 1.24×103

8 1.05×103 7.29×102 1.23×103

9 9.39×102 7.06×102 1.28×103

10 9.87×102 6.56×102 1.28×103

the different nodes detected in the best tree for the sig-nal’s reconstruction. We observed that the contributionof each of the detected nodes allows for an increase insensitivity up to 94%. Furthermore, a selective combi-nation of coefficients from node 4 and 9 enhances thedetection, obtaining a final sensitivity of 96%. The finaldetection index based on the wavelet packet reconstruc-tion (Iwp) is defined as: Iwp=d2,4∗d3,9. Using this index,it allows to observe the three spike components of theECoG signal, as shown in Fig. 9, spikes that were other-

Table 3Comparison of the tested wavelet’s sensitivity for the levels that gavethe best classification

Wavelet Levels Sensitivity

Daubechies 10 6–8 0.64Mexican Hat 2–3 0.83Biorthogonal 3.1 5–7 0.7Biorthogonal 6.8 5–7 0.88Morlet 3–4 0.87

Fig. 4. Scalogram of the ECoG signal of Fig. 1 using biorthogonal6.8 wavelet. We can see the epileptiform transient clearly representedon the 6–8 levels at 1800 ms.

Fig. 5. Spike detection at 1800 ms, once the three necessary con-ditions (taken from the decomposition) are met.

Fig. 6. Scalogram of the ECoG signal of Fig. 1 using Morlet wavelet.We can see the epileptiform transient clearly represented on the 6–8levels at 1800 ms.

wise impossible to distinguish with a simple waveletanalysis (see Fig. 5) or with the reconstruction obtainedfrom each independent coefficient. These results are alsoin agreement with those found by an expert in the field.

This technique requires a processing time of 0.16 sfor 256 samples, representing a 2 s epoch, which enablesto carry out analysis on-line. One of the most important

630 J. Gutierrez et al. / Medical Engineering & Physics 23 (2001) 623–631

Table 4Relationship between node and band frequency for the most significant nodes

Node Level (j) Frequency (Hz) Width (ms) Ej Mj

1(A) 1 32 31.3 2.06×103 4.63×103

4(AD) 2 16 62.5 5.18×103 9.76×103

9(ADA) 3 8 125 5.36×103 1.01×104

10(ADD) 3 8 125 4.94×103 9.11×103

21(ADDA) 4 4 250 4.56×103 8.15×103

Fig. 7. Tree structure of decomposition and reconstruction waveletpacket coefficients. Light arrows show coefficients with good infor-mation, while the dark arrows show the coefficients that contain mostof the information to detect epileptic spike.

Fig. 8. Reconstruction coefficients of 1, 4 and 9 nodes for signal ofFig. 1.

Fig. 9. Detection graph using the biorthogonal 6.8 wavelet packetand Iwp.

goals of detecting epileptiform events during intraoper-ative procedures, is the visualization of epileptic focilocation and the propagation of epileptiform discharges.A 16-electrode grid is used for this purpose, placed overthe brain’s cortex. The time needed to process 7 s of 16-channel information with the proposed algorithm is 3.13s. This processing speed allows us to propose a Rec-tangular Wavelet Packet Coefficient Map, obtained usingspline interpolation [20] to observe the spike’s scatteringpath. In Fig. 10 an epileptic focus location is shown,starting at the 18th electrode and slightly propagatingtoward the region of the 12th electrode. This informationhelps the neurosurgeon to have a decision criterion toresect the most convenient area.

4. Discussion

The purpose of this study was to test the utility ofwavelet analysis applied to characterize epileptiformactivity in ECoG recordings. Wavelet analysis providesan important improvement to characterize epilepticspikes compared with other methods like Fourier trans-form analysis. This multiscale characterization is suit-able for on-line implementation, which would beimpossible using other techniques like parametric mode-ling or Choi–Williams representations.

We developed an algorithm that extracts severalcharacteristics from the ECoG allowing the classificationof waveforms as epileptic spikes. We located the levelscontaining the most significant energy of the spike anddefined three parameters extracted from the decompo-

Fig. 10. The left plot shows the sharp spike at 17–18 electrodesappearing at 6 s. The ECoG Rectangular Mapping of the signal isindicated on the right side.

631J. Gutierrez et al. / Medical Engineering & Physics 23 (2001) 623–631

sition to carry out the classification with a very goodsensitivity. We also compared the performance of sev-eral wavelets, which facilitates the wavelet selection forthis specific application. Most of the false positives aredue to epileptiform activity such as polyspikes andspike–wave complexes, whose frequency content over-lap that of the spike’s. False detections related to non-epileptiform activity is mainly due to the appearance ofnoise in the theta and alpha range, but its incidence wasvery low, representing almost a tenth of the total numberof false detections.

The developed algorithm based on wavelets, showedits high potentiality for the characterization of epilepticspikes, but it was necessary to improve its performanceby increasing the percentage of true positives. The useof wavelet packets provided more specific informationabout the transient waveform. The guideline for choos-ing the proper decomposition tree level depends on thecharacteristic of the signal. The wavelet packet transformis an adaptive tree-structure filter bank, where each tree-node is in fact filtering out different frequency bands[12]. It was found that for the ECoG signal with epilepticspikes, the wavelet packet analysis was more sensitiveat the second and third levels. This method enhances theECoG non-stationary features to serve as a sharp spikecharacteristic extractor.

It must be kept in mind that these results need a moreexhaustive study of the algorithm performance concern-ing a truth or false detection of other epileptic events.

References

[1] Alcantara R, Gutierrez J, Alvarez L, Igartua L. Metodos para-metricos y tiempo-frecuencia en la representation del electroence-falograma. In: Memorias 1er Congreso Latinoamericano de Inge-nieria Biomedica, 1998;159–161.

[2] Gutierrez J, Alcantara R. Spikes characterization on EEG signalby wavelet coefficients. In: Fifth Conference of the EuropeanSociety for Engineering and Medicine Abstracts, 1999:159–160.

[3] Chatrian E. A glossary of terms most commonly used by clinical

electroencephalographs. Electroencephalography and ClinicalNeurophysiology 1974;37:538–48.

[4] Dingle A. A multistage system to detect epileptiform activity inthe EEG. IEEE Transactions on Biomedical Engineering1993;40:1260–7.

[5] Kay S. Modern specrtral estimation: theory and application.Englewood Cliffs (NJ): Prentice-Hall, 1988.

[6] Hilfiker P, Egli M. Detection and evolution of rhythmic compo-nents in ictal EEG using short segment spectra and discriminantanalysis. Electroencephalography and Clinical Neurophysiology1992;82:255–65.

[7] Gath I, Feuerstein C. On the tracking of rapid dynamic changesin seizure EEG. IEEE Transactions on Biomedical Engineering1992;39:45–56.

[8] Zaveri H, Williams WJ. Time frequency representation of electro-corticograms in temporal lobe epilepsy. IEEE Transactions onBiomedical Engineering 1992;39:502–8.

[9] Williams WJ, Zaveri HP, Sackellares C. Time–frequency analysisof electrophysiology signals in epilepsy. IEEE Engineering inMedicine and Biology 1995;55:133–43.

[10] Gotman J. Automatic recognition of epileptic seizures in theEEG. Electroencephalography and Clinical Neurophysiology1982;54:530–40.

[11] Gabor AJ, Seyal M. Automated interictal EEG spike detectionusing artificial neural networks. Electroencephalography andClinical Neurophysiology 1992;83:271–80.

[12] Cody MA. The fast wavelet transform. Dr Dobb’s Journal1992;April:16–28.

[13] Sime RO, Isaacson SI, D’Attellis CE. A data-reduction processfor long-term EEGs. IEEE Engineering in Medicine and Biology1999;18:56–61.

[14] D’Attellis C, Isaacson S, Sime R. Detection of epileptic eventsin electroencephalograms using wavelet analysis. Annals ofBiomedical Engineering 1997;25:286–93.

[15] Hazarika N, Chen JZ, Tsoi AC, Sergejew A. Classification ofEEG signals using the wavelet transform. Signal Processing1997;59:61–72.

[16] Bruce A, Donoho D, Gao HY. Wavelet analysis. IEEE Spectrum1996;October:26–35.

[17] Daubechies I. Ten lectures on wavelets. Philadelphia (PA):Society for Industrial and Applied Mathematics, 1992.

[18] Chui CK, editor. An introduction to wavelets. London: AcademicPress, 1992.

[19] Misiti M, Misiti Y, Oppenheim G, Poggi JM. Wavelet toolboxfor use with MatLab user’s guide. Natick (MA): The Math WorksInc, 1997.

[20] MATLAB. High-performance numeric computation and visualiz-ation software, reference guide. Natick (MA): The Math WorkInc, 1992.