Automatic detection and classification of life-threatening arrhythmia plays an important part in dealing with various cardiac conditions. In this paper, a novel method for classification of various types of arrhythmia using morphological and dynamic features is presented. Discrete wavelet transform (DWT) is applied on each heart beat to obtain the morphological features. It provides better time and frequency resolution of the electrocardiogram (ECG) signal, which helps in decoding important information of a quasiperiodic ECG using variable window sizes. RR interval information is used as a dynamic feature. The nonlinear dynamics of RR interval are captured using Teager energy operator, which improves the arrhythmia classification. Moreover, to remove redundancy, DWT subbands are subjected to dimensionality reduction using independent component analysis, and a total of twelve coefficients are selected as morphological features. These hybrid features are combined and fed to a neural network to classify arrhythmia. The proposed algorithm has been tested over MIT-BIH arrhythmia database using 13724 beats and MIT-BIH supraventricular arrhythmia database using 22151 beats. The proposed methodology resulted in an improved average accuracy of
Cardiac arrhythmias are a type of irregular heartbeats in which the heart rhythm is either too fast (tachycardia) or too slow (bradycardia). A small change in electrocardiogram (ECG) morphology or dynamics may lead to severe arrhythmia attacks, which can reduce the ability of the heart to pump blood and causes shorting of breath, pain in chest, tiredness, and loss of consciousness. There are several types of arrhythmia, and some of these are dangerous which may lead to cardiac arrest and sudden death if not detected and monitored in time [
A method for classification of sixteen types of arrhythmia based on ECG morphology and dynamics was proposed in [
Some techniques rely on fiducial features, which are temporal and dynamic features that directly depend upon the ECG characteristics, e.g., wave onset point, peaks (maxima/minima), and offset [
The extracted features have usually been analyzed either in time domain or frequency domain. Some of the most important time domain features, including RR interval, ST segment, and T height, require identification of key time points within the signal [
All methods discussed above have the following shortcomings: Performances of most of the methods have been tested only on smaller data sets, and there is a need to verify their performance on larger databases Selected classes of arrhythmia have been evaluated, and there is a need to test all arrhythmia classes The classification accuracy on sparsely occurring arrhythmia classes is not good
In this paper, a novel technique for ECG beat classification of arrhythmia is proposed that considers a hybrid of enhanced morphological and dynamic features to overcome these shortcomings. Morphological features are obtained using DWT on each heartbeat. The resulting features consist of DWT approximation coefficient and detail coefficients at level 4. Independent component analysis is applied on both approximation and detail coefficients independently to extract only important coefficients. In addition, four types of RR interval features are calculated to represent the dynamic features of ECG heartbeats. Moreover, to enhance the dynamic features of ECG heartbeats corrupted with Gaussian noise, Teager energy operator (TEO) [
The rest of the paper is organized as follows. Firstly, the proposed methodology is explained in detail in Section
The proposed methodology is presented in Figure
Block diagram of the proposed arrhythmia classification scheme using hybrid features.
Mostly ECG signals are affected by baseline wander or power line interface (PLI). Different methods were introduced to remove these types of noises from the ECG signal [
Three basic constituents of a heart cycle are QRS complex, T wave, and P wave, termed as fiducial points. The correct splitting of the ECG signal into heartbeat segments involves recognition of borders and peak locations of these fiducial points. The information about the R-peak locations given in the dataset was used to obtain these heartbeat segments. A single heartbeat consisted of 200 samples including the R-peak and the samples around the peak. This segment size contained maximum information of a single heartbeat and is shown in Figure
Heartbeat segmentation of ECG signal from MITDB database.
In feature extraction, improved features based on DWT, RR interval, and Teager energy operator were selected, which were able to represent the morphological and dynamic changes in the ECG signal with more significance.
Statistical features of biomedical signals usually change over position or time. Wavelet transform offers signal representation in both time and frequency domains, which makes it capable for analyzing quasiperiodic signals like ECG. Wavelet transform was employed in processing of the ECG signals for feature extraction [
The most commonly used wavelets which provide orthogonality properties are Daubechies, Coiflets, Symlets, and Discrete Meyer [
R is a point corresponding to the highest peak of the ECG waveform, and RR interval is the time between the successive QRS complexes. The ECG signal has a nonlinear dynamic behavior, and during arrhythmia, nonlinear dynamic components change more significantly than the linear counterparts. RR interval is simple, easy to calculate, and less prone to noise. Four types of RR interval features, namely, previous-RR, post-RR, average-RR, and local-RR interval, were derived from the RR sequence, to characterize the dynamic features of the heartbeat. The calculation of these features uses the following equations:
An independent analysis of RR interval does not capture the nonlinear nature of RR interval inconsistency. TEO was utilized to represent the nonlinear behavior of the RR interval, which is a nonlinear operator for energy tracking [
An artificial neural network consists of interconnected neurons which send and receive messages between each other. These interconnections are assigned weights, which represent a network state and are updated during the learning process. A feedforward neural network with 10 hidden layers was used for the classification of arrhythmia in this study. The network was implemented on MATLAB R2013a. The number of neurons in each hidden layer was limited to 50, which allowed training this network on a core-i5 CPU-based system with a RAM of 8 GB. An activation function based on rectified linear unit (ReLU) was used for the hidden layers, and a sigmoid function was used at the output layer. Back propagation with stochastic gradient decay was used for updating the network weights. The learning rate was optimized to a value of 0.63, using grid search for accuracy and to avoid over fitting.
The details of the dataset used and the experimental results are presented in the following subsections.
The MIT-BIH arrhythmia database (MITDB) [
Two different types of evaluation strategies were considered, namely, class-oriented [
In addition, subject-oriented strategy was also evaluated. All 126 records from both the datasets were divided into a similar training and testing ratio as for the class-oriented scheme, but performance was reported according to ANSI/AAMI EC57:1998 standard [
Mapping from MIT-BIH arrhythmia database (MITDB)/supraventricular arrhythmia database (SVDB) heartbeat classes to ANSI/AAMI heartbeat classes.
AAMI classes | MITDB/SVDB classes | Total |
---|---|---|
Nonectopic beat (N) | NOR, LBBB, RBBB, AE, NE | 30929 |
Supraventricular ectopic beat (S) | APC, AP, APB, NP, SP | 1538 |
Ventricular ectopic beat (V) | PVC, VE, VF | 2035 |
Fusion beat (F) | F | 14 |
Unknown beat (Q) | UN, FPN, PACE, |
1329 |
The ECG signal from MITDB and SVDB datasets are first denoised to remove baseline wander. The denoised signal was segmented into different heartbeats of same length (200 samples each) by using R-peak location information in the given annotations. In total, 35875 beats form both databases (13724 from MIT-BIH arrhythmia dataset and 22151 beats from MIT-BIH supraventricular arrhythmia dataset) were considered. FIR approximation of Mayers wavelet was applied on each heartbeat segment. ICA was applied on the resulting
A 3-fold cross-validation method was used for training and testing of the classifier. The complete dataset (
In class-oriented evaluation scheme, a neural network was trained to predict the class of test heartbeats among 18 different classes of arrhythmia. The specificity, sensitivity, and PPV of each individual class are summarized in Table
A summary of performance analysis of the proposed method on each arrhythmia class in the “class-oriented” scheme.
Fold I | Fold II | Fold III | Average | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Heartbeat type | Sp | Se | PPV | Acc | Sp | Se | PPV | Acc | Sp | Se | PPV | Acc | Sp | Se | PPV | Acc |
Normal beat (NOR) | 100 | 100 | 99.8 | 99.4 | 100 | 100 | 99.9 | 99.7 | 99.8 | 100 | 99.7 | 99.7 | 99.9 | 100 | 99.8 | 99.6 |
Atrial premature contraction | 100 | 97 | 100 | 100 | 100 | 96.5 | 100 | 100 | 100 | 97.5 | 100 | 100 | 100 | 97 | 100 | 100 |
Fusion of ventricular and normal beat | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 92.7 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 97.5 |
Left bundle branch block (LBBB) | 100 | 97.5 | 100 | 100 | 100 | 97 | 100 | 99.3 | 100 | 96.5 | 100 | 100 | 100 | 97 | 100 | 99.7 |
Unclassifiable beat (UN) | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 |
Right bundle branch block beat (RBBB) | 99.8 | 99.4 | 99.4 | 99.7 | 99.9 | 99.2 | 99.4 | 99.4 | 99.9 | 99.3 | 99.4 | 99.4 | 99.8 | 99.3 | 99.4 | 99.5 |
Premature ventricular contraction (PVC) | 100 | 99.1 | 99.6 | 99.7 | 100 | 99.2 | 99.6 | 99.5 | 100 | 99.3 | 99.6 | 99.6 | 100 | 99.2 | 99.6 | 99.6 |
Ventricular flutter wave (VF) | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 |
Aberrated atrial premature beat (AP) | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 |
Nodal (junctional) premature beat (NP) | 100 | 92.6 | 100 | 100 | 100 | 92.8 | 100 | 100 | 100 | 92.7 | 100 | 100 | 100 | 92.8 | 100 | 100 |
Atrial escape beat (AE) | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 |
Fusion of paced and normal beat (FPN) | 100 | 100 | 100 | 100 | 99.9 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 |
Isolated QRS-like artifact (Iso) | 99.9 | 100 | 97.2 | 100 | 99.9 | 100 | 98.1 | 100 | 99.9 | 99.1 | 99.1 | 99.1 | 99.9 | 98.1 | 98.1 | 99.5 |
Ventricular escape beat (VE) | 100 | 100 | 100 | 100 | 99.9 | 100 | 95.2 | 100 | 99.9 | 100 | 98.5 | 100 | 100 | 95.2 | 100 | 100 |
Nodal (junctional) escape beat | 99.9 | 100 | 95 | 100 | 99.9 | 100 | 97.5 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 |
Paced beat (PACE) | 99.9 | 100 | 99.2 | 100 | 100 | 100 | 100 | 100 | 99.9 | 100 | 99.6 | 100 | 100 | 99.2 | 100 | 100 |
Nonconducted P-wave (blocked APB) | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 |
Supraventricular premature beat (SP) | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 99.4 | 100 | 100 |
Average | 99.9 | 99.9 | 99.4 | 99.9 | 99.9 | 99.3 | 99.4 | 99.3 | 99.9 | 99.9 | 99.8 | 99.9 | 99.9 | 98.7 | 99.8 | 99.75 |
Confusion matrix for the proposed method using a neural network based classifier (class-oriented scheme).
Predicted labels | N | A | F | L | Q | R | V | ! | a | J | E | f | — | E | J | / | X | S |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||
N | 8656 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
A | 2 | 65 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
F | 0 | 0 | 14 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
L | 8 | 0 | 0 | 260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0 | 2 | 0 |
S | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 376 |
A comparison of the classification accuracy of the proposed approach and state-of-the-art methods based on class-oriented strategy is presented in Table
Comparison of the proposed scheme with state-of-the-art methods using class-oriented scheme.
Features | Dimension | Classes | Accuracy | Sensitivity | Specificity | PPV | |
---|---|---|---|---|---|---|---|
|
|
17 | 18 | 99.75 | 98.7 | 99.9 | 99.8 |
Zidelmal et al. [ |
Frequency content + RR + QRS | 13 | 2 | 97.2 | 99 | — | — |
Ye et al. [ |
WT + ICA + RR | 18 | 16 | 99.3 | 91.3 | — | — |
Ebrahimzadeh et al. [ |
HOS + timing interval | 24 | 5 | 95.18 | 95.61 | 98.8 | 90.6 |
Pathoumvanh et al. [ |
DCT | 5 | 5 | 99.11 | 97.01 | 99.44 | — |
Rabee and Barhumi [ |
Multi resolution WT | 251 | 14 | 99.2 | 96.2 | 100 | — |
Alajlan et al. [ |
HOS of 2nd-order-cumulant | 604 | 2 | 94.96 | 92.19 | 95.19 | — |
de Oliveira et al. [ |
Waveform + RR | — | 2 | 95 | 95 | 99.87 | 98 |
Li et al. [ |
Timing interval + waveform amplitude | — | 2 | 98.2 | 93.1 | — | 81.4 |
In subject-oriented scheme, results have reported according to the ANSI/AAMI standard. The specificity, sensitivity, PPV and accuracy of each individual class in ANSI/AAMI standard is shown in Table
Performance of the proposed method on each arrhythmia class in the “subject-oriented” scheme.
Fold I | Fold II | Fold III | Average | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Heartbeat type | Sp | Se | PPV | Acc | Sp | Se | PPV | Acc | Sp | Se | PPV | Acc | Sp | Se | PPV | Acc |
Nonectopic beats (N) | 99.9 | 100 | 94.2 | 100 | 99.7 | 99.9 | 99.8 | 99.9 | 100 | 100 | 99.8 | 100 | 99.9 | 99.9 | 97.9 | 99.9 |
Supraventricular ectopic beats (S) | 100 | 99.8 | 100 | 100 | 99.9 | 100 | 99.8 | 100 | 100 | 99.9 | 100 | 100 | 99.9 | 99.6 | 99.9 | 100 |
Ventricular ectopic beats (V) | 100 | 99.6 | 100 | 100 | 100 | 99.5 | 100 | 99.9 | 100 | 99.7 | 100 | 100 | 100 | 99.6 | 100 | 99.9 |
Fusion beats (F) | 99.9 | 100 | 99.9 | 100 | 99.9 | 100 | 92.8 | 98.9 | 99.9 | 100 | 100 | 100 | 99.9 | 100 | 97.6 | 99.6 |
Unclassifiable beats (Q) | 100 | 99.6 | 100 | 99.8 | 100 | 99.4 | 100 | 100 | 100 | 99.5 | 100 | 99.7 | 100 | 99.5 | 100 | 99.8 |
Average | 99.9 | 99.8 | 98.8 | 99.9 | 99.9 | 99.7 | 99.6 | 97.7 | 99.9 | 99.8 | 99.9 | 99.9 | 99.9 | 99.7 | 99.1 | 99.8 |
Confusion matrix for Fold II using NN (subject-oriented scheme).
Predicted labels | N | S | V | F | Q |
---|---|---|---|---|---|
|
|||||
N | 9280 | 1 | 0 | 0 | 0 |
S | 1 | 458 | 0 | 1 | 0 |
V | 2 | 0 | 604 | 0 | 0 |
F | 0 | 0 | 0 | 14 | 0 |
Q | 2 | 0 | 0 | 0 | 398 |
Comparison of the proposed scheme with state-of-the-art methods using subject-oriented scheme.
Features | Dimensions | Classes | Accuracy | Sensitivity | Specificity | |
---|---|---|---|---|---|---|
|
|
17 | 5 (18) | 99.8 | 99.7 | 99.9 |
Ye et al. [ |
WT + ICA + RR | 18 | 5 (16) | 86.4 | 91.3 | — |
Martis et al. [ |
DWT + ICA | 12 | 5 (15) | 99.28 | 97.97 | 99.83 |
Mar et al. [ |
RR interval series and WT | — | 3 | 93 | 80 | 82 |
de Lannoy et al. [ |
Waveform + HOS + RR | 249 | 5 (16) | 94 | — | — |
In this paper, a new technique for automatic heartbeat classification of all types of arrhythmia was presented. An improved hybrid feature representation of heartbeat segments was used based on a mixture of a set of derived morphological and dynamic features. The classification was done using twelve ICA projection coefficients computed from the DWT features, plus four RR interval features, and Teager energy value. Two types of evaluation schemes, class- and subject-oriented, were implemented for analyzing the system. On the standard benchmark of MIT-BIH arrhythmia database and MIT-BIH supraventricular arrhythmia database, an average accuracy of
The data used in this study are available for download at the physionet MIT-BIH website.
The authors declare that there are no conflicts of interest regarding the publication of this paper.
Syed Muhammad Anwar and Maheen Gul contributed equally to the study.