A Wavelet Approach for ECG_R

8
Biomedical Signal Processing and Control 7 (2012) 342–349 Contents lists available at ScienceDirect Biomedical Signal Processing and Control j o ur nal homep a ge: www.elsevier.com/locate/bspc A wavelet optimization approach for ECG signal classification Abdelhamid Daamouche a , Latifa Hamami b , Naif Alajlan c , Farid Melgani a,a Department of Information and Communication Technologies, University of Trento, Trento, Italy b School of Engineering, El Harrach, Algiers, Algeria c ALISR Laboratory, College of Computer and Information Sciences, King Saud University, Riyadh 11543, Saudi Arabia a r t i c l e i n f o Article history: Received 5 May 2011 Received in revised form 14 June 2011 Accepted 4 July 2011 Available online 30 July 2011 Keywords: Classification Discrete wavelet transform (DWT) Electrocardiogram (ECG) signals Particle swarm optimization (PSO) Support vector machines (SVM) a b s t r a c t Wavelets have proved particularly effective for extracting discriminative features in ECG signal classification. In this paper, we show that wavelet performances in terms of classification accu- racy can be pushed further by customizing them for the considered classification task. A novel approach for generating the wavelet that best represents the ECG beats in terms of discrimina- tion capability is proposed. It makes use of the polyphase representation of the wavelet filter bank and formulates the design problem within a particle swarm optimization (PSO) framework. Experi- mental results conducted on the benchmark MIT/BIH arrhythmia database with the state-of-the-art support vector machine (SVM) classifier confirm the superiority in terms of classification accu- racy and stability of the proposed method over standard wavelets (i.e., Daubechies and Symlet wavelets). © 2011 Elsevier Ltd. All rights reserved. 1. Introduction The electrocardiogram (ECG) signal represents the changes in electrical potential during the cardiac cycle as recorded between surface electrodes on the body [1]. The analysis of ECG sig- nals can provide clinicians with valuable information about the patient health condition. In this context, significant research efforts have been devoted for developing automatic and fast arrhyth- mia diagnosis tools based on the processing and analysis of ECG signals. In the last two decades, wavelets have attracted a grow- ing interest in many signal processing and analysis applications. The main interesting feature of wavelets is their time-frequency representation of the signal. They allow gaining a deep insight of the signal at different scales and frequencies, and have proved particularly successful both in ECG signal compression and classification [1–13]. In the context of ECG signal classification which represents the focus of this paper, several interesting works can be found in the lit- erature. In particular, in [4], Ince et al. proposed a feature extraction technique that employs the translation-invariant dyadic wavelet transform in order to effectively extract the morphological infor- mation from ECG data. In [5], Sahambi et al. presented an approach Corresponding author. E-mail address: [email protected] (F. Melgani). that uses a dyadic wavelet to characterize the ECG signal. To circum- vent its high computational cost, they used digital signal processing add-on cards. In [6], a method for detecting premature ventric- ular contraction (PVC) from the Holter system is proposed using wavelet transform and fuzzy neural network. In [7], Dickhaus et al. addressed two questions: how are the recorded time courses of the signals to be interpreted with regard to a diagnostic decision? What are the essential features and how is the information hid- den in the signals? Then they presented an example to identify patients who are at high-risk of developing ventricular tachycardia (VT). In [8], an approach to detect PVCs using a neural network with weighted fuzzy membership functions is described. To discriminate between normal and PVC beats, Lim et al. exploited wavelet coeffi- cients. In [9], a dyadic wavelet transform is used for extracting ECG characteristic points. The local maxima of the wavelet modulus at different scales are used to locate the sharp variation points of ECG. The proposed algorithm first detects the QRS complex, then the T wave, and finally the P wave. In [10], Khamene and Negahdaripour proposed a solution that relies on the positions of singular points (high peaks) of the ECG signal. Their method attempts to discrim- inate between the singular points of the maternal and fetal ECGs, both present in the composite abdominal signal. All the work is carried out in the wavelet transformed space of the ECG signal. In [11], Inan et al. presented an approach for classifying beats of a large dataset by training a neural network classifier using wavelet and timing features. They found that the fourth scale of a dyadic wavelet transform with a quadratic spline wavelet together with 1746-8094/$ see front matter © 2011 Elsevier Ltd. All rights reserved. doi:10.1016/j.bspc.2011.07.001

description

About ECG

Transcript of A Wavelet Approach for ECG_R

  • Biomedical Signal Processing and Control 7 (2012) 342 349

    Contents lists available at ScienceDirect

    Biomedical Signal Processing and Control

    j o ur nal homep a ge: www.elsev ier .co

    A wave al c

    Abdelham arida Department ob School of Engc ALISR Laborat 3, Saud

    a r t i c l

    Article history:Received 5 MaReceived in reAccepted 4 JulAvailable onlin

    Keywords:ClassicationDiscrete waveElectrocardiogParticle swarmSupport vecto

    effecw thtomit tha

    use withinchmsier

    met

    1. Introduction

    The electrocardiogram (ECG) signal represents the changes inelectrical potential during the cardiac cycle as recorded betweensurface elenals can prpatient heahave been mia diagnosignals.

    In the ling interestThe main inrepresentatof the sigproved partclassicatio

    In the cofocus of thiserature. In ptechnique ttransform imation from

    CorresponE-mail add

    that uses a dyadic wavelet to characterize the ECG signal. To circum-vent its high computational cost, they used digital signal processingadd-on cards. In [6], a method for detecting premature ventric-ular contraction (PVC) from the Holter system is proposed using

    1746-8094/$ doi:10.1016/j.ctrodes on the body [1]. The analysis of ECG sig-ovide clinicians with valuable information about thelth condition. In this context, signicant research effortsdevoted for developing automatic and fast arrhyth-sis tools based on the processing and analysis of ECG

    ast two decades, wavelets have attracted a grow- in many signal processing and analysis applications.teresting feature of wavelets is their time-frequencyion of the signal. They allow gaining a deep insightnal at different scales and frequencies, and haveicularly successful both in ECG signal compression andn [113].ntext of ECG signal classication which represents the

    paper, several interesting works can be found in the lit-articular, in [4], Ince et al. proposed a feature extractionhat employs the translation-invariant dyadic waveletn order to effectively extract the morphological infor-

    ECG data. In [5], Sahambi et al. presented an approach

    ding author.ress: [email protected] (F. Melgani).

    wavelet transform and fuzzy neural network. In [7], Dickhaus et al.addressed two questions: how are the recorded time courses ofthe signals to be interpreted with regard to a diagnostic decision?What are the essential features and how is the information hid-den in the signals? Then they presented an example to identifypatients who are at high-risk of developing ventricular tachycardia(VT). In [8], an approach to detect PVCs using a neural network withweighted fuzzy membership functions is described. To discriminatebetween normal and PVC beats, Lim et al. exploited wavelet coef-cients. In [9], a dyadic wavelet transform is used for extracting ECGcharacteristic points. The local maxima of the wavelet modulus atdifferent scales are used to locate the sharp variation points of ECG.The proposed algorithm rst detects the QRS complex, then the Twave, and nally the P wave. In [10], Khamene and Negahdaripourproposed a solution that relies on the positions of singular points(high peaks) of the ECG signal. Their method attempts to discrim-inate between the singular points of the maternal and fetal ECGs,both present in the composite abdominal signal. All the work iscarried out in the wavelet transformed space of the ECG signal. In[11], Inan et al. presented an approach for classifying beats of alarge dataset by training a neural network classier using waveletand timing features. They found that the fourth scale of a dyadicwavelet transform with a quadratic spline wavelet together with

    see front matter 2011 Elsevier Ltd. All rights reserved.bspc.2011.07.001let optimization approach for ECG sign

    id Daamouchea, Latifa Hamamib, Naif Alajlanc, Ff Information and Communication Technologies, University of Trento, Trento, Italyineering, El Harrach, Algiers, Algeriaory, College of Computer and Information Sciences, King Saud University, Riyadh 1154

    e i n f o

    y 2011vised form 14 June 2011y 2011e 30 July 2011

    let transform (DWT)ram (ECG) signals

    optimization (PSO)r machines (SVM)

    a b s t r a c t

    Wavelets have proved particularly classication. In this paper, we shoracy can be pushed further by cusapproach for generating the waveletion capability is proposed. It makesand formulates the design problem mental results conducted on the besupport vector machine (SVM) clasracy and stability of the proposedwavelets).m/locate /bspc

    lassication

    Melgania,

    i Arabia

    tive for extracting discriminative features in ECG signalat wavelet performances in terms of classication accu-zing them for the considered classication task. A novelt best represents the ECG beats in terms of discrimina-of the polyphase representation of the wavelet lter bankn a particle swarm optimization (PSO) framework. Experi-ark MIT/BIH arrhythmia database with the state-of-the-art

    conrm the superiority in terms of classication accu-hod over standard wavelets (i.e., Daubechies and Symlet

    2011 Elsevier Ltd. All rights reserved.

  • A. Daamouche et al. / Biomedical Signal Processing and Control 7 (2012) 342 349 343

    the pre/post RR-interval ratio is very effective in distinguishingnormal and PVC from other beats. In [12], features extracted fromsuccessive wavelet coefcient levels after wavelet decompositionof signals of heart rate variability (HRV) from RR intervals and ECG-derived respiration (EDR) from R waves of QRS amplitudes wereused as inputs to a support vector machine (SVM) classier to recog-nize obstruan importause? The anand the chodifferent w

    All the have been However, wmances in are optimizpropose a sication pvery complsier accuron particleble to provapplicationrepresentatresentationof angular problem foing these pThe kind ostate-of-thecapability.

    The remgives a genmain princithe proposevided in Sec

    2. Wavelet

    The wava signal intWavelet funtions that a +

    (t) +

    (t)In such a spsquare norm +

    (t)d

    +

    (t)The waveletion is giv

    Wf (a, ) =

    The asterisk

    Eq. (5) means that the signal to be analyzed f(t) is convolvedwith stretched/dilated copies of the mother wavelet (t). Fora < 1, the wavelet is contracted and the transform gives informa-tion about the ner details of f(t). For a > 1, the wavelet expandsand the traparameter

    d a tinuo

    conting s are

    of ass.ompientsoweoblem

    con banlyphby Vormf arbed. y:

    2Ni=0

    us

    N1i=0

    , H0dyanase m

    (H00H10

    =Ni=

    =Ni=

    and Hlter, he c

    sin(rlocktoriz

    z) = ctive sleep apnea syndrome. In [13], Senhaji et al. raisednt question: what is the most appropriate wavelet toswer was: there is no theoretical answer at the momentice must be done empirically by comparing results ofavelets.aforementioned works made use of wavelets whichderived for general signal processing and analysis.e believe that in order to improve wavelet perfor-ECG classication, one should design wavelets thated for this specic problem. This paper is intended towavelet design method which is driven by the clas-rocess performance in terms of accuracy. Due to theex relationship characterizing the wavelet and the clas-acy, we resort to a stochastic design method based

    swarm optimization (PSO) which has proved capa-ide effective answers to problems raised by variouss [1416]. The proposed method exploits the polyphaseion of the discrete wavelet transform (DWT). Such rep-

    allows generating a wavelet lter bank from a setparameters, and thus formulating the wavelet designr ECG signal classication as a problem of estimat-arameters so that to maximize the classier accuracy.f classication approach adopted in this work is the-art SVM classier known for its high generalization

    aining of this paper is organized as follows. Section 2eral review of wavelets. Sections 3 and 4 present theples of PSO and SVM, respectively. Section 5 describesd wavelet design method. Experimental results are pro-tion 6. Finally, conclusions are drawn in Section 7.

    s

    elet transform is a linear operation that decomposeso components that appear at different scales [1,5,17].ctions (t) are dened in a space of measurable func-re absolute and square integrable, i.e.,

    dt < (1)2dt < (2)ace, they should satisfy conditions of zero mean and

    one [17]:

    t = 0 (3)

    2 dt = 1 (4)t transform of a function f(t) L2(R) at scale a and posi-en by [5]:

    1a

    +

    f (t) (

    t a

    )dt (5)

    * denotes the complex conjugation.

    is callein contors. Inevaluacienta bankhigh-p

    A ccoefc[18]. His a prIn thisa lteris a poposed orthonlter odescribgiven b

    H0(z) =

    and th

    H0(z) =

    In (7)z. Vaipolyph

    Hp(z) =

    where

    H00(z)

    and

    H01(z)

    H00(z) pass lter. Tand si =

    Shethe fac

    H(k+1)p (nsform gives a coarse view of the signal. If the scalea = 2j with j Z, Z is an integer set, then the waveletdyadic wavelet [17]. The wavelet transform operatesus time on functions and in discrete time on vec-tinuous time, the wavelet coefcients are found bythe integral in (5). Whereas, in discrete time, the coef-

    found by passing a vector (x(n), n integer) throughtwo lters, one is a low-pass and the other is a

    lete and interesting characterization of the DWT lter with compact support was presented by Daubechies inver, in general, since looking for an optimum wavelet-dependent issue, DWT design can take many forms.

    text, an elegant way to determine the coefcients ofk has been developed by Sherlock and Monro [19]. Itase method [20] which relies on a factorization pro-aidyanathan [21]. Their algorithm allows deriving anyal perfect-reconstruction nite impulse response (FIR)itrary length. In the following, the method is brieyThe low-pass lter coefcients in the z-domain are

    1

    hizi (6)

    h2iz2i + z1

    N1i=0

    h2i+1z2i (7)

    is decomposed into even and odd powers ofathan proposed the following factorization of theatrix [21]:

    (z) H01(z)(z) H11(z)

    )=(

    c0 s0s0 c0

    ) N1i=1

    (1 00 z1

    )(ci si

    si ci

    )(8)

    1

    0

    h2iz2i (9)

    1

    0

    h2i+1z2i (10)

    01(z) represent the polyphase components of the low-whereas H10(z) and H11(z) are those of the high-passoefcients ci and si are computed as follows: ci = cos(i)i).

    and Monro developed a new formulation by rewritingation in a recursive form [19]:

    H(k)p (z)

    (1 00 z1

    ) (ck sk

    sk ck

    )(11)

  • 344 A. Daamouche et al. / Biomedical Signal Processing and Control 7 (2012) 342 349

    with k = 1, 2,. . .,N and H(a)p =(

    c0 s0s0 c0

    ). The superscript (k) refers

    to lters of length 2k. This form leads to the following recursiveformulae for the even-numbered lter coefcients:

    h(k+1)0 = h(k+1)2i = h(k+1)2k =

    with h(1)0 = The form

    h(k+1)1 = h(k+1)2i+1 = h(k+1)2k+1 =

    Eqs. (12) h1,. . .,h2N11,. . .,N1}lter coefc

    gi = (1)i+1

    From N freter coefcieTherefore, tmization pr

    3. Particle

    Particle swhich was PSO has prnition probalgorithms,based optimimplementaIt is inspiring and ssharing infoso that eacing to its pfound amonparticle cospace and optimized.

    For a prothe algorithtial populatpi (i = 1, 2,. position pi(mization pr(b) a velociis found duobjective/global positparticles of responds toswarm up toaccording t

    vi(t + 1) = w

    pi(t + 1) = pi(t) + vi(t) (16)where r1(t) and r2(t) are random variables that are drawn from

    rm ing flatebal off b. Eqshat t

    assuitionmateay tyes.ical cbest den

    port

    a claf-theowning t

    SVMorityin ther co

    intro.us probs xi d feated fr

    {1ear tion lanecase,earlythod. The)], with t

    w timae biases ainimcrima in i S

    = [ a k

    corden

    kernm sockh(k)0

    ckh(k)2i skh

    (k)2i1

    skh(k)2k1

    for i = 1, 2, . . . , k 1 (12)

    c0 and h(1)1 = s0.

    ulae for the odd coefcients are given by:

    skh(k)1

    skh(k)2i + ckh

    (k)2i1

    ckh(k)2k1

    for i = 1, 2, . . . , k 1 (13)

    and (13) express the low-pass coefcients {h0,} in terms of N free chosen angular parameters {0,

    whose values are in the interval [0, 2). The high-passients are found by alternating ip construction, that is

    h2N1i (14)

    e parameters, one can generate the 2N low-pass l-nts and the corresponding high-pass lter coefcients.he design of an optimal DWT can be viewed as an opti-oblem in the RN space of the angular parameters is.

    swarm optimization

    warm optimization (PSO) is a stochastic search methodrst proposed in 1995 by Kennedy and Eberhart [22].oved promising in solving different pattern recog-lems [4,1416]. Similar to evolutionary computation

    such as genetic algorithms [23], PSO is a population-ization method which exhibits the advantages oftion simplicity and few free parameters to adjust.ed from swarm intelligence observed in bird ock-h schooling. The optimization method is based onrmation among the swarm members called particles,h particle adjusts its velocity and direction accord-ast and current trajectories and to the best positiong all the particles of the swarm. The position of each

    rresponds to a particular candidate of the solutionthus to a specic value of the tness function to be

    blem with d real variables q1, q2,. . . and qd to estimate,m starts from a random swarm of particles called ini-ion. Assume that the swarm is of size S. Each particle. .,S) from the swarm is characterized by: (a) a currentt) Rd, which refers to a candidate solution of the opti-oblem at iteration t, i.e., pi(t) = [q1i(t), q2i(t),. . .,qdi(t)];ty vi(t) Rd, and (c) a best position pbi(t) Rd whichring its past trajectory (best with respect to the

    tness function to optimize). Let pg(t) Rd be the bestion found over all trajectories that were traveled by thethe swarm. In other words, the best global position cor-

    the best value of the tness function ever found by the instant t. During the search process, the particles move

    o the following equations [22]:

    vi(t) + c1 r1(t)(pbi(t) pi(t)) + c2 r2(t)(pg(t) pi(t))(15)

    a unifoweightc2 reguand gloa tradeswarmNote tunit iscle posto estione-wparticl

    Typof the a user-

    4. Sup

    As state-ohas shincludon thesuperiposed classibrieyto [26]

    Let cation vectorX. The extractget yi The linseparahyperplinear not linnel me(d > d)sign[f(xated was:

    f (x) = The opand thexpreserror mis a disthe dat

    f (x) =

    whereK(,) is2,. . .,S}which

    Thetheoredistribution in the range [0,1] to provide a stochasticor components involved in (15). The constants c1 and

    the relative velocities with respect to the best localpositions, respectively. The inertia weight w is used asetween global and local exploration capabilities of the. (15) and (16) are iterated until convergence is reached.he particle velocity just expresses a move since timemed to be equal to one and, therefore, like the parti-, it also encodes the d real variables q1, q2,. . . and qd. In PSO, the information sharing mechanism is of thepe since only pg(t) gives out the information to other

    onvergence criteria are based on the iterative behaviorvalue of the adopted tness function or/and simply oned maximum number of iterations.

    vector machines

    ssication approach, we will adopt in this work the-art support vector machine (SVM) approach which

    particularly effective in numerous application eldshe classication of ECG signals [16,24,25]. The focus

    classier is motivated by its commonly admitted over traditional classiers. Note that the method pro-is paper is general and, therefore, any other kind ofuld be considered as well. In the following, we willduce this tool. For further details, we refer the reader

    rst consider for simplicity a supervised binary classi-lem. Let us assume that the training set consists of S

    Rd (i = 1, 2,. . .,S) from the d-dimensional feature spaceures are for instance morphological and timing featuresom the ECG signal. To each vector xi, we associate a tar-, +1} (e.g., normal and abnormal beats, respectively).SVM classication approach consists of looking for abetween the two classes in X by means of an optimal

    that maximizes the separating margin [26]. In the non- which is the most common case since data are often

    separable, the two classes are rst mapped with a ker- in a higher dimensional feature space, i.e., (X) Rd

    membership decision rule is based on the functionhere f(x) represents the discriminant function associ-he hyperplane in the transformed space and is dened

    (x) + b (17)l hyperplane dened by the weight vector w Rds b R is the one that minimizes a cost function that

    combination of two criteria: margin maximization andization [26]. The solution of such optimization probleminant function conveniently expressed as a function ofthe original (lower) dimensional feature space X:

    i yiK(xi, x) + b (18)

    1, 2,. . .,N] is the vector of Lagrange multipliers andernel function. The set S is a subset of the indices {1,responding to the non-zero Lagrange multipliers is,e the so-called support vectors.el K(,) must satisfy the condition stated in Mercers

    as to correspond to some type of inner product in the

  • A. Daamouche et al. / Biomedical Signal Processing and Control 7 (2012) 342 349 345

    Fig. 1. I s to be estimated) and its relationship with the wavelet lter design.

    transformeexample of function:

    K(xi, x) = e

    where repof the Gaus

    As descrBut the clasous discrimorder to facgies can be one-againstof T possibensemble oa global decgle SVMs. TSVMs, eachi and j.

    5. The pro

    Althougcessing purmany workthe existingwavelet. Hobe improveracy. Therefthe polyphproblem winates of the{0, 1,. . .,

    Concernaccuracy ofvalidation (empirical ePSO duringin the wavethe SVM paselected accsen betweetraining besize, and thpredened out of the

    New pop - ulation {i}

    Fitness function evaluation

    SVM class ifier training

    Discrete wavelet trans form

    Filter bank gen- erati on {hi, gi}

    Convergencetest

    End

    Initial popu- lation {i}

    raining bea ts

    No

    Yes

    Morph ologi-cal features

    Temporal features

    2N low-pass coefficients + 2N high-pa ss coefficients

    N parameters llustration of the PSO search space for second-order lters (two angular parameter

    d (higher) dimensional feature space (X) [25]. A typicalsuch kernels is represented by the well-known Gaussian

    xp(

    xi x2

    )(19)

    resents a parameter inversely proportional to the widthsian kernel.ibed above, SVMs are intrinsically binary classiers.sication of ECG signals often involves the simultane-ination of several information classes (arrhythmias). Ine this issue, a number of multiclass classication strate-adopted [27]. In this paper, we considered the popular-one (OAO) strategy. Let = {1, 2,. . .,T} be the setle classes. The idea behind this strategy is to train anf binary SVMs, each for any two classes, and to constructision by exploiting the partial ones yielded by the sin-hus, for T classes, the OAO strategy involves T(T 1)/2

    representing a discriminant function fij between classes

    posed method

    h wavelets have been developed for general signal pro-poses, as mentioned in Section 1, the literature reportss exploiting this tool for analyzing ECG signals. Most of

    techniques are based on the well-known Daubechieswever, we believe that the wavelet performance couldd if the design is driven by the ECG classication accu-ore, we propose a wavelet design method which adoptsase representation and formulates the optimizationthin a PSO framework. As shown in Fig. 1, the coordi-

    T particles of the swarm encode the angular parametersN1}.ing the tness function, we use the classication

    the state-of-the-art SVM classier achieved by cross-CV) on the training set [28]. This tness function is anstimate of the generalization accuracy that drives the

    the search process toward the best wavelet candidatelet space. In greater detail, during the training phase,rameters (regularization and kernel parameters) areording to an m-fold CV procedure (typically, m is cho-n 2 and 10), rst by randomly splitting the S availableats into m mutually exclusive subsets (folds) of equalen by training m times an SVM classier modeled withparameter values. Each time, one of the subsets is lefttraining and is only used (as a set of validation sam-

    ples) to obthe remaintimes of trayields a preSVM classito maximizestimate. Tcal proceduIt is generademandingFig. 2. Block diagram of the PSO search process.

    tain an estimate of the classication accuracy, whileing m 1 folds are used to train the classier. From mining and accuracy computation, the average accuracydiction of the classication accuracy of the considereder. We select the best SVM classier parameter valuese this prediction and get the nal classier accuracyhe leave-one-out (LOO) procedure is another empiri-re which could be adopted for getting such estimate.lly more accurate but also much more computationally

    since it is equivalent to an S-fold CV.

  • 346 A. Daamouche et al. / Biomedical Signal Processing and Control 7 (2012) 342 349

    As illustrated in Fig. 2, the main steps of the proposed waveletdesign method are described in the following:Phase 1: Initialization

    Set lter order N = order min. Set decom

    Phase 2: Start Initialize tha positionin the rang

    For each pthrough th inject thorder to g by alterncoefcient with thetraining b train an (and, if deaccuracy (pi(0) = CVA

    Store the pthe positiobest globa

    pbi(0) = pPhase 3: Searc

    Update the Update the For each p(cross-valpi(t) = CVA

    Update theposition, p

    Phase 4: ConvIf the numbenumber oposition), |pg(t) pgotherwise

    Phase 5: Filter For each ranges [orrespectivePhases 24

    Select the yields the

    6. Experim

    6.1. Datase

    Our expethe MIT-BIHbeats refer tin the followhich startventricular cles rather (RB, causemay shift thblock (LB, wtrical axis tofrom the rewhich corre107, 118, 11and 217. In adopted thefeatures anduration, thtive R pointthe presentthe ten lastperformed tasks by me

    on http://www.physionet.org/physiotools/ecgpuwave/src/. Thenafter extracting the three temporal features of interest, we nor-malized to the same periodic length the duration of the segmentedECG cycles according to the procedure reported in [31]. To this pur-

    he m, whionses eq

    trais seltabas (les: (1)ce an

    the d nuass isicwhictagendep

    cla theA), wed fohe sthieveon th

    fij ffij +

    Zij metwe

    num clasiedAt thracieant reove

    procm thythmtalit, we /(TPtly dep = TNs beP/(TPe tottatioositiv

    PSOo 10 ght wPSOtes tted wed inrnel

    metee ten wim prt decposition level L = decLev mining populatione PSO with a random population by generating for each particle

    vector ({0, 1,. . .,N1}) of random values uniformly distributede [0, 2). Set the velocity vector of each particle to zero.

    article, compute the corresponding tness function valuee following steps:e vector of i s into the recursive algorithm (12) and (13) inenerate the 2N low-pass lter coefcients;ating ip construction, derive the 2N high-pass lters (14);

    resulting low-pass and high-pass lters, apply DWT to each ECGeat;SVM classier by feeding it with the generated wavelet featuressired, other feature types). Compute its cross-validationCVAi(t)) to set the tness function value of the particle,i(0) for i = 0,1,. . .,N 1.osition of each particle and label it as best local position. Saven of the particle with the largest tness function value as thel position.i(0) and pg(0) = max(pbi(0))h process

    velocity vector of each particle using (15). particle coordinates according to (16).article, compute again the tness function valueidation accuracy) in the corresponding new wavelet domain,i(t).

    best local position pbi(t) for each particle and the best globalg(t) = max(pbi(t)).ergence checkr of generations is different from the user-dened maximumf generations, or if the best tness function value (best globalstill varies signicantly in the last iterations, i.e.,(t 1) > | (where is a user-dened threshold), go to Phase 3,

    end the search. order and decomposition levellter order and for each decomposition level in the predenedder min, order max] and [decLev min, decLev max],ly, with a predened moving pace (e.g., = 1), go through.couple of values (of lter order and decomposition level) which

    highest tness function value at convergence.

    ental results

    t description and experimental setup

    riments were conducted on the basis of ECG data from arrhythmia database [29]. In particular, the consideredo the following classes: normal sinus rhythm (denotedwing as N), atrial premature beat (A, irregular beats in the atria, i.e., the upper two chambers of the heart),premature beat (V, beat initiated by the heart ventri-than by the sinoatrial node), right bundle branch blocks prolongation of the last part of the QRS complex ande heart electrical axis to the right), left bundle branchidens the entire QRS and typically shifts the heart elec-

    the left), and paced beat (/). The beats were selectedcordings of 20 patients representatives of these classes,spond to the following les: 100, 102, 104, 105, 106,9, 200, 201, 202, 203, 205, 208, 209, 212, 213, 214, 215,order to feed the classication process, in this study we

    two following kinds of features: (i) ECG morphologyd (ii) three ECG temporal features, i.e. the QRS complexe RR interval (the time span between two consecu-s representing the distance between the QRS peaks of

    and previous beats), and the RR interval averaged over beats [30]. In order to extract these features, rst wethe QRS detection and ECG wave boundary recognitionans of the well-known ecgpuwave software available

    pose, tlengthples. Cfeature

    Thesamplemia dasamplereasonvergenwheredetaileeach cl

    Classures, percenered (iof eachamongracy (Aobtaingives tcies acbased

    Zij = whereence bfor theand jthof classagree. of accusignic

    Modesign(V) froV arrhto morticular(Se = TPcorrec(Sp) (Sthat ha(Pp = Tover ththe nofalse p

    Thexed ttia weiof the illustraassociareportsian kedesignthe thrpositio

    Frowaveleean beat period was chosen as the normalized periodicch was represented by 300 uniformly distributed sam-quently, the total number of morphology and temporaluals 303 for each beat.ning set used in all experiments consists of only 125ected randomly from the benchmark MIT-BIH arrhyth-se. The choice of this relatively small number of trainingss than 1% of the total test set) is motivated by two

    it reduces sharply the processing time required for con-d (2) it permits to test the method in delicate situationsnumber of available training beats is very limited. Thembers of training beats and test beats are reported forn Table 1.ation performance was evaluated in terms of four mea-h are: (1) the overall accuracy (OA), which is the

    of correctly classied beats among all the beats consid-endently of the classes they belong to); (2) the accuracyss that is the percentage of correctly classied beats

    beats of the considered class; (3) the average accu-hich is the average over the classication accuracies

    r the different classes; and (4) the McNemars test whichatistical signicance of differences between the accura-d by the different classication approaches. This test ise standardized normal test statistic [32]:

    ji

    fji(20)

    easures the pairwise statistical signicance of the differ-en the accuracies of the ith and jth classiers. fij standsber of beats classied correctly and wrongly by the ithsiers, respectively. Accordingly, fij and fji are the counts

    beats on which the considered ith and jth classiers dis-e commonly used 5% level of signicance, the differences between the ith and jth classiers is said statisticallyif |Zij| > 1.96.r, we assessed the capability of the proposed waveletedure to discriminate the ventricular premature beatse others. The immediate detection and treatment of theia is considered very important since it can be linked

    y when associated with myocardial infarction. In par-used three common measures [33]: (1) sensitivity Se

    + FN)), it is the ratio between the number of V beatstected and the total number of V beats; (2) specicity/(TN + FP)), it stands for the fraction of non-V beatsen correctly rejected; and (3) positive predictivity Pp

    + FP)), it denes the ratio of V beats correctly detectedal number of detected V beats. In the above denitions,ns are as follows: true positive (TP), true negative (TN),e (FP), and false negative (FN).

    conguration is as follows: the size of the swarm isand the maximum number of iterations to 20. The iner-

    was set to 0.75, and c1 = c2 = 1. An example of behavior during the search process is shown in Fig. 3, whichhe gradual convergence of the tness function valueith the best global swarm position. In all experiments

    this paper, we adopted the SVM classier with Gaus-and a 5-fold CV. Finally, note that the proposed wavelethod was applied on the 300 morphology features whilemporal features were added after the wavelet decom-th the lter encoded by the considered particle.evious works [4,11], it emerges that the best ECG signalomposition is achieved up to the fourth decomposition

  • A. Daamouche et al. / Biomedical Signal Processing and Control 7 (2012) 342 349 347

    Table 1Numbers of training and test beats used in the experiments. The classes are: normal sinus rhythm (N), atrial premature beat (A), ventricular premature beat (V), right bundlebranch block (RB), left bundle branch block (LB), and paced beat (/).

    Class N A V RB / LB Total

    Training beats 37 24 25 13 13 13 125Test beats 24,000 238 3939 3739 6771 1751 40,438

    Table 2Overall accuracies achieved on the test beats by feeding the SVM classier with wavelet features generated by the proposed wavelet (PSO-based), the Daubechies and theSymlet wavelets, with varying decomposition levels and lter orders. The best result for each wavelet is in boldface.

    Filter order PSO-based Daubechies SymletDecomposition level Decomposition level Decomposition level

    1 2 3 4 1 2 3 4 1 2 3 4

    4 86.36 86.63 87.16 88.48 78.08 81.50 856 86.69 88.23 87.63 87.66 78.45 83.30 848 86.63 87.29 87.83 88.81 81.89 83.36 85

    10 86.88 87.72 88.84 88.44 82.27 82.50 85

    Table 3Overall (OA), average (AA), and class percentage accuracies achieved on the test beats with the three are: normal sinus rhythm (N), atrial premature beat (A), ventricular premature beat (V), right bundle b

    Accuracy [%]

    OA AA N A

    PSO-basedDaubechies Symlet

    The best classi

    level. Basinmance asselevels.

    6.2. Results

    Table 2 sing the SVMwavelet deDaubechiesto yield a tthree investion conditibeats, the sabe observedproposed m

    Fig. 3. Examp

    er anrst dformvelet

    thanicl puion =cationsitian s88.84 89.18 86.28 82.77 86.66 87.62 84.14 84.03 86.83 86.50 84.67 81.09

    cation results are shown in boldface.

    g on this, in the following, we performed the perfor-ssment by considering the rst four decomposition

    hows the accuracies obtained on the test beats by feed- classier with the features generated by the proposedsign method (PSO-based), and for comparison, by the

    wavelet (Db), and the Symlet wavelet (Sym). In orderhorough and unbiased comparison, we note that the

    ter ordthe wooutperlet waclearlyare siggeneradeviatclassiless selevel thtigated wavelets were evaluated in the same classica-ons, i.e., the same number of features, the same trainingme classier and the same test beats. In general, as can

    from Fig. 4a, these results show the superiority of theethod over the other two wavelets whatever the l-

    le of behavior of the PSO tness function during the search process.

    The bestTable 3. Thements wheterms of OADaubechiesaccuracy isof 82.77%, 8The best claof 96.19%, 9A close inspdoes not faalso at leasthe minoritthe proposewavelets (s

    Table 4Statistical signwavelets exprreported in Ta

    PSO-based Daubechies

    The boldface method and th.39 86.04 81.76 83.02 84.44 86.21

    .18 86.19 81.82 83.19 85.60 85.95

    .93 86.25 78.08 83.64 85.78 86.12

    .68 86.66 78.08 84.19 84.04 86.83

    wavelets. Only the best result is shown for each wavelet, the classesranch block (RB), left bundle branch block (LB), and paced beat (/).

    V RB / LB

    91.75 89.38 96.19 88.7589.72 90.13 92.33 85.3885.40 90.42 94.55 82.87

    d decomposition level adopted. Indeed, in terms of OA,ecomposition level of the proposed method (i.e., level 1)s the best decomposition level for Daubechies and Sym-s (i.e., level 4). As it can be expected, Fig. 4b suggestst classication-driven wavelets (PSO-based wavelets)antly more stable (standard deviation = 0.81) than therpose wavelets for Daubechies and Symlet (standard

    2.71 and 2.67), respectively, when dealing with ECGn problems. In other words, the PSO-based wavelet isve to the choice of the lter order and decompositiontandard wavelets are. accuracies achievable by each method are detailed in PSO-based method gives substantial accuracy improve-n compared to standard wavelets. Indeed, the gains in

    (and AA) are 2.18% (1.56%) and 2.01% (2.68%) over the and the Symlet wavelets, respectively. The worst class

    obtained on atrial premature beats (A) with accuracies4.03%, and 81.09% for PSO, Db, and Sym, respectively.ss accuracy is yielded on paced beats (/) with accuracies2.33%, and 94.55% for PSO, Db, and Sym, respectively.ection of Table 3 shows also that our proposed methodvor just the dominant class, i.e., normally beats (N), butt three other classes among ve including classes iny. The McNemars test conrms that the superiority ofd method is statistically signicant over the other twoee Table 4).

    icance of differences in classication accuracy between the threeessed by means of the McNemars test. The differences refer to resultsble 3.

    Daubechies Symlet

    19.18 17.631.54

    values represent the McNemars test value between the proposede standard wavelets.

  • 348 A. Daamouche et al. / Biomedical Signal Processing and Control 7 (2012) 342 349

    Fig. 4. Mean a y varyto 10).

    Table 5Sensitivity (Semature beats wavelets.

    DaubechiesSymlet PSO-based

    The best classi

    Table 5 standard w(V) from theand 2.03% i3.72% in powavelets, rewere possibclassicatiocontext (i.e

    7. Conclus

    In this pcedure baseof waveletsresents thethrough anfore, it optimtask under MIT/BIH arrthe-art SVMachieves bepared to twwe used thebe applied amain drawbconvergenc

    References

    [1] M. Unser,Proceedin

    [2] R.S.H. Istewavelets Technolo

    [3] R. Benzidbased oned two-

    nce, Sient-sineerSahamerizati. Shyurk for ineerDickhthod f96) 10Lim, ectionworksi, C. Zsformhame

    thering 4nan, L

    of prrval 725. Khanomates, IEEE48.nd standard deviation of the overall accuracy (OA) yielded by the three wavelets b

    ), specicity (Sp), and positive predictivity (Pp) for ventricular pre-(V) achieved with the Daubechies, the Symlet, and the PSO-based

    Se Sp Pp

    89.72 94.84 70.5485.40 95.69 71.6491.75 96.14 74.26

    cation results are shown in boldface.

    suggests that the PSO-based wavelet outperforms theavelets in distinguishing ventricular premature beats

    others. In particular, it yielded improvements of 6.35%n sensitivity, 0.45% and 1.30% in specicity, 2.62% andsitive predictivity, over the Symlet and Daubechiesspectively. It is worth noting that these improvementsle though the wavelet was optimized in a multiclassn context and not in a dedicated binary classication., V against all other classes).

    [4] T. IpatEng

    [5] J.S. act

    [6] L.YwoEng

    [7] H. me(19

    [8] J.S. detNet

    [9] C. Ltran

    [10] A. Kfromnee

    [11] T. Itioninte250

    [12] A.Hauting37ion

    aper, we proposed a novel wavelet optimization pro-d on the combination of the polyphase representation

    and the PSO. It seeks for the wavelet that best rep- beats in terms of discrimination capability measured

    empirical estimate of the classier accuracy. There-izes the ECG signal representation for the classication

    hand. The procedure was validated on the benchmarkhythmia database by adopting as classier the state-of-

    classier. The experimental results show clearly that ittter classication accuracies and a higher stability com-o standard wavelets (Daubechies and Symlet). Though

    SVM classier, the procedure is general and thus coulds well with any other kind of classication approach. Itsack is the substantial processing time required to reache, especially when large training sets are considered.

    A. Aldroubi, A review of wavelets in biomedical applications, in: IEEEgs, vol. 84, 1996, pp. 626638.panian, L.J. Hadjileontiadis, S.M. Panas, ECG data compression usingand higher order statistics methods, IEEE Transactions on Informationgy in Biomedicine 5 (2001) 108115., F. Marir, N. Bouguechal, Electrocardiogram compression method

    the adaptive wavelet coefcients quantization combined to a modi-role encoder, IEEE Signal Processing Letters (2007) 373376.

    [13] L. Senhajforms for14 (1995

    [14] Y. Bazi, F.eter estim188718

    [15] M. Donelapproacharrays co888898

    [16] F. Melganvector mmation T

    [17] S. Mallat,1999.

    [18] I. Daubecnication i

    [19] B.G. Sheractions o

    [20] G. StrangWellesley

    [21] P.P. Vaidwood Cli

    [22] J. KennedCA, 2001

    [23] D.E. GoldLearning,

    [24] N. GhoggclassicaGeoscien

    [25] E. Pasollirecogniti(2009) 22

    [26] V. Vapniking the decomposition level (from 1 to 4) and the lter order (from 4

    . Kiranyaz, M. Gabbouj, A generic and robust system for automatedpecic classication of ECG signals, IEEE Transactions on Biomedicaling 56 (2009) 14151426.bi, S.N. Tandon, R.K.P. Bhatt, Using wavelet transform for ECG char-on, IEEE Engineering in Medicine & Biology 16 (1997) 7783., Y.H. Wu, W. Hu, Using wavelet transform and fuzzy neural net-VPC detection form the Holter ECG, IEEE Transactions on Biomedicaling 51 (2004) 12691273.aus, H. Heinrich, Classifying biosignals with wavelet networks aor noninvasive diagnosis, IEEE Engineering in Medicine & Biology 153111.Finding features for real time premature ventricular contraction

    using a fuzzy neural network system, IEEE Transactions on Neural 20 (2009) 522527.heng, C. Tai, Detection of ECG characteristics points using wavelets, IEEE Transactions on Biomedical Engineering 42 (1995) 2128.ne, S. Negahdaripour, A new method for the extraction of fetal ECG

    composite abdominal signal, IEEE Transactions on Biomedical Engi-7 (2000) 507516.. Giovangrandi, J.T.A. Kovacs, Robust neural network based classica-emature ventricular contractions using wavelet transform and timingfeatures, IEEE Transactions on Biomedical Engineering 53 (2006)15.doker, M. Palaniswami, C.K. Karmakar, Support vector machines ford recognition of obstructive sleep apnea syndrome from ECG record-

    Transactions on Information Technology in Biomedicine 13 (2009)

    i, G. Carrault, J.J. Bellanger, G. Passariello, Comparing wavelet trans- recognizing cardiac patterns, IEEE Engineering in Medicine & Biology) 167173.

    Melgani, Semisupervised PSO-SVM regression for biophysical param-ation, IEEE Transactions on Geoscience and Remote Sensing 45 (2007)

    95.li, R. Azzaro, F.G.B. De Natale, A. Massa, An innovative computational

    based on a particle swarm strategy for adaptive phased-ntrol, IEEE Transactions on Antennas and Propagation 54 (2006).i, Y. Bazi, Classication of electrocardiogram signals with support

    achines and particle swarm optimization, IEEE Transactions on Infor-echnology in Biomedicine 12 (5) (2008) 667677.

    A Wavelet Tour of Signal Processing, Academic Press, Burlington, MA,hies, Orthonormal bases of compactly supported wavelets, Commu-n Pure Applied Mathematics 41 (1988) 909966.lock, D.M. Monro, On the space of orthonormal wavelets, IEEE Trans-n Signal Processing 46 (1998) 17161720., T. Nguyen, Wavelets and Filter Banks, Wellesley-Cambridge Press,, MA, 1996.yanathan, Multirate Systems and Filter Banks, Prentice-Hall, Engle-ffs, NJ, 1993.y, R.C. Eberhart, Swarm Intelligence, Morgan Kaufmann, San Mateo,.berg, Genetic algorithms in search, in: Optimization and Machine

    Addison-Wesley, Reading, MA, 1989.ali, F. Melgani, Y. Bazi, A multiobjective genetic SVM approach fortion problems with limited training samples, IEEE Transactions once and Remote Sensing 47 (2009) 17071718., F. Melgani, M. Donelli, Automatic analysis of GPR images: a patternon approach, IEEE Transactions on Geoscience and Remote Sensing 47062217., Statistical Learning Theory, Wiley, New York, 1998.

  • A. Daamouche et al. / Biomedical Signal Processing and Control 7 (2012) 342 349 349

    [27] C.W. Hsu, C.J. Lin, A comparison of methods for multiclass support vectormachines, IEEE Transactions on Neural Networks 13 (2002) 415425.

    [28] M. Stone, Cross-validatory choice and assessment of statistical predictions,Journal of Royal Statistics Society B 36 (1974) 111147.

    [29] R. Mark, G. Moody, MIT-BIH Arrhythmia Database, 1997 (Online). Availablefrom: http://ecg.mit.edu/dbinfo.html.

    [30] F. de Chazal, R.B. Reilly, A patient adapting heart beat classier using ECGmorphology and heartbeat interval features, IEEE Transactions on BiomedicalEngineering 53 (2006) 25352543.

    [31] J.J. Wei, C.J. Chang, N.K. Shou, G.J. Jan, ECG data compression using truncatedsingular value decomposition, IEEE Transactions on Biomedical Engineering 5(2001) 290299.

    [32] A. Agresti, Categorical Data Analysis, 2nd edition, Wiley, New York,2002.

    [33] Y.H. Hu, S. Palreddy, W.J. Tompkins, A patient-adaptable ECG beat classierusing a mixture of experts approach, IEEE Transactions on Biomedical Engi-neering 44 (1997) 891900.

    A wavelet optimization approach for ECG signal classification1 Introduction2 Wavelets3 Particle swarm optimization4 Support vector machines5 The proposed method6 Experimental results6.1 Dataset description and experimental setup6.2 Results

    7 ConclusionReferences