ECG arrhythmia recognition via a neuro-SVM–KNN hybrid classifier with virtual QRS image-based geometrical features

ECG arrhythmia recognition via a neuro-SVM–KNN hybrid classifier with virtual QRS image-based geometrical features

Expert Systems with Applications 39 (2012) 2047–2058 Contents lists available at SciVerse ScienceDirect Expert Systems with Applications journal hom...

571KB Sizes 0 Downloads 30 Views

Expert Systems with Applications 39 (2012) 2047–2058

Contents lists available at SciVerse ScienceDirect

Expert Systems with Applications journal homepage: www.elsevier.com/locate/eswa

ECG arrhythmia recognition via a neuro-SVM–KNN hybrid classifier with virtual QRS image-based geometrical features M.R. Homaeinezhad a,b,⇑, S.A. Atyabi b,c,d, E. Tavakkoli a,b, H.N. Toosi a,b, A. Ghaffari a,b,c, R. Ebrahimpour e a

Department of Mechanical Engineering, K.N. Toosi University of Technology, Tehran, Iran Cardio Vascular Research Group (CVRG), K.N. Toosi University of Technology, Tehran, Iran c Department of Mechatronic Engineering, Islamic Azad University, South Tehran Branch, Iran d Young Researchers Club, Islamic Azad University, South Tehran Branch, Tehran, Iran e Department of Cognitive Sciences, Institute for Studies in Theoretical Physics and Mathematics (IPM), Tehran, Iran b

a r t i c l e

i n f o

Keywords: Feature extraction Curve length method Support vector machine K-nearest neighbors Multi layer perceptron Fusion (hybrid) classification Arrhythmia classification Supervised learning machine

a b s t r a c t In this study, a new supervised noise-artifact-robust heart arrhythmia fusion classification solution, is introduced. Proposed method consists of structurally diverse classifiers with a new QRS complex geometrical feature extraction technique. Toward this objective, first, the events of the electrocardiogram (ECG) signal are detected and delineated using a robust wavelet-based algorithm. Then, each QRS region and also its corresponding discrete wavelet transform (DWT) are supposed as virtual images and each of them is divided into eight polar sectors. Next, the curve length of each excerpted segment is calculated and is used as the element of the feature space. Discrimination power of proposed classifier in isolation of different Gold standard beats was assessed with accuracy 98.20%. Also, proposed learning machine was applied to 7 arrhythmias belonging to 15 different records and accuracy 98.06% was achieved. Comparisons with peer-reviewed studies prove a marginal progress in computerized heart arrhythmia recognition technologies. Ó 2011 Elsevier Ltd. All rights reserved.

1. Introduction Heart is a special myogenic muscle which its constitutive cells (myocytes) possess two important characteristics namely as nervous (electrical) excitability and mechanical tension with force feedback. The heart’s rhythm of contraction is controlled by the sino-atrial node (SA node) called the heart pacemaker. This node is the part of the heart’s intrinsic conduction system, made up of specialized myocardial (nodal) cells. Each beat of the heart is set

Abbreviations: KNN, K-nearest neighbors; SVM, support vector machine; ECG, electrocardiogram; DWT, discrete wavelet transforms; SNR, signal to noise ratio; ANN, artificial neural network; MEN, maximum epochs number; NHLN, number of hidden layer neurons; RBF, radial basis function; MLP-BP, multi-layer perceptron back propagation; FP, false positive; FN, false negative; TP, true positive; P+, positive predictivity (%); Se, sensitivity (%); CPUT, CPU time; MITDB, MIT-BIH Arrhythmia Database; SMF, smoothing function; FIR, finite-duration impulse response; LBBB, left bundle branch block; RBBB, right bundle branch block; PVC, premature ventricular contraction; APB, atrial premature beat; VE, ventricular escape beat; CHECK#0, procedure of evaluating obtained results using MIT-BIH annotation files; CHECK#1, procedure of evaluating obtained results consulting with a control cardiologist; CHECK#2, procedure of evaluating obtained results consulting with a control cardiologist and also at least with 3 residents. ⇑ Corresponding author at: Department of Mechanical Engineering, K.N. Toosi University of Technology, Tehran, Iran. E-mail address: [email protected] (M.R. Homaeinezhad). 0957-4174/$ - see front matter Ó 2011 Elsevier Ltd. All rights reserved. doi:10.1016/j.eswa.2011.08.025

in motion by an electrical signal from the SA node located in the heart’s right atrium. The automatic nature of the heartbeat is referred to as automaticity which is due to the spontaneous electrical activity of the SA node. The superposition of all myocytes electrical activity on the skin surface causes a detectable potential difference which its detection and registration together is called electrocardiography (Sachse, 2004). However the heart’s electrical system controls all the events occurring when heart pumps blood. So if according to any happening, the electro-mechanical function of a region of myocytes encounters a failure, the corresponding abnormal effects will appear in the electrocardiogram (ECG) which is an important part of the preliminary evaluation of a patient suspected to have a heart-related problem. Based on a comprehensive literature survey among many documented works, it is seen that several features and extraction (selection) methods have been created and implemented by authors. For example, original ECG signal (Ozbay, Ceylan, & Karlik, 2006), preprocessed ECG signal via appropriately defined and implemented transformations such as discrete wavelet transform (DWT), continuous wavelet transform (CWT) (Lin, Du, & Chen, 2008), Hilbert transform (HT) (Benitez, Gaydecki, Zaidi, & Fitzpatrick, 2001), fast Fourier transform(FFT) (Christov et al., 2006; Lin, 2008), short time Fourier transform (STFT) (Tsipouras & Fotiadis, 2004), power spectral density (PSD) (Kar & Okandan, 2007; Stridh, Sörnmo, Meurling, & Olsson, 2004), higher order

2048

M.R. Homaeinezhad et al. / Expert Systems with Applications 39 (2012) 2047–2058

spectral methods (Khadra, Al-Fahoum, & Binajjaj, 2005; Yu & Chen, 2009), statistical moments (de Chazal, O’Dwyer, & Reilly, 2004), nonlinear transformations such as Liapunov exponents and fractals (Nopone, Kortelainen, & Seppanen, 2009; Owis, Abou-Zied, Youssef, & Kadah, 2002; Povinelli, Johnson, Lindgren, Roberts, & Ye, 2006) have been used as appropriate sources for feature extraction. In order to extract feature(s) from a selected source, various methodologies and techniques have been introduced. To meet this end, the first step is segmentation and excerption of specific parts of the preprocessed trend (for example, in the area of the heart arrhythmia classification, ventricular depolarization regions are the most used segments). Afterwards, appropriate and efficient features can be calculated from excerpted segments via a useful method. Up to now, various techniques have been proposed for the computation of feature(s). For example mean, standard deviation, maximum value to minimum value ratio, maximum-minimum slopes, summation of point to point difference, area, duration of events, correlation coefficient with a pre-defined waveform template, statistical moments of the auto (cross) correlation functions with a reference waveform (Minhas & Arif, 2008), bi-spectrum (Yu & Chen, 2009), differential entropy (Liu, Sun, Liu, & Zhang, 2009), mutual information (Peng, Long, & Ding, 2005), nonlinear integral transforms and some other more complicated structures (Abe & Kudo, 2006; Christov & Bortolan, 2004; Chudacek1 et al., 2009; Exarchos et al., 2007; Lin, Du, & Chen, 2009; Liu et al., 2009; Nopone et al., 2009; Owis et al., 2002; Peng et al., 2005; Polat, Kara, Güven, & Günes, 2009; Povinelli et al., 2006; Rohani Sarvestani, Boostani, & Roopaei, 2009; Wang, Zhu, Thakor, & Xu, 2001) may be used as an instrument for calculation of features. After generation of the feature source, segmentation, feature selection and extraction (calculation), the resulted feature vectors should be divided into two groups ‘‘train’’ and ‘‘test’’ to tune an appropriate classifier such as a neural network, support vector machine or ANFIS (Abe & Kudo, 2006; Christov & Bortolan, 2004; Christov & Bortolan, 2005; Chudacek1 et al., 2009; Exarchos et al., 2007; Lin, Du, et al., 2009; Liu, Sun, et al., 2009; Minhas & Arif, 2008; Peng et al., 2005; Polat et al., 2009; Tsipouras, Voglis, & Fotiadis, 2007). As previous researches show, occurrence of arrhythmia(s) affects RR-tachogram and Heart Rate Variability (HRV) in such a way that these quantities can be used as good features to classify several rhythms. Using RR-tachogram or HRV analysis in feature extraction and via simple if-then or other parametric or nonparametric classification rules (de Chazal & Reilly, 2006; Nilsson, Funk, Olsson, von Scheele, & Xiong, 2006; Tsipouras, Fotiadis, & Sideris, 2005), artificial neural networks, fuzzy or ANFIS networks (Acharya, Sankaranarayanan, Nayak, Xiang, & Tamura, 2008; Kannathal, Lim, Rajendra Acharya, & Sadasivan, 2006; Tsipouras & Fotiadis, 2004; Yu & Chou, 2008; Yu & Chou, 2009), support vector machines (Mohammadzadeh Asl, Kamaledin Setarehdan, & Mohebbi, 2008) and probabilistic frameworks such as Bayesian hypotheses tests (Yu & Chou, 2007), the arrhythmia classification would be fulfilled with acceptable accuracies. Heretofore, the main concentration of the arrhythmia classification schemes has been on morphology assessment and/or geometrical parameters of the ECG events. Traditionally, in the studies based on the morphology and the wave geometry, first, during a preprocessing stage, some corrections such as baseline wander removal, noiseartifact rejection and a suitable scaling are applied. Then, using an appropriate mapping for instance, filter banks, discrete or continuous wavelet transform in different spatial resolutions and etc., more information is derived from the original signal for further processing and analyses. In some researches, original and/or preprocessed signal are used as appropriate features and using artificial neural network or fuzzy classifiers (Ceylan, Uzbay, & Karlik, 2009; de Chazal, O’Dwyer, & Reilly, 2004; Ebrahimzadeh & Khazaee, 2009; Inan, Giovangrandi, & Kovacs, 2006; Lin et al.,

2008; Osowski, Markiewicz, & Tran Hoai, 2008; Ozbay et al., 2006; Polat, Sahan, & Gune, 2006; Wen, Lin, Chang, & Huang, 2009), parametric and probabilistic classifiers (Bartolo et al., 2001; Polat & Gunes, 2007; Wiggins, Saad, Litt, & Vachtsevanos, 2008), the discrimination goals are followed. Although, in such classification approaches, acceptable results may be achieved, however, due to the implementation of the original samples as components of the feature vector, computational cost and burden especially in high sampling frequencies will be very high and the algorithm may take a long time to be trained for a given database. In some other researches, geometrical parameters of QRS complexes such as maximum value to minimum value ratio, area under the segment, maximum slope, summation (absolute value) of point to point difference, ST-segment, PR and QT intervals, statistical parameters such as correlation coefficient of a assumed segment with a template waveform, first and second moments of original or preprocessed signal and etc. are used as effective features (Christov & Bortolan, 2004; Christov & Bortolan, 2005; Chudacek1 et al., 2009; Exarchos et al., 2007; Minhas & Arif, 2008; Tsipouras et al., 2007; Yeh, Wang, & Chiou, 2009). The main definition origin of these features is based on practical observations and a priori heuristic knowledge whilst conducted researches have shown that by using these features, convincing results may be reached. On the other hand, some of studies in the literature focus on the ways of choosing and calculating efficient features to create skillfully an efficient classification strategy (Abe & Kudo, 2006; Liu et al., 2009; Peng et al., 2005; Polat et al., 2009). In the area of nonlinear systems theory, some ECG arrhythmia classification methods on the basis of fractal theory (Lin, Du, et al., 2009; Wang et al., 2001), state-space, trajectory space, phase space, Liapunov exponents (Nopone et al., 2009; Povinelli et al., 2006; Rohani Sarvestani et al., 2009) and nonlinear models (Owis et al., 2002) have been innovated by researchers. Amongst other classification schemes, structures based on higher order statistics in which to analyze features, a two or more dimensional frequency space is constructed can be mentioned (Khadra et al., 2005; Yu & Chen, 2009). According to the concept that upon appearance of changes in the morphology of ECG signal caused by arrhythmia, corresponding changes are seen in the frequency domain, therefore, some arrhythmia classifiers have been designed based on the appropriate features obtained from signal fast Fourier transform (FFT), short-time Fourier transform (STFT), auto regressive (AR) models and power spectral density (PSD), Christov et al., 2006; Lin, 2008; Chen, 2000; Kar & Okandan, 2007; Stridh et al., 2004; Jekova, Bortolan, & Christov, 2008. Finally, using some polynomials such as Hermite function which has specific characteristics, effective features have been extracted to classify some arrhythmias (Jiang & Kong, 2007; Lagerholm, Peterson, Braccini, Edenbrandt, & Sörnmo, 2000). The general block diagram of the proposed heart arrhythmia recognition-classification algorithm including two stages train and test is shown in Fig. 1. According to this figure, first, the events of the ECG signal are detected and delineated using a robust wavelet-based algorithm (Ghaffari, Homaeinezhad, Akraminia, Atarod, & Daevaeiha, 2009; Ghaffari, Homaeinezhad, Khazraee, & Daevaeiha, 2010). Then, each QRS region and also its corresponding DWT are supposed as virtual images and each of them is divided into eight polar sectors. Next, the curve length of each excerpted segment is calculated and is used as the element of the feature space and to increase the robustness of the proposed classification algorithm versus noise, artifacts and arrhythmic outliers, a fusion structure consisting of six different classifiers namely as SVM, KNN and four MLP-BP neural networks with different topologies were designed. The new proposed algorithm was applied to all 48 records of the MIT-BIH Arrhythmia Database (MITDB) and as the result, the average value of Acc = 98.20% was obtained as the accuracy. Also, the proposed hybrid classifier was

2049

M.R. Homaeinezhad et al. / Expert Systems with Applications 39 (2012) 2047–2058

If the scale factor a and the translation parameter b are chosen as q = 2, i.e., a = 2k and b = 2kl, the dyadic wavelet with the following basis function will be resulted (Mallat, 1999),

Original ECG

Resampling into Frequency 1000 Hz

wk;l ðtÞ ¼ 2k=2 wð2k t  lTÞ;

Reliable QRS DetectionDelineation Algorithm

Discrete Wavelet Transform

QRS Edges and RR-Tachogram

Scale 2λ λ=1,…,6

Generating Virtual Image from the Original ECG

k; l 2 Z þ

ð3Þ

To implement the a` trous wavelet transform algorithm, filters H(z) and G(z) should be used according to the block diagram represented in Fig. 2a (Mallat, 1999). According to this block diagram, each smoothing function (SMF) is obtained by sequential low-pass filtering (convolving with G(z) filters), while after high-pass filtering of a SMF (convolving with H(z) filters), the corresponding DWT at appropriate scale is generated. In order to decompose the input signal x(t) into different frequency passbands, according to the block diagram of Fig. 2b, sequential high-pass low-pass filtering including down-sampling should be implemented. The filter outputs xH(t) and xL(t) can be obtained by convolving the input signal x(t) with corresponding high-pass and low-pass finite-duration impulse responses (FIRs) and contributing the down-sampling as

QRS Close-up Parameters

Segmentation

8 k¼þ1 P > > gðkÞxð2t  kÞ > < xL ðtÞ ¼ k¼1

Curve Length and Polar Area

k¼þ1 > P > > hðkÞxð2t  kÞ : xH ðtÞ ¼

ð4Þ

k¼1

Feature Space (Dimension=18)

t ¼ 0; 1; . . . ; N  1

Feature Extraction

On the other hand, to reconstruct the transformed signal, the obtained signals xH(t) and xL(t) should be first be up-sampled by following simple operation

Test & Train Datasets



Classification Algorithm

xL ð2tÞ ¼ xL ðtÞ;

¼ xH ðtÞ; xH ð2t þ 1Þ ¼ 0 t ¼ 0; 1 . . . N  1

Predicted Labels Classification Fig. 1. The general block diagram of a ECG beat type recognition algorithm supplied with the virtual image-based geometrical features.

applied to 7 number of arrhythmias (Normal, LBBB, RBBB, PVC, APB, VE, VF) belonging to 15 number of the MITDB and the average value of Acc = 98.06% was achieved.

g  ðtÞ ¼ gðLG  1  tÞ

Then the reconstructed signal xR(t) is obtained by superposition of the up-sampled signals convolution with their appropriately flipped FIR filters as follows:

xR ðtÞ ¼

Z

þ1

xðtÞwððt  bÞ=aÞdt;

a>0

ð1Þ

1

The parameter a can be used to adjust the wideness of the basis function and therefore the transform can be adjusted in several temporal resolutions. In Eq. (1), for dilation parameter ‘‘a’’ and the translation parameter ‘‘b’’, the values a = qk and b = qklT can be used in which q is the discretization parameter, l is a positive constant, k is the discrete scale power and T is the sampling period. By substituting the new values of the parameters ‘‘a’’ and ‘‘b’’ into the wavelet function w(t), the following result is obtained

wk;l ðtÞ ¼ q

k=2

k

wðq t  lTÞ;

k; l 2 Z

þ

k¼þ1 X



h ðkÞxH ðt  kÞ þ

k¼1

Generally, it can be stated that the wavelet transform is a quasiconvolution of the hypothetical signal x(t) and the wavelet function w(t) with the dilation parameter a and translation parameter b, as the following integration

ð2Þ

The scale index k determines the width of wavelet function, while the parameter l provides translation of the wavelet function.

ð6Þ



h ðtÞ ¼ hðLH  1  tÞ

2. Materials and methods 2.1. The discrete wavelet transform (DWT)

ð5Þ

If the FIR lengths of the H(z) and G(z) filters are represented by LH and LG, respectively, then the reconstructing high-pass and lowpass filters are obtained as



1 W ax ðbÞ ¼ pffiffiffi a

xL ð2t þ 1Þ ¼ 0

xH ð2tÞ

k¼þ1 X

g  ðkÞxG ðt  kÞ

ð7Þ

k¼1

For a prototype wavelet w(t) with the following quadratic spline Fourier transform,

 4 sinðX=4Þ WðXÞ ¼ jX X=4

ð8Þ

the transfer functions H(z) and G(z) can be obtained from the following equation

Hðejx Þ ¼ ejx=2 ðcosðx=2ÞÞ3 Gðejx Þ ¼ 4je

jx=2

ðsinðx=2ÞÞ

ð9Þ

and therefore,

h½n ¼ ð1=8Þfd½n þ 2 þ 3d½n þ 1 þ 3d½n þ d½n  1g g½n ¼ 2fd½n þ 1  d½ng

ð10Þ

It should be noted that for frequency contents of up to 50 Hz, the a` trous algorithm can be used in different sampling frequencies. Therefore, one of the most prominent advantages of the a` trous algorithm is the approximate independency of its results from sampling frequency. This is because of the main frequency contents of

2050

M.R. Homaeinezhad et al. / Expert Systems with Applications 39 (2012) 2047–2058

(a)

xH[n]

H(z)

H*(z)

xR[n]

x[n]

Σ G(z)

G*(z)

xL[n]

Reconstruction

Decomposition

(b) x[n]

H(z)

Dyadic Scale 21 H(z)

Dyadic Scale 22 Dyadic Scale 23

H(z)

G(z)

H(z)

G(z)

Dyadic Scale 24

G(z)

...

G(z)

Fig. 2. FIR filter-bank implementation to generate discrete wavelet dyadic scales and smoothing functions transform based on a` trous algorithm. (a) one-step generation of detail coefficient scales and reconstruction of the input signal and (b) four-step implementation of DWT for extraction of dyadic scales.

the ECG signal concentrate on the range less than 20 Hz (Ghaffari et al., 2009; Ghaffari, Homaeinezhad, Khazraee et al., 2010). After examination of various databases with different sampling frequencies (range between 136 and 10 kHz), it has been concluded that in low sampling frequencies (less than 750 Hz), scales 2k (k = 1, 2, . . ., 5) are usable while for sampling frequencies more than 1000 Hz, scales 2k (k = 1, 2, . . ., 8) contain profitable information that can be used for the purpose of wave detection, delineation and classification. 2.2. K-nearest neighbors classification method The KNN classification algorithm is a supervised method with a desirable computational speed along with the acceptable classification accuracy. The KNN-based classifier does not require the train stage and is based on a simple theory and mathematics. The structure of the KNN classifier imposes lower computational burden in comparison with the support vector machine (SVM) or the artificial neural networks (ANN) classifiers Bishop, 2006. Subsequently, for a given train feature space, train and test stages are fulfilled with rather faster speeds from a KNN classifier in comparison with the SVM or ANN algorithms. In order to formulate the KNN classification algorithm, suppose that the pair (xi, d(xi)) contains the feature vector xi and its corresponding label d(xi) where d 2 {1, 2, . . ., n} and i = 1, 2, . . ., N (n and N are the number of classes and the number of train feature vectors, respectively). For an arbitrary feature vector xi, calculation of a defined distance between this feature and the feature vector xj is possible as follows,

DN ðiÞ ¼ sort ðDðiÞÞ Ascending

ð14Þ

V ¼ fdðDN ðiÞð1ÞÞ; . . . ; dðDN ðiÞðKÞÞg According to the KNN algorithm, the test feature xi belongs to the class with the major votes in the K-nearest vote vector V. In order to determine the optimum K corresponding to the best accuracy, a simple way is to alter the K from 1 to a large enough value (in this study, Kmax = 20) and choosing the K for which the best accuracy is obtained for all test features. 2.3. Radial basis function based support vector machine (RBF-SVM) classifier In this work, RBF-SVM is implemented as arrhythmias classification method. According to Vapnik formulation (Bishop, 2006), if couple (xi, d(xi)) (in which d(xi) is class function, i = 1, . . ., N) describing data elements and their corresponding categories which are linearly separable in the feature space, then

fðxÞ ¼ wT uðxÞ þ b

ð15Þ

where w is weight vector, b is bias term and the condition f(xi)d (xi) > 0 holds. On the other hand, if train data is not linearly separable in the feature space to find a suitable separating hyper plane, the following constrained optimization problem should be solved

CoFðw; nÞ ¼

N X 1 kwk2 þ C nj 2 j¼1

ð16Þ

T

dði; jÞ ¼ f ðxi ; xj Þ

ð11Þ

where f(xi, xj) is a scalar distance function. For instance, f(xi, xj) can be defined as

8 ðaÞ f ðxi ; xj Þ ¼ ðxi  xj ÞT R; ðxi  xj Þ > > > >  p 1=r > > P < ðxi ðkÞ  xj ðkÞÞr ðbÞ f ðxi ; xj Þ ¼ k¼1 > > > p > P > 1 > absðxi ðkÞ  xj ðkÞÞ : ðcÞ f ðxi ; xj Þ ¼ p

ð12Þ

s:t: dðxi Þðw uðxi Þ þ bÞ P 1  ni ;

where CoF is a cost function. Upon solving the above constrained optimization problem, separating hyper plane will be obtained. In the above equation, C is called regularization parameter which its value generates a trade-off between hyper plane margin and classification error. ni is stack parameter corresponds to xi. Introducing Lagrange multipliers as

CoFðaÞ ¼

k¼1

DðiÞ ¼ fdði; jÞji ¼ 1; 2; . . . ; Ntest ; j ¼ 1; 2 . . . ; N train g

N X j¼1

where the first term of the Eq. (12) called generalized distance and for the weight matrix R = I the famous Euclidean norm will be achieved. While the second term of the Eq. (12) is called Minkovski distance of degree r and for r = 2, again the Euclidean distance appears. The third term of Eq. (12), is called the City Block distance and is used in many pattern recognition cases. If the distance vector D(i) is defined by following equation

ð13Þ

By sorting the D(i) vector in an ascending fashion, and choosing the first K elements (which is called K nearest neighbors) as follows

i ¼ 1; . . . ; N

s:t:

N X

aj 

N X N 1X ai aj dðxi Þdðxj ÞKðxi ; xj Þ 2 i¼1 j¼1

ð17Þ

aj dðxj Þ ¼ 0 0 6 aj 6 C

j¼1

where K(xi, xj) is kernel function obtained from following equation

Kðxi ; xj Þ ¼ uT ðxi Þuðxj Þ

ð18Þ k

for example, Kðxi ; xj Þ ¼ ðxTi xj þ 1Þ is polynomial kernel of degree k and Kðxi xj Þ ¼ expðckxi  xj k2 Þ is RBF kernel. In the Eq. (17), if ai > 0, xis are called support vectors. In specific cases, if ai = C, xis are bounded support vectors and if 0 < ai < C, xis will be called unbounded support vector. To solve the constrained Eq. (17), several

2051

M.R. Homaeinezhad et al. / Expert Systems with Applications 39 (2012) 2047–2058

approaches can be found in the literature (Bishop, 2006). After solving Eq. (17), the decision function f(x) is obtained as follows



X

ai dðxi ÞKðxi ; xÞ þ b

i

dðxj Þaj uðxj Þ

ð19Þ

j

and margin K is obtained as



1 1 rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi kwk P P dðxi Þdðxj Þai aj Kðxi ; xj Þ i

ECG

QRS Time Center

4

DWT:2

0.3 Normalized Signals

fðxÞ ¼

X

0.4

Absolute Maximum

0.2 0.1 0

Zero-Cross

-0.1 -0.2

ð20Þ -0.3

j

Absolute Minimum

1.74

More details about fundamental concepts of SVM can be found in Bishop (2006). 3. The neuro-SVM–KNN fusion classification algorithm: design, implementation and performance evaluation 3.1. QRS geometrical features extraction 3.1.1. ECG events detection and delineation In this step, QRS complexes are detected and delineated. Today reliable QRS detectors based on Hilbert (Benitez et al., 2001; Ghaffari, Homaeinezhad, Atarod, & Akraminia, 2010) and Wavelet (Ghaffari et al., 2009; Ghaffari, Homaeinezhad, Khazraee et al., 2010) transforms can be found in literature. In this study, an ECG detection-delineation method with the sensitivity and positive predictivity Se = 99.95% and P+ = 99.94% and the average maximum delineation error of 6.1 ms, 4.1 ms and 6.5 ms for P-wave, QRS complex and T-wave, respectively is implemented (Ghaffari, Homaeinezhad, Khazraee et al., 2010). By application of this method, detecting the major characteristic locations of each QRS complex, i.e., fiducial, R and J locations, becomes possible. 3.1.2. Detected QRS complex geometrical features extraction In order to compute features from the detected QRS complexes either normal or arrhythmic via the proposed method, first a reliable time center should be obtained for each QRS complex. To find this point, the absolute maximum and the absolute minimum indices of the excerpted DWT dyadic scale 24 using the onset-offset locations of the corresponding QRS complex, are determined. It should be noted that according to comprehensive studies fulfilled in this research, the best time center of each detected QRS complex is the mean of zero-crossing locations of the excerpted DWT (see Fig. 3). To make a virtual close-up from each detected QRS complex, a rectangle is built on the complex with following specifications:  The left-side mid-span of the rectangle is the fiducial location of the QRS complex.  The Absolute distance of the complex from the fiducial point is the half of the rectangle height.  The center of rectangle is the time-center of the QRS complex.  The right-hand abscissa of the rectangle is the distance between QRS time center and its J-location. Afterwards, Each QRS region and also its corresponding DWT are supposed as virtual images and each of them is divided into eight polar sectors. Next, the curve length of each excerpted segment is calculated and is used as the elements of the feature space, (therefore, for each detected QRS complex, 16 features are computed). The quantity curve-length of a hypothetical time series x(t) in a window with length WL samples can be estimates as

1.76

1.78

1.8

1.82

1.84

Sample Number

4

x 10 …

Fig. 3. Determination of the time center of a detected QRS complex using excerpted DWT scale 24.

MCL ðkÞ 

1 Fs

qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi kþW L 1 X 1 þ ½ðxðt þ 1Þ  xðtÞÞF s 2 t¼k

ð21Þ

where Fs is sampling frequency of the time series x(t). The curve length is suitable to measure the duration of the signal x(t) events, either being strong or weak. Generally, the MCL measure indicates the extent of flatness (smoothness or impulsive peaks) of samples in the analysis window. This measure allows the detection of sharp ascending/descending regimes occurred in the excerpted segment (Ghaffari et al., 2009). In Fig. 1, the general block diagram of the ECG beats annotation algorithm with the proposed QRS geometrical feature space is illustrated. A generic example of a holter ECG and its corresponding 24 DWT dyadic scale with the virtual images of the complexes provided for feature extraction as well as two quantities obtained from the RR-tachogram are shown in Fig. 4. 3.2. Design of the hybrid (fusion) classification algorithm 3.2.1. Design of the particle classifiers In the heart-beat classification context, due to differences existing in the theory and the structure of the several types of classifiers such as artificial neural network (ANN), KNN and SVM, reasonably, achieving exactly similar result from them given a common train and test feature spaces, cannot be expected. Assessments confirm that in the arrhythmia classification of the MITDB, even if the average discrimination power of an appropriately designed classifier is superior to another rival classifier, however, existence of some records in which exceptionally higher generated accuracies obtained from the rival classifier may be possible. In order to increase the total accuracy of the proposed classification algorithm, one way is to synthesize the output of several classification algorithms with different inherent structures to achieve the best accuracy as much as possible leading to higher robustness against uncertainties and probable arrhythmia or outliers. In this study, to build a fusion (hybrid) classification scheme, six types of different classification methods namely as SVM, KNN and four MLP-BP with different topologies are properly regulated using the train dataset. The specifications of each classification algorithm are described below.  SVM classifier. According to section B.3, each SVM includes two parameters C and c that should be tuned properly to attain satisfactory accuracies. In this study the best choices for the parameters C and c were concluded to be 10 and 0.000001, respectively. The predicted labels of the input feature vector were considered as the output of this classifier in the fusion structure.

2052

M.R. Homaeinezhad et al. / Expert Systems with Applications 39 (2012) 2047–2058

(a) 1.3

φ

y

φ

L

2

R

(b)

PVC

3

0.3

Normal

Normalized Signal

Normalized Signal

4

1

x

0.9 8

5 7

0.8

PVC

φ

L

2

Normal

1

φ

Normal

1.2 1.1

y

0.4

0.2 0.1

1

4

8

5

0

x

-0.1 -0.2

7

6

Normal

R

3

6

-0.3 -0.4

0.7 1.74

1.76

1.78

1.8

1.82

-0.5

1.84

1.76

1.78 1.8 Sample Number

x 10

Sample Number

(c)

1.82

1.84 4

x 10

RRk+1

RRk Rk

1.3 Normalized Signal

1.74

4

1.2

Rk+1

Rk-1

1.1 1 0.9 0.8 1.72

1.74

1.76

1.78 1.8 Sample Number

1.82

1.84 4

x 10

Fig. 4. Extraction of the geometrical features from a delineated QRS complex via segmentation of each complex into 8 polar sectors by generating of a virtual image from the complex. (a) original ECG, (b) DWT of the original ECG and (c) RR-interval.

 KNN classifier. As mentioned previously in section B.2, the KNN classifier doesn’t require train and uses all train dataset as its decision support. To find the best parameter K for the given train database, K is altered from 1 to 10 and during each step, the accuracy of the KNN classifier is obtained and in this way, the optimum K is determined.  MLP-BP1. The first MLP-BP classifier includes one hidden layer with number of hidden layer neurons (NHLN) equal to 20 and tangent sigmoid and the logarithmic sigmoid as the activation functions of the hidden layer and output layer, respectively. Also, for this ANN, maximum epochs number (MEN) is chosen to be 500.  MLP-BP2. This classifier possesses one hidden layer with NHLN = 20. The logarithmic sigmoid and tangent sigmoid were chosen as the activation functions of the hidden layer and the output layer, respectively. For this ANN, MEN = 500 was assigned.  MLP-BP3. The third ANN-type classifier has one hidden layer with NHLN = 25 and tangent sigmoid for both the hidden and the output layers. In this case MEN = 1000 was chosen.  MLP-BP4. The fourth classifier is an ANN with one hidden layer and the NHLN = 15 and logarithmic sigmoid function was chosen for both hidden and output layers. In this case, MEN considered to be 500. It should be noticed that several parameters such as types of activation functions and several values for NHLN, MEN were examined and were altered based on trying-and-error method and suitable ranges and types were chosen for these parameters. From each classifier embedded into the fusion structure, following outputs are processed

 Predicted labels for train and test feature space.  Accuracy of the classifier. The predicted labels of each particle classification algorithm are used for creation of a hybrid classifier consisting of a KNN, a SVM and four MLP-BP type ANN classifiers. To build a fusion classification, in this study, the predicted label of each classifier for the kth test input is put in the vote array G(k) as follows

GðkÞ ¼ fpði; kÞji ¼ 1; 2; . . . ; 6g

ð22Þ

where p(i, k) is the label predicted by the ith classifier of the fusion algorithm for the kth test input. To estimate the label of test input, if median of the vote array G(k) is not equal to its mean value, then the label with maximum repetition in the array is chosen as the final vote of the test input. On the other hand if the mean and median values of the vote array G(k) are equal, then the predicted label of the particle classifier with maximum train accuracy is chosen as the label of the input feature vector. In Fig. 5, the block diagram of the proposed fusion classification algorithm including six different classifiers in the train and test stages is illustrated. To evaluate performance of the proposed feature extraction method and the fusion classification algorithm, the following steps are pursued:  Evaluation of the discriminate power of the selected features.  Design of the particle classifiers and their implementation to all MITDB records.  Design of the fusion classifier for each MITDB record and comparing the obtained results with each particle classifier.

M.R. Homaeinezhad et al. / Expert Systems with Applications 39 (2012) 2047–2058

2053

TRAINING STAGE K-Nearest Neighbors K = 1~10 The Best K

Network # 1

Support Vector Machine C=10 gamma = 0.000001

Network # 2

Neural Network # 1 NHLN = 20 MEN = 500 {'tansig' , 'logsig'}

Network # 3 Train Feature Space

Median Weighted Voting

Fusion Network

Neural Network # 2 NHLN = 20 MEN = 1000 {'logsig' , 'tansig'}

Network # 4

Neural Network # 3 NHLN = 25 MEN = 500 {'tansig' , 'tansig'}

Network # 5

Neural Network # 4 NHLN = 15 MEN = 1000 {'logsig' , 'logsig'}

Network # 6

TESTING STAGE Network # 1 Network # 2

Test Feature Space

Network # 3 Fusion Network Network # 4 Network # 5 Network # 6

Fig. 5. General block diagram of the fusion (hybrid) classification algorithm consisting of six particle classifiers namely as SVM, KNN classifiers, and four MLP-BP networks. Table 1 The different rhythm types and the corresponding equivalent ASCII code integer numbers. Numeric code

Rhythm

Numeric code

Rhythm

33 34 43 47 65 69 70 74 76 78 81 82

Ventricular flutter wave Comment annotation Rhythm change Paced beat Atrial premature beat Ventricular escape beat Fusion of ventricular and normal beat Nodal (junctional) premature beat Left bundle branch block beat Normal beat Unclassifiable beat Right bundle branch block beat

83 86 91 93 97 101 102 106 120 124 126

Supraventricular premature or ectopic beat Premature ventricular contraction Start of ventricular flutter/fibrillation End of ventricular flutter/fibrillation Aberrated atrial premature beat Atrial escape beat Fusion of paced and normal beat Nodal (junctional) escape beat Non-conducted P-wave (blocked APC) Isolated QRS-like artifact Change in signal quality

 Selection of some rhythms from the MITDB records and designing of the particle and fusion classifiers.

 Comparison of the obtained final results with previous similar peer-reviewed studies.

2054

Table 2 Performance illustration of the particle classifiers SVM, KNN, and four MLP-BP networks as well as the corresponding performance of the fusion classification algorithm. Total # of beats

Rhythm codes

# of beats of each annotated rhythm

# Class

SVM

KNN

Best K

1st Neural net

2nd Neural net

3rd Neural net

4th Neural net

Final vote based hybrid classifier

100 101 102 103 104 105 106 107 108

2274 1874 2192 2091 2311 2691 2098 2140 1824

[1, 2239, 33, 1] [1, 1860, 4, 4, 2, 3] [5, 2028, 56, 99, 4] [1, 2082, 6, 2] [45, 1380, 666, 37, 18, 163, 2] [1, 2526, 41, 88, 30, 5] [30, 41, 1507, 520] [1, 2078, 59, 2] [1, 1740, 16, 11, 41, 4, 8, 2, 1]

2 3 5 2 6 5 4 2 6

100 99.8660 98.5126 99.7605 91.6304 97.0177 96.2963 100 98.2044

99.8899 99.8660 98.8558 99.7605 92.1739 97.8565 96.6547 100 98.3425

1 1 4 1 3 8 1 1 5

99.2291 99.7319 94.6224 99.8802 95.3261 94.3150 96.1493 100 95.3039

98.6784 99.7319 96.2243 100 95 94.0354 98.4468 99.8829 97.3757

100 99.8660 98.7414 96.4072 95.4348 93.5694 98.4468 99.6487 98.2044

99.7797 99.8660 98.2838 99.7605 85.5435 97.7633 97.4910 99.8829 96.1326

99.8899 99.8660 98.7414 99.7605 94.7826 97.8565 98.2079 100 98.0663

109 111 112 113 114 115 116 117 118 119 121 122 123 124 200 201

2535 2133 2550 1796 1890 1962 2421 1539 2301 2094 1876 2479 1519 1634 2792 2039

[1, 2492, 2, 38, 2] [1, 2123, 8, 1] [1, 2537, 10, 2] [1, 1789, 6] [3, 1820, 43, 2, 4, 1, 7, 10] [1, 1953, 2, 6] [1, 2302, 109, 1, 8] [1, 1534, 3, 1] [1, 2166, 16, 96, 10, 12] [103, 1543, 444, 4] [1, 1861, 12, 1, 1] [1, 2476, 2] [1, 1515, 3] [13, 1531, 29, 47, 5, 2, 2, 5] [148, 826, 1743, 30, 43, 2] [35, 1625, 97, 10, 198, 37, 30, 1, 4, 2]

2 2 2 2 5 2 3 1 5 4 2 1 1 6 5 8

100 99.6479 99.6071 100 99.0679 99.6169 99.4824 100 98.2552 97.9641 100 100 100 95.2160 93.4412 92.4598

100 99.8826 99.9018 100 99.3342 99.8723 99.3789 100 98.3642 98.0838 100 100 100 95.9877 93.8005 92.7070

1 1 1 1 1 1 3 1 8 1 1 1 1 5 3 3

99.3076 99.7653 99.6071 99.8605 99.2011 99.7446 99.4824 100 96.7285 99.8802 99.4660 100 100 96.9136 95.3279 90.1112

98.5163 100 99.6071 100 99.3342 99.4891 99.4824 100 92.1483 100 99.4660 100 100 96.4506 95.5975 96.0445

99.9011 99.6479 99.6071 98.6541 99.3342 99.6169 82.7122 100 98.2552 96.8263 98.7984 100 100 94.5988 96.8553 95.4265

98.5163 99.6479 99.9018 99.8605 99.0679 99.8723 95.7557 100 94.7655 81.5569 100 100 100 94.9074 93.3513 85.9085

100 99.7653 99.6071 100 99.3342 99.7446 99.4824 100 97.9280 99.1617 100 100 100 96.2963 96.4960 95.6737

202 203 205 207

2146 3107 2672 2385

[8, 2061, 19, 36, 2, 19, 1] [45, 57, 2529, 444, 2, 25, 4, 1] [13, 2571, 71, 3, 11, 2, 1] [24, 86, 105, 1457, 6, 472, 6, 15, 2, 105, 107]

5 6 4 10

97.6581 95.2342 98.9662 95.6660

97.8923 95.7189 98.9662 95.8774

1 3 9 1

95.6674 90.4685 99.1541 92.0719

95.68 92.0194 98.9662 96.5116

95.3162 96.1228 95.6767 93.5518

96.8384 91.6801 98.8722 92.1776

97.5410 96.3651 99.0602 96.9345

208 209 210 212 213 214 215 217 219 220 221 222 223 228 230 231 232 233 234 Total # of subjects Total # of complexes

3040 3052 26S5 2763 3294 2297 3400 2280 2312 2069 2462 2634 2643 2141 2466 2011 1816 3152 2764 48 112,646

[43, 78, 65, 86] [43, 78, 126, 124, 81, 65] [43, 47, 102, 78, 86] [43, 78, 126, 65] [43, 47, 102, 126, 81, 78, 86] [43, 78, 86, 126, 124, 81] [126, 43, 78, 86] [43, 47, 86, 126] [43, 78, 86, 120, 126, 65, 124, 70, 106] [43, 76, 70, 86, 126] [43, 76, 126, 86] [43, 78, 126, 65] [43, 78, 97] [43, 78, 86, 74, 70, 124, 126, 65] [43, 78, 126, 124] [43, 78, 86, 65, 126] [43, 78, 126, 65] [43, 82, 86, 65, 120, 126] [43, 78, 86, 126] [43, 78, 126, 65, 86] [43, 78, 124] [43, 78, 86] [43, 82, 74, 86, 70, 65, 126, 106] [43, 86, 78, 65, 126, 70] [43, 78, 97, 106, 86, 120, 65, 74, 126, 70] [43, 78, 86, 65, 124, 97, 70] [43, 126, 78, 86, 97, 124, 81, 70] [43, 78, 86, 65, 70, 126, 124] [43, 82, 86, 76, 91, 33, 93, 126, 124, 69, 65] [43, 70, 86, 78, 126, 124, 83, 81] [43, 78, 65, 124, 126, 86] [43, 78, 86, 70, 126, 97, 124, 69] [43, 82, 78, 126, 124] [43, 78, 70, 65, 86, 97] [43, 76, 86, 126, 124, 81, 34, 70] [43, 78, 86, 126, 65, 34, 70] [43, 47, 102, 86, 78, 126, 124] [43, 78, 86, 70, 34, 65, 120] [43, 78, 65, 126] [43, 78, 86, 126] [43, 78, 126, 65, 106, 74] [43, 78, 86, 65, 101, 70, 126, 97] [43, 78, 124, 86, 126, 65, 34] [43, 78, 126, 124, 86] [43, 82, 34, 78, 120, 65, 86] [43, 82, 65, 126, 106] [43, 86, 78, 65, 70, 124] [43, 78, 126, 74, 86] Average Accuracy (%)

[53, 373, 992, 1586, 24, 8, 2, 2] [21, 2621, 383, 7, 19, 1] [17, 2423, 194, 10, 17, 22, 1, 1] [1, 1825, 923, 13, 1] [43, 2641, 362, 25, 220, 3] [25, 2003, 256, 4, 5, 2, 1, 1] [5, 3195, 164, 30, 3, 2, 1] [67, 1542, 260, 162, 244, 4, 1] [21, 2082, 64, 1, 4, 7, 133] [17, 1954, 94, 4] [23, 2031, 396, 12] [136, 2062, 15, 208, 212, 1] [28, 2029, 473, 72, 16, 14, 10, 1] [41, 1688, 24, 362, 20, 3, 3] [207, 2255, 2, 1, 1] [11, 1254, 427, 314, 2, 1, 2] [1, 397, 1382, 35, 1] [71, 831, 2230, 7, 11, 2] [3, 2700, 8, 50, 3] 98.2024

6 5 6 3 5 5 4 6 6 4 4 5 7 5 2 4 3 5 3

96.9447 97.5349 97.1936 98.3681 92.4600 98.5777 99.1882 85.5727 97.3941 99.7576 97.9654 86.4762 95.0570 96.4747 100 97.7500 96.2707 97.2951 99.7278

96.0363 98.1101 97.8485 98.7307 92.3839 99.2341 99.3358 85.3524 97.2856 100 98.0671 85.9048 95.6274 97.1798 100 98.1250 96.9613 98.7271 99.5463

1 8 4 1 1 1 4 6 6 3 3 1 6 1 1 5 4 8 1

93.6416 87.8389 95.1356 94.3699 96.1158 95.7330 93.5793 95.8150 98.6971 98.3030 98.1689 87.0476 98.0989 76.4982 99.8984 99 97.2376 85.1233 99.2740

97.4401 93.5086 96.0804 96.0789 94.7906 99.0153 92.2509 96.7621 98.9142 96.3636 83.5198 86.8571 97.7186 97.6498 100 99.1250 96.8232 98.9658 99.6370

78.9430 92.1939 98.2226 99.2747 95.2780 94.9672 99.5572 96.8062 92.8339 98.7879 83.5198 85.3333 95.1521 94.9471 99.8984 98.2500 97.3757 98.2498 98.2759

97.1924 97.3706 97.1936 97.6428 80.3503 98.6871 99.6310 87.9956 95.5483 96.6061 99.0844 85.0476 96.2928 95.0646 99.7967 79.6250 95.7182 98.8862 99.6370

97.5227 97.5349 97.6614 98.7307 94.0594 98.5777 99.4096 96.2555 98.0456 99.3939 97.9654 88.1905 97.8137 97.6498 100 98.6250 97.3757 98.8862 99.4555

M.R. Homaeinezhad et al. / Expert Systems with Applications 39 (2012) 2047–2058

MIT rec

2055

M.R. Homaeinezhad et al. / Expert Systems with Applications 39 (2012) 2047–2058

30

100

25

Error Rate (%)

95 Accuracy (%)

SVM KNN MLP-BP1 MLP-BP2 MLP-BP3 MLP-BP4 Fusion

90 85 SVM KNN MLP-BP1 MLP-BP2 MLP-BP3 MLP-BP4 Fusion

80 75

20

VE

15 10 PVC

5

10

20

30

40

50

VF

RBBB

Normal LBBB

0

70 0

APB

1

60

2

3

4

5

6

7

Rhythm Codes

MIT-BIH Record Number Fig. 6. Accuracy percentage obtained by application of the proposed neuro-KNN fusion classification method and its structural particle classifiers to all records of the MITDB.

3.2.1.1. Results and discussion. In Table 1, the numeric codes of the 23 MITDB rhythms and their corresponding annotations are illustrated. After implementation of the KNN, SVM and four MLP-BP neural network classifiers and the corresponding fusion classifier to all 48 MITDB records and calculation of the accuracy, the obtained results are shown in Table 2. According to this table, the fusion classifier yielded the average accuracy of Acc = 98.20% given all data and all rhythms of the MITDB records. In Fig. 6, the graphical illustration of Table 2 is shown. As it can be seen in this figure, the overall performance quality associated with the fusion classification algorithm is superior rather than the structural classifiers embedded in the body of the hybrid algorithm. It should be noted that although in some records of the MITDB, one or some particle classifiers might have better performance rather that the fusion classifier, but this behavior does not continue uniformly for all records and therefore the superiority of the fusion scheme is justified. In order to be able for comparing the obtained results of this study with the outcomes of the previous researches (Osowski & Linh, 2001; Yu & Chen, 2009), utilizing exactly the same train and test databases is mandatory. To this end, records 100, 105, 106, 109, 111, 114, 116, 118, 119, 124, 200, 207, 209, 212 and 214 are selected from the MITDB

Fig. 7. Error-rate diversity analysis for justification of the fusion of SVM, KNN and four MLP-BP classifiers.

Table 4 Performance evaluation of the hybrid neuro-KNN–SVM classification algorithm for the selected MITDB records: (a) the confusion matrix and (b) performance statistics in terms of sensitivity, positive predictivity and specifity. Predicted rhythms types by the hybrid classification algorithm N

LBBB

RBBB

PVC

APB

VE

VF

987 2 2 5 3 1 0

2 496 1 3 0 1 0

3 1 393 3 1 0 0

5 1 3 687 14 0 2

1 0 1 2 280 0 0

0 0 0 0 0 48 0

2 0 0 0 2 0 198

(a)

True rhythms

N LBBB RBBB PVC APB VE VF

Class

Se (%)

P+ (%)

Sp (%)

(b) N LBBB RBBB PVC APB VEB VFW

98.70 99.20 98.25 98.14 93.33 96.00 99.00

98.70 98.61 98.00 96.49 98.59 100 98.02

99.4 99.74 99.71 98.98 99.86 100 99.86

records and the rhythms Normal, left bundle branch block (LBBB), right bundle branch block (RBBB), premature ventricular

Table 3 The name of selected MITDB records with their rhythm types contents for the aim of performance evaluation and comparison with other studies. Record

Rhythm type Normal Train

LBBB Test

RBBB

PVC

APB

VE

VF

Train

Test

Train

Test

Train

Test

Train

Test

Train

Test

Train

Test

100 105 106 109 111 114 116 118 119 124 200 207 209 212 214

162 185 109 0 0 132 167 0 112 0 126 0 190 67 0

130 147 87 0 0 106 134 0 90 0 100 0 152 54 0

0 0 0 216 184 0 0 0 0 0 0 126 0 0 174

0 0 0 154 132 0 0 0 0 0 0 90 0 0 124

0 0 0 0 0 0 0 232 0 164 0 9 0 195 0

0 0 0 0 0 0 0 155 0 109 0 6 0 130 0

0 13 170 12 0 14 36 5 145 15 272 34 0 0 84

0 12 150 11 0 12 31 5 127 13 236 30 0 0 73

18 0 0 0 0 5 0 53 0 0 16 58 208 0 0

15 0 0 0 0 5 0 43 0 0 14 49 174 0 0

0 0 0 0 0 0 0 0 0 0 0 55 0 0 0

0 0 0 0 0 0 0 0 0 0 0 50 0 0 0

0 0 0 0 0 0 0 0 0 0 0 272 0 0 0

0 0 0 0 0 0 0 0 0 0 0 200 0 0 0

Total

1250

1000

700

500

600

400

800

700

358

300

55

50

272

200

2056

M.R. Homaeinezhad et al. / Expert Systems with Applications 39 (2012) 2047–2058

Table 5 Comparison of the presented fusion classification method. Feature dimension

Se (%) LBBB RBBB APB PVC VE VF Total accuracy

Yu and Chen (2009)

Osowski and Linh (2001)

This study

12

24

30

18

18

18

94.53 96.92 90.40 93.79 83.46 95.93 94.82

98.60 98.88 92.04 97.12 95.38 98.05 97.36

98.76 99.20 91.25 97.65 95.38 98.56 97.53

98.60 98.68 91.92 96.72 95.00 98.22 97.28

97.00 94.00 91.33 96.57 90.00 94.50 96.06

99.20 98.25 93.33 98.14 96.00 99.00 98.06

Table 6 Summary of the previous works, used data and final accuracy to be compared with each other (NR: Not Reported). Authors

Method (feature extraction-classification)

Signal

Dataset

Accuracy

Osowski et al. (2008)

Feature extraction: 17 Feature vector 15 elements corresponding to the higher order statistics of QRS complex (the second, third and fourth order cumulants, each represented by five values) and the last two – the temporal features of the actual QRS signal Feature extraction: discrete wavelet transform Classification: intersecting spheres network

ECG

6568 beats from MITDB [Normal, LBBB, RBBB, PVC, APB, VE, VF] 3500 beats for train 3068 beats for test

NR

ECG

3000 beats from MITDB; Normal, LBBB, RBBB, P, p, a, VE, PVC, F, f: 300 from each category; 1500 training-1500 testing 7185 beats from MITDB; 4035 training-3150 testing [Normal: 2250, APB: 658, LBBB: 1200, PVC: 1500, RBBB: 1000, VF: 472, VE: 105] 25 min from each record in MITDB 200 series excluding records 212, 217, 220, 222 and 232 [Normal: 43897, PVC: 5363] 30000 beats from MITDB [N, P, f, P, Q, LBBB, RBBB: 25188, PVC, F: 2950, APB, a, J, S: 1213, e, j, n, VE: 265, VF: 384] 7185 beats from MITDB; 4035 training-3150 testing [Normal: 2250, APB: 658, LBBB: 1200, PVC: 1500, RBBB: 1000, VF: 472, VE: 105]

95.70

Dokur and Olmez (2001)

Osowski and Linh (2001)

Hu, Palreddy and Tompkins (1997) Tsipouras, Fotiadis and Sideris (2002) This study

Feature extraction: cumulants of the second, third and fourth order Classification: fuzzy hybrid neural network Feature extraction: PCA in 29 samples from QRS, instantaneous and average RR-interval, QRS complex width Classification: mixture of experts (SOM, LVQ) Feature extraction: RR-interval Classification: knowledge-based system

ECG

Feature extraction: geometrical properties obtained from segmentation of each detected-delineated QRS complex virtual image as well as RR-tachogram (18 features for each detected heart beat) Classification: a fusion structure consisting of SVM, KNN and four MLP-BP classifiers

ECG

contraction (PVC), atrial premature beat (APB), ventricular escape (VE) and ventricular flutter (VF) are extracted according to the MITDB annotation files. In Table 3, the name of the MITDB records as well as the selected rhythm types and their corresponding beat numbers are presented. 3.2.2. Error analysis It should be noted that if some diversely designed classification algorithms show error rate diversity relative to each other for a given common database, then the utilization of them in a vote-based fusion classification structure is justified. In Fig. 7, the error rate diversity of six structural classifiers including SVM, KNN, and four MLP-BP type and also the proposed hybrid classifier are demonstrated. In Table 4a, the performance of the fusion classification algorithm has been described by the obtained confusion matrix. For instance, the first row of this table shows that 2, 3, 5, 1, 0 and 2 beat numbers were falsely classified into the LBBB, RBBB, PVC, APB, VE and VF categories, respectively. In this way the number of fusion classifier false negative (FN) detections for the normal class equals to 13. On the other hand, for instance, the third column of this table illustrates that 3, 1, 3, 1, 0, 0 beat numbers from the Normal, LBBB, PVC, APB, VE and VF categories, respectively were falsely classified as RBBB class, i.e., the number of fusion classifier false positive (FP) detections for the RBBB class equals is 8. After calculation of the statistical parameters FP, FN, TP and TN, the performance indices Se, P+, Sp and Acc can be determined. The performance quality of the fusion classification for categorization of the rhythm types is quantitatively shown in Table 4b.

ECG

RR Tachogram

96.06

95.52

95.85

98.06

3.3. Arrhythmia classification performance comparison with other works In the final step, in order to show the marginal performance improvement of the proposed arrhythmia hybrid classification algorithm, the method is assessed relative to other high-performance recent works. The result of comparison of the proposed method and other works is shown in Table 5. Also, in Table 6, the summary of the previous conducted researches in the area of the heart arrhythmia classification algorithm including preprocessing, feature extraction and classification methods are presented. 4. Conclusion In this study, a new supervised heart arrhythmia hybrid (fusion) classification algorithm based on a new QRS complex geometrical features extraction technique as well as an appropriate choice from each beat RR-tachogram was described. In the proposed method, first, the events of the ECG signal were detected and delineated using a robust wavelet-based algorithm. Then, each QRS region and also its corresponding DWT were supposed as virtual images and each of them was divided into eight polar sectors. Next, the curve length of each excerpted segment was calculated and is used as the element of the feature space. To increase the robustness of the proposed classification algorithm versus noise, artifacts and arrhythmic outliers, a fusion structure consisting of six different classifiers namely as a SVM, a KNN and four MLP-BP neural

M.R. Homaeinezhad et al. / Expert Systems with Applications 39 (2012) 2047–2058

networks with different topologies were designed. To show the merit of the new proposed algorithm, it was applied to all 48 MITDB records and the discrimination power of the classifier in isolation of different beat types of each record was assessed and as the result, the average value of Acc = 98.20% was obtained as the accuracy. Also, the proposed method was applied to 7 number of arrhythmias namely as Normal, LBBB, RBBB, PVC, APB, VE, VF belonging to 15 number of the MITDB and the average value of Acc = 98.06% was achieved showing marginal improvement in the area of the heart arrhythmia classification. To evaluate performance quality of the new proposed hybrid learning machine, the obtained results were compared with several similar studies. References Abe, N., & Kudo, M. (2006). Non-parametric classifier-independent feature selection. Pattern Recognition, 39, 737–746. Acharya, U. R., Sankaranarayanan, M., Nayak, J., Xiang, C., & Tamura, T. (2008). Automatic identification of cardiac health using modeling techniques: A comparative study. Information Sciences, 178, 4571–4582. Bartolo, A., Clymer, B. D., Burgess, R. C., Turnbull, J. P., Golish, J. A., & Perry, M. C. (2001). An arrhythmia detector and heart rate estimator for overnight polysomnography studies. IEEE Transactions on Biomedical Engineering, 48(5). Benitez, D., Gaydecki, P. A., Zaidi, A., & Fitzpatrick, A. P. (2001). The use of the Hilbert transform in ECG signal analysis. Computers in Biology and Medicine, 31, 399–406. Bishop, ChristopherM (2006). Pattern recognition and machine learning. Springer Publishing. Ceylan, R., Uzbay, Y., & Karlik, B. (2009). A novel approach for classification of ECG arrhythmias: Type-2 fuzzy clustering neural network. Expert Systems with Applications, 36, 6721–6726. Chen, S.-W. (2000). A two-stage discrimination of cardiac arrhythmias using a total least squares-based Prony modeling algorithm. IEEE Transactions on Biomedical Engineering, 47(10). Christov, I., & Bortolan, G. (2004). Ranking of pattern recognition parameters for premature ventricular contractions classification by neural networks. Physiological Measurement, 25, 1281–1290. Christov, I., & Bortolan, I. JekovaG. (2005). Premature ventricular contraction classification by the Kth nearest-neighbours rule. Physiological Measurement, 26, 123–130. Christov, I., Gomez-Herrero, G., Krasteva, V., Jekova, I., Gotchev, A., & Egiazarian, K. (2006). Comparative study of morphological and time-frequency ECG descriptors for heartbeat classification. Medical Engineering and Physics, 28, 876–887. Chudacek1, V., Georgoulas, G., Lhotska, L., Stylios, C., Petrık, M., & Cepek, M. (2009). Examining cross-database global training to evaluate five different methods for ventricular beat classification. Physiological Measurement, 30, 661–677. de Chazal, P., O’Dwyer, M., & Reilly, R. B. (2004). Automatic classification of heartbeats using ECG morphology and heartbeat interval features. IEEE Transactions on Biomedical Engineering, 51(7). de Chazal, P., & Reilly, R. B. (2006). A patient-adapting heartbeat classifier using ECG morphology and heartbeat interval features. IEEE Transactions on Biomedical Engineering, 53(12). Dokur, Z., & Olmez, T. (2001). ECG beat classification by a hybrid neural network. Computer Methods and Programs in Biomedicine, 66, 167–181. Ebrahimzadeh, A., & Khazaee, A. (2009). Detection of premature ventricular contractions using MLP neural networks: A comparative study. Measurement. doi:10.1016/j.measurement.2009.07.002. Exarchos, T. P., Tsipouras, M. G., Exarchos, C. P., Papaloukas, C., Fotiadis, D. I., & Michalis, L. K. (2007). A methodology for the automated creation of fuzzy expert systems for ischaemic and arrhythmic beat classification based on a set of rules obtained by a decision tree. Artificial Intelligence in Medicine, 40, 187–200. Ghaffari, A., Homaeinezhad, M. R., Atarod, M., & Akraminia, M. (2010). Parallel processing of ECG and blood pressure waveforms for detection of acute hypotensive episodes: A simulation study using a risk scoring model. Computer Methods in Biomechanics and Biomedical Engineering, 13(2), 197–231. Ghaffari, A., Homaeinezhad, M. R., Akraminia, M., Atarod, M., & Daevaeiha, M. (2009). A robust wavelet-based multi-lead electrocardiogram delineation algorithm. Medical Engineering and Physics, 31(10), 1219–1227. Ghaffari, A., Homaeinezhad, M. R., Khazraee, M., & Daevaeiha, M. (2010). Segmentation of holter ECG waves via analysis of a discrete wavelet-derived multiple skewness-kurtosis based metric. Annals of Biomedical Engineering, 38(4), 1497–1510. Hu, Y. Z., Palreddy, S., & Tompkins, W. J. (1997). A patient-adaptable ECG beat classifier using a mixture of experts approach. IEEE Transactions on Biomedical Engineering, 44. 891, 900. Inan, O. T., Giovangrandi, L., & Kovacs, G. T. A. (2006). Robust neural-network-based classification of premature ventricular contractions using wavelet transform and timing interval features. IEEE Transactions on Biomedical Engineering, 53(12). Jekova, I., Bortolan, G., & Christov, I. (2008). Assessment and comparison of different methods for heartbeat classification. Medical Engineering and Physics, 30, 248–257.

2057

Jiang, W., & Kong, S. G. (2007). Block-based neural networks for personalized ECG signal classification. IEEE Transactions on Neural Network, 18(6). Kannathal, N., Lim, C. M., Rajendra Acharya, U., & Sadasivan, P. K. (2006). Cardiac state diagnosis using adaptive neuro-fuzzy technique. Medical Engineering and Physics, 28, 809–815. Kar, S., & Okandan, M. (2007). Atrial fibrillation classification with artificial neural networks. Pattern Recognition, 40, 2967–2973. Khadra, L., Al-Fahoum, A. S., & Binajjaj, S. (2005). A quantitative analysis approach for cardiac arrhythmia classification using higher order spectral techniques. IEEE Transactions on Biomedical Engineering, 52(11). Lagerholm, M., Peterson, C., Braccini, G., Edenbrandt, L., & Sörnmo, L. (2000). Clustering ECG complexes using hermite functions and self-organizing maps. IEEE Transactions on Biomedical Engineering, 47(7). Lin, C.-H. (2008). Frequency-domain features for ECG beat discrimination using grey relational analysis-based classifier. Computers and Mathematics with Applications, 55, 680–690. Lin, C.-H., Du, Y.-C., & Chen, T. (2008). Adaptive wavelet network for multiple cardiac arrhythmias recognition. Expert Systems with Applications, 34, 2601–2611. Lin, C.-H., Du, Y.-C., & Chen, T. (2009). Nonlinear interpolation fractal classifier for multiple cardiacarrhythmias recognition. Chaos, Solitons and Fractals, 42, 2570–2581. Liu, H., Sun, J., Liu, L., & Zhang, H. (2009). Feature selection with dynamic mutual information. Pattern Recognition, 42, 1330–1339. Mallat, S. (1999). A wavelet tour of signal processing. Academic Press. Minhas, F. A., & Arif, M. (2008). Robust electrocardiogram (ECG) beat classification using discrete wavelet transform. Physiological Measurement, 29, 555–570. Mohammadzadeh Asl, B., Kamaledin Setarehdan, S., & Mohebbi, M. (2008). Support vector machine-based arrhythmia classification using reduced features of heart rate variability signal. Artificial Intelligence in Medicine, 44, 51–64. Nilsson, M., Funk, P., Olsson, E. M. G., von Scheele, B., & Xiong, N. (2006). Clinical decision-support for diagnosing stress-related disorders by applying psychophysiological medical knowledge to an instance-based learning system. Artificial Intelligence in Medicine, 36, 159–176. Nopone, K., Kortelainen, J., & Seppanen, T. (2009). Invariant trajectory classification of dynamical systems with a case study on ECG. Pattern Recognition, 42, 1832–1844. Osowski, S., & Linh, T. H. (2001). ECG beat recognition using fuzzy hybrid neural network. IEEE Transactions on Biomedical Engineering, 48, 1265–1271. Osowski, S., Markiewicz, T., & Tran Hoai, L. (2008). Recognition and classification system of arrhythmia using ensemble of neural networks. Measurement, 41, 610–617. Owis, M. I., Abou-Zied, A. H., Youssef, A. M., & Kadah, Y. M. (2002). Study of features based on nonlinear dynamical modeling in ECG arrhythmia detection and classification. IEEE Transactions on Biomedical Engineering, 49(7). Ozbay, Y., Ceylan, R., & Karlik, B. (2006). A fuzzy clustering neural network architecture for classification of ECG arrhythmias. Computers in Biology and Medicine, 36, 376–388. Peng, H., Long, F., & Ding, C. (2005). Feature selection based on mutual information: Criteria of max-dependency max-relevance, and min-redundancy. IEEE Transactions on Pattern Analysis and Machine Intelligence, 27(8). Polat, K., & Gunes, S. (2007). Detection of ECG Arrhythmia using a differential expert system approach based on principal component analysis and least square support vector machine. Applied Mathematics and Computation, 186, 898–906. Polat, K., Kara, S., Güven, A., & Günes, S. (2009). Usage of class dependency based feature selection and fuzzy weighted pre-processing methods on classification of macular disease. Expert Systems with Applications, 36, 2584–2591. Polat, K., Sahan, S., & Gune, S. (2006). A new method to medical diagnosis: Artificial immune recognition system (AIRS) with fuzzy weighted pre-processing and application to ECG arrhythmia. Expert Systems with Applications, 31, 264–269. Povinelli, R. J., Johnson, M. T., Lindgren, A. C., Roberts, F. M., & Ye, J. (2006). Statistical models of reconstructed phase spaces for signal classification. IEEE Transactions on Signal Processing, 54(6). Rohani Sarvestani, R., Boostani, R., & Roopaei, M. (2009). VT and VF classification using trajectory analysis. Nonlinear Analysis, 71(12), 55–61. Sachse, F. B. (2004). Computational cardiology, modeling of anatomy, electrophysiology, and mechanics. Berlin, Heidelberg: Springer-Verlag Pub. Stridh, M., Sörnmo, L., Meurling, C. J., & Olsson, S. B. (2004). Sequential characterization of atrial tachyarrhythmias based on ECG time-frequency analysis. IEEE Transactions on Biomedical Engineering, 51(1). Tsipouras, M. G., Fotiadis, D. I., & Sideris, D. (2002). Arrhythmia classification using the RR-interval duration signal. In The proceeding of the computers in cardiology conference (pp. 485–488). Tsipouras, M. G., & Fotiadis, D. I. (2004). Automatic arrhythmia detection based on time and time-frequency analysis of heart rate variability. Computer Methods and Programs in Biomedicine, 74, 95–108. Tsipouras, M. G., Fotiadis, D. I., & Sideris, D. (2005). An arrhythmia classification system based on the RR-interval signal. Artificial Intelligence in Medicine, 33, 237–250. Tsipouras, M. G., Voglis, C., & Fotiadis, D. I. (2007). A framework for fuzzy expert system creation – Application to cardiovascular diseases. IEEE Transactions on Biomedical Engineering, 54(11). Wang, Y., Zhu, Y., Thakor, N. V., & Xu, Y. (2001). A short-time multifractal approach for arrhythmia detection based on fuzzy neural network. IEEE Transactions on Biomedical Engineering, 48(9). Wen, C., Lin, T. C., Chang, K. C., & Huang, C. H. (2009). Classification of ECG complexes using self-organizing CMAC. Measurement, 42, 399–407.

2058

M.R. Homaeinezhad et al. / Expert Systems with Applications 39 (2012) 2047–2058

Wiggins, M., Saad, A., Litt, B., & Vachtsevanos, G. (2008). Evolving a Bayesian classifier for ECG-based age classification in medical applications. Applied Soft Computing, 8, 599–608. Yeh, Y. C., Wang, W. J., & Chiou, C. W. (2009). Cardiac arrhythmia diagnosis method using linear discriminant analysis on ECG signals. Measurement, 42, 778–789. Yu, S. N., & Chen, Y. H. (2009). Noise-tolerant electrocardiogram beat classification based on higher order statistics of subband components. Artificial Intelligence in Medicine, 46, 165–178.

Yu, S. N., & Chou, K. T. (2007). A switchable scheme for ECG beat classification based on independent component analysis. Expert Systems with Applications, 33, 824–829. Yu, S.-N., & Chou, K.-T. (2008). Integration of independent component analysis and neural networks for ECG beat classification. Expert Systems with Applications, 34, 2841–2846. Yu, S. N., & Chou, K. T. (2009). Selection of significant independent components for ECG beat classification. Expert Systems with Applications, 36, 2088–2096.