A Novel Feature Representation for Single-Channel Heartbeat Classification based on Adaptive Fourier Decomposition

A Novel Feature Representation for Single-Channel Heartbeat Classification based on Adaptive Fourier Decomposition

Chunyu Tan, Liming Zhang,  Hau-tieng Wu, and Tao Qian C. Tan and L. Zhang are with Faculty of Science and Technology, University of Macau, Macao, China. e-mail: (yb57416, lmzhang)@um.edu.mo. H. Wu is with Department of Mathematics and Department of Statistical Science, Duke University, Durham, NC, USA. e-mail: hauwu@math.duke.edu. T. Qian is with Macau Institute of Systems Engineering, Macau University of Science and Technology. e-mail: tqian@must.edu.mo.

This paper proposes a novel approach for heartbeat classification from single-lead electrocardiogram (ECG) signals based on the novel adaptive Fourier decomposition (AFD). AFD is a recently developed signal processing tool that provides useful morphological features, referred to as AFD-derived instantaneous frequency (IF) features, that are different from those provided by traditional tools. A support vector machine (SVM) classifier is trained with the AFD-derived IF features, ECG landmark features, and RR interval features. To evaluate the performance of the trained classifier, the Association for the Advancement of Medical Instrumentation (AAMI) standard is applied to the publicly available benchmark databases, including MIT-BIH arrhythmia database and MIT-BIH supraventricular arrhythmia database, to classify heartbeats from single-lead ECG. The overall performance in terms of sensitivities and positive predictive values is comparable to the state-of-the-art automatic heartbeat classification algorithms based on two-leads ECG.

Heart beat classification, Adaptive Fourier decomposition (AFD), instantaneous frequency (IF), time-frequency representation.

I Introduction

Cardiovascular diseases (CVDs) are leading causes of death worldwide. According to the report of the American Heart Association (AHA) in 2018, CVDs claimed 17.9 million lives in 2015, and this number will increase to 23.6 million by 2030 [1]. Among various CVDs, arrhythmia accounts for a large proportion, and an early diagnosis of arrhythmia is of great significance to healthcare professionals [2, 3].

Electrocardiogram (ECG) is an effective, noninvasive, and well established diagnostic tool for arrhythmia. To achieve early diagnosis of life-threatening arrhythmias, long-term monitoring is required. Thanks to the advances of technology, this can be achieved by wearable Holters or mobile devices. As manual diagnosis of recorded long-term ECG signals is time consuming and error prone, a reliable computerized interpretation of the ECG (CIE) [4], or at least a computer-aided automatic heartbeat annotation, has become increasingly important. Our focus in this article is a computer-aided automatic heartbeat annotation. While there have been several commercial automatic heartbeat annotation algorithms, however, in general they show substantial rates of misdiagnosis [4], even when they are applied to multiple-lead ECG used in the hospital. Clearly, when there is only a single-lead ECG, the performance is deteriorated since it is more challenging to determine the delineation of fiducial points. Wearable Holters and mobile devices that are commonly used for an early diagnosis of arrhythmia usually come with a single-lead ECG [3]. Thus, it is necessary to develop an accurate automatic heartbeat classification algorithm for a single channel ECG.

A successful ECG heartbeat classification usually comprises three important procedures: preprocessing, feature extraction, and classification. In addition to the learning algorithm, feature extraction and dimension reduction are key processes that significantly affect the classification performance [5]. There have been many automatic heartbeat classification algorithms, and they can be divided into two main categories based on how these three steps are carried out. The first category includes methods that are based on feature extraction and classifier training, and the second includes those based on the black-box deep learning approach [6, 7, 8].

I-a Related Works

For methods in the first category, feature extraction is a critical process in automatic ECG classification analysis. An effective feature extraction method cannot only simplify computation, but also generate a superior classification performance. ECG features commonly employed for classification task are based on ECG landmarks including P, Q, R, S and T; for example, the landmark morphology [9, 10] and intervals between landmarks [11]. Researchers also consider frequency domain features based on Fourier transform [12] and other features based on Hermite coefficients [13], principal component analysis (PCA) [14], and independent component analysis (ICA) [14], etc. Yet another set of features focus on the non-stationarity of the ECG into account, and researchers take the ECG time-frequency representation into; for example, short time Fourier transform (STFT) [15], continuous wavelets transform (CWT) [16], Wigner-Ville distribution [17], and synchrosqueezing transform [18]. Most studies choose support vector machine (SVM) as their classifier [14, 9, 18], while [11, 19] choose linear discriminant (LD).

The second category comprises deep learning based methods. Deep learning offers an integrated scheme that combines feature extraction and classification into one. Recently published deep learning approaches are summarized in Table I. In [6], the authors use a 34-layer deep convolutional neural network (CNN) model to detect arrhythmic heartbeats. P. Schwab et al. [20] build a diverse ensemble of recurrent neural network (RNN) and P. Warrick et al. [21] use a combination of CNN with a sequence of long short-term memory (LSTM) units. In [22], four types of normal beat, congestive heart failure beat, ventricular tachyarrhythmia beat and atrial fibrillation beat are classified by combining the Lyapunov exponents algorithm with RNN. Moreover, U. Acharya et al. [7] and M. Zubair et al. [23] develope a 9-layer and a 3-layer CNN method, respectively, whereas, Ö. Yildirim [24] construct the deep bidirectional LSTM network-based wavelet sequences (DBLSTW-WS) network. In [25], the application of the restricted Boltzmann machine (RBM) and the deep belief networks (DBN) is used for detecting ventricular and supraventricular heartbeats. However, as shown in Table I, comparison of the results across most of these deep learning approaches could not be performed due to inconsistent database and evaluation criteria. Even for the same database, the datasets used in deep learning are not the same.

There are more and more studies combining feature extraction and deep learning framework. For example, in [24], the DBLSTM-WS network is constructed by the wavelet-based layer and LSTM layers, and E. Übeyli [22] combines Lyapunov exponents algorithm with RNN. S. Mathews et al. [25] and G. Sannino et al. [26] take standard features, such as RR interval features, segmented morphology features and heartbeat interval features into account in their deep neural network framework.

While there have been a lot of progress and successes by methods in the second category, deep learning is regarded as black box without rigorous theoretical support. Moreover, no standard methodology exists for the construction of an optimal neural network and a lot of try-and-error with human intervention is needed. For [7], [26] and [25] in Table I, the authors build their network empirically by performing a wide set of trials, manually configuring the network by changing the parameters of the number of hidden layers, the activation function, the number of learning steps, and the number of neurons making up each layer.

Reference Year Database Data size Method Evaluation Scheme
U. Acharya et al. [7] 2017 MIT-BIH arrhythmia 452960 (# beats) CNN intra-patient paradigm
Ö. Yildirim [24] 2018 MIT-BIH arrhythmia 7326 (# beats) DBLSTM-WS intra-patient paradigm
S. Mathews et al [25] 2018 MIT-BIH arrhythmia – (# beats) RBM, DBM inter-patient paradigm
G. Sannino et al [26] 2018 MIT-BIH arrhythmia 4567 (# beats) DNN inter-patient paradigm
M. Zubair et al [23] 2016 MIT-BIH arrhythmia 100389 (# beats) CNN patient-specific paradigm
Awni Y. Hannun et al [6] 2019 private 91232 (# records) CNN F1 score
P. Schwab et al [20] 2017 the physionet challenge 2017 12186 (# records) RNN F1 score
P. Warrick et al [21] 2017 the physionet challenge 2017 12186 (# records) CNN+LSTM F1 score
TABLE I: Summary of published deep learning approaches. (# beats: number of heartbeats used, # records: number of records used.)

I-B Our contribution

In this paper, we construct an accurate automatic heartbeat classifier with rigorous mathematical support, which belongs to the first category of methods. Our approach is motivated by viewing the limitations of existing time-frequency analysis approaches mentioned above [15, 17, 27, 18]. Specifically, the ambiguity caused by the uncertainty principle [28] in STFT [15] and CWT [18] is inevitable, which might mask important heartbeat information. The Wigner distribution [17] suffers from the cross-term problem [29]. While synchrosqueezing transform [18] might help eliminate above problems, the computational complexity is not trivial and makes it unsuitable for a real-time implementation. We thus consider a nonlinear type time-frequency analysis, the adaptive Fourier decomposition (AFD) [30, 27], to alleviate the limitations of the above-mentioned time-frequency analysis approaches.

AFD is a novel signal processing technique with a rigorous mathematical foundation, which generalizes the traditional Fourier decomposition by taking the Blaschke decomposition theory in complex analysis into account. It decomposes a given signal by adaptively choosing its associated basis from the Takenaka-Malmquist (TM) system [31, 32] into a series of mono-components [33, 34]. By achieving maximal energy gain in each decomposition iteration, the AFD decomposes a signal into a few constitutional components called mono-components. Those mono-components possess positive instantaneous frequencies (IF) and there is no intersection among all IFs [35, 30]. The positive IFs effectively reflect the time-varying characteristics of signals, such as the morphology of heartbeats. These IF-based features are used to design an automatic heartbeat classification algorithm. Specifically, we train a SVM classifier by taking these IF-based features and some basic landmark features into account. We mention that AFD can be applied to other biomedical signal analysis; for example, it has been successfully applied to the ECG signal compression problem [36, 37].

To validate the proposed automatic heartbeat classifier, an inter-patient cross validation paradigm is applied. The Association for Advancement of Medical Instrumentation (AAMI) standard [38, 39] along with the benchmark MIT-BIH arrhythmia database from Physionet [40] are used for a comprehensive comparison with other ECG classification methods. Moreover, the combination of MIT-BIH arrhythmia database and MIT-BIH supraventricular arrhythmia database from Physionet [40] is considered to train our final classifier.

I-C Organization

The rest of the paper is organized as follows: the mathematical background of the proposed automatic feature representation and extraction are elaborated in Section II; Section III details the proposed method adopted for the classification problem; the results of the classification performance are presented in Section IV and comparisons with state-of-the-art algorithms are discussed in Section V, with the conclusion provided in Section VI.

Fig. 1: The flowchart of AFD with a real ECG signal. The black and red curves denote the real and imaginary parts of a complex signal, respectively. Note that , where , are shown as red dots in those plots showing , where . In the time-frequency representation shown in the right bottom subplot, note that the instantaneous frequencies of all decomposed components are shown together.

Ii Mathematical Foundation

Fig. 2: Overview of the proposed automatic heartbeat classification algorithm.

Ii-a AFD-based time-frequency representation

Take a set of complex numbers , where is the unit disc and may repeat. The TM system [31, 32] associated with is defined as , where


and . is referred to as a modified Blaschke product, while is the usual Blaschke product. In the literature, the term in (1) is called the evaluator at . It can be shown that the TM system is an orthogonal system. We call a TM system adaptive if we select according to the input signal.

Take a real-valued function , where is the unit circle. The associated analytic signal, , is defined as


where is the -th Fourier coefficient, and is the Hilbert transform.

For the analytic signal , AFD conducts fast converging expansion of in orthogonal terms of the form


under a selection of the parameters , by maximal selection principle [33], where is the n-th coefficient of .

By denoting


where is called the decomposition level and is called the AFD-approximation of degree . Then, we have


It was proved in [33] that converges to in the convergence sense; that is, as . See Fig. 1 for a detailed illustration of the AFD for the ECG signal.

By (2), clearly


where means taking the real part. is the approximation of . We mention that theoretically might be deviated from . Thus, an accurate approximation of by does not mean an accurate approximation of by . When is an ECG signal we have interest, empirically we see that approximates accurately. See Figure 4 for examples when . On the other hand, since our purpose is feature extraction, an accurate approximation of is not critical for our application.

To visualize how a given real-valued signal oscillates, it is natural to consider a time-frequency representation. There are several different approaches to generate time-frequency representations of a given signal, ranging from linear to non-linear types [28, 29]. For the AFD, we consider the following approach to construct the time-frequency representation. Denote , to be the -th level AFD of . If , where is the time, the transient time-frequency representation of proposed in [30, 27] is then defined as


where is the frequency, and is the distributional Dirac function [30]. Note that can be numerically plotted as an image for the purpose of visualization as shown in Fig. 1.

Ii-B The instantaneous frequency (IF) feature

A function is called a mono-component if and a.e. [41, Definition 1.1]; that is, it has well defined non-negative analytic phase derivatives. The non-negative analytic phase derivative is the IF of .

According to (4) and (7), if , by a direct calculation, we have


where . We view the IF function as a feature of the given signal. In our application, if represents the location of a R-peak, we call the -th R-peak IF feature of that heartbeat. For the decomposition level , we call the vector the R-peak IF feature vector of a given heart beat. The process of extracting the R-peak IF feature vector is described in Fig. 3.

Fig. 3: Process of extracting IF feature vectors.
Heartbeat types N L R A a J S V F e j E Q
Heartbeat classes N N N S S S S V F N N V Q Total
All records 74173 8038 7233 2535 149 84 2 6730 801 14 223 106 15 100103
DS1 37917 3933 3764 807 99 33 2 3648 423 14 12 105 8 50765
DS2 36256 4105 3469 1728 50 51 0 3082 378 0 211 1 7 49338
TABLE II: Relationship between heartbeat types in the MIT-BIH arrhythmias database and heartbeat classes in the AAMI standard as well as the number of heartbeats in the training and testing sets. (N: normal; L: left bundle branch block; R: right bundle branch block; A: atrial premature; a: aberrated atrial premature; J: nodal (junctional) premature; S: supraventricular premature or ectopic; V: premature ventricular contraction; F: fusion of ventricular and normal; e: atrial escape; j: nodal (junctional) escape; E: ventricular escape; Q: unclassifiable beat.)

Ii-C A related approach

The applied AFD is directly related to the Blaschke decomposition (BKD) algorithm considered in [42, 35, 43], and a side-by-side comparison would highlight the essence of the proposed algorithm. The main difference between AFD and BDK is the usage of the TM system. In BDK, instead of applying the maximal selection principle, it is that is considered to produce zeros inside the unit disk, which leads to the next decomposition. Also, the BKD is applied at each decomposition step. As is developed in [35], the decomposed components all have positive IF. After its appearance in [35], several studies have attempted to explore the properties of BKD. For example, R. Coifman et al. [42] investigated the unwinding property and the convergence behavior of BKD; in [45, 43, 44], BKD is explored from an algorithmic perspective guided by theoretical development; in [46, 47], the fundamental root distribution properties associated with BKD were studied. These developed theories are all directly related to the AFD. Finally, while we do not yet have theoretical support, numerically, overall, the behavior of the AFD and BKD is “similar” with a delicate difference.

Iii Materials and Methods

Iii-A Dataset

The well-known MIT-BIH arrhythmia database111http://www.physionet.org/physiobank/database/mitdbl from Physionet [40] is used for training and testing purposes. The MIT-BIH arrhythmia database contains 48 recordings of approximately 30 minutes, each of which has two leads, lead A and lead B. In 45 recordings, lead A is MLII (modified lead II), and lead B is mainly V1, but sometimes V2, V4 or V5; in the remaining 3 recordings, lead A is V5 and lead B is V2 or II. The signals are sampled at Hz. We use lead A in this work for the automatic heartbeat classification. Not all recordings are the same in virtue of the arrhythmia and physical limitation of the subjects. Twenty-three recordings serve as representative samples of routine clinical recordings, and 25 recordings contain complex ventricular, junctional and supraventricular arrhythmias. The database comes with experts’ annotation. The annotations follow the AAMI standard [38, 39], which further categorizes beat types into different classes, as is shown in Table II. Specifically, the N class contains beats originating in the sinus node (normal and bundle branch block beat types); the S class contains supraventricular ectopic beats; the V class contains ventricular ectopic beats; the F class contains beats that result from fusing normal and ventricular ectopic beats; the Q class contains unknown beats, including paced beats. In this work, the Q class is discarded according to the recommended practice since it is marginally represented in the database. The provided experts’ annotations are used as the standard to evaluate the performance of classification result.

In addition to the MIT-BIH arrhythmia database, the MIT-BIH supraventricular database222http://www.physionet.org/physiobank/database/svdb is used to alleviate the imbalanced classes issue when working with the MIT-BIH arrhythmia database. Specifically, there are limited beats of type S in the MIT-BIH arrhythmia database. The MIT-BIH supraventricular database consists of 78 recordings of approximately 30 minutes sampled at 128 Hz, each of which has two leads. The ECG recordings are resampled to 360 Hz to match the sampling rate of the MIT-BIH arrhythmia database. Based on the AAMI standard and the provided labels, there are 12,148 beats of class S, which are used to train the automatic heartbeat classifier.

Iii-B Heart beat classification algorithm

We assume that the input ECG signal is sampled at 360 Hz. The proposed automatic heartbeat classification algorithm consists of three steps, namely, preprocessing, feature extraction and classifier construction. In the first step, the raw ECG signals are divided into heartbeat segments following the standard R peak detection algorithm. Next, the AFD is applied to generate the IF feature vector for each heartbeat segment. A set of commonly applied landmark features, including the QRS duration, R-peak amplitude and RR-interval, are also derived. Finally, a SVM classifier is trained for the purpose of classification. See Fig. 2 for an illustration of the proposed algorithm.

Iii-B1 Preprocessing

The preprocessing stage consists of R peak detection and heartbeat segmentation. Since the R peak detection is not the focus of this work, the R peak annotations provided in the MIT-BIH arrhythmia database are used for the heartbeat segmentation. For each detected R peak, 100 sampling points before the R peak location and 200 sampling points after it are selected to construct an associated heartbeat segmentation. Considering that the sample rate is 360Hz, a heartbeat segmentation is approximately 0.83s. Note that due to the fundamental property of AFD, the denoising step and the detrending step commonly considered in the preprocessing process of most methods are not needed.

Fig. 4: Results of AFD-approximation and the associated time-frequency representations of four different heartbeat classes. The decomposition level is . Black lines represent the original heart beats and red dotted lines represent the respective approximation.

Iii-B2 Feature extraction

For each heartbeat segment, the AFD is applied with the decomposition level . is chosen so that the decomposed mono-components well recover the heartbeat segment. Thus, each heartbeat segment is decomposed into nine mono-components since the first mono-component is trivial by the choice of . The IFs of these nine mono-components at the R peak locations are chosen as features of each heartbeat segment; that is, the R-peak IF feature vector is . The distributions of nine R-peak IF features of the N, S, V, and F class are graphically represented in Fig. 5. Visually we see that the IF feature vectors are discriminative representations of the heartbeat types. Moreover, we consider another five features to capture the morphological information related to the P wave. In general, the PR interval ranges from 0.12 to 0.2 seconds but not fixed. Thus, for each heartbeat segment, the IFs at the 50th samples before the R peak location of the first five mono-components are considered; that is, , which we call the P-wave IF feature vector.

In addition, landmark features and dynamic features that have been clinically studied with stipulated diagnostic standards [48] were also chosen. In total, we have features for each heartbeat segment, which are listed in Table III.

Features Description
R-peak IF feature vector AFD-derived IFs at R peaks.
P-wave IF feature vector AFD-derived IFs at P waves.
QRS duration Duration of the QRS complex.
R-peak amplitude Amplitude of the R point location.
Pre-RR intervals time difference between current
and previous beat at R-peak.
Post-RR intervals time difference between current
and the next beat at R-peak.
Local-RR intervals Average R peak to R peak
interval over 10 beats.
TABLE III: The feature set in this study.
Fig. 5: Boxplots of the distribution of IFs of nine mono-components obtained by AFD at R locations for the main beat types presented in the MIT-BIH database. Note that we set all for N=1 and omit it. N: N class; S: S class; V: V class; F: F class.

Iii-B3 Classifier

We consider the widely applied classifier with solid theoretical foundation, kernel SVM [49], to establish the heartbeat classification model. The radial basis function (RBF) kernel is considered in this work, which is defined as


where is the bandwidth, and , are the feature vectors of the th and th heartbeat segment, respectively. Numerically, the libsvm library [50] is applied to implement the kernel SVM. Libsvm possesses a flexible interface and supports multi-class classification by one-versus-one approach. Since the training data from the MIT-BIH arrhythmia database is imbalanced, the weighted SVM classifier is trained. Specifically, we add each class a weight to penalize the class according to its prevalence to relieve the problem generated by the imbalance of the training dataset.

Iii-C Inter-patient cross validation

To evaluate the performance of the proposed algorithm, cross validation (CV) is performed. Numerous works report that automatic heartbeat classification can be categorized into two types of CV, namely the intra-patient CV or inter-patient CV. When the training and testing sets contain heartbeats from the same subjects, it is called the intra-patient CV, otherwise it is known as the inter-patient CV [11, 18, 51]. Intra-patient CV has been widely adopted in most works and achieves optimistic results, but it is not suitable for real situations. Following the state-of-the-art approaches [11, 51, 18], the inter-patient CV is performed in this study.

The whole MIT-BIH arrhythmia database is divided into the training set (DS1) and the test set (DS2) [11], so that DS1 and DS2 are from recordings from different patients. Note that the total number of beats from DS1 and DS2 in this study are slightly different from [11]. The first 10 beats from each recording are dropped, because the Local-RR intervals are calculated by the average of the previous 10 beats. This value starts to be calculated from the 11th beats. We also drop the last beat, as there is no Post-RR interval for this beat. At last, we have total 100103 beats in our study (comparing 100731 beats in [11]).

We consider the following two models. To get the first model, the classifier is trained on all features listed in Table III and annotations from DS1. The optimal parameters for the weighted kernel SVM are determined by the grid optimization method by applying the 10-fold CV. The established SVM classifier is then validated on DS2. To get the second model, the classifier is trained all features listed in Table III and annotations from DS1 and the heartbeats in the S class from the MIT-BIH supraventricular database, and then assessed on DS2. See Fig. 6 for an illustration of the two CV schemes, in which the black block diagram shows the process of the first stage and the second stage is presented by the blue block diagram.

Iii-D Performance Evaluation

The confusion matrix shows a detailed distribution of the classification results achieved by a classifier, hence an evaluation of the performance of a classifier. When labels are involved in the classification, the confusion matrix is a square matrix. Denote to be the -th entry of the confusion matrix. The sensitivity (Se) and positive predictivity (+P) for the k-th class is defined as


respectively. The overall accuracy (Acc) is denoted as

Fig. 6: Visualization process for the performance assessment of the classifier.

Iv Results

Regarding the AFD-based time-frequency representation of ECG signals, Fig. 4 shows the results for four heartbeat segments from different classes, including the AFD-approximation of degree and their respective time-frequency representations.

For the first model, the optimal parameters for the kernel SVM classifier determined from DS1 are , , , , and , where , , and are weights for classes N, S, V, F respectively. The confusion matrix is shown in Table IV. This classifier assessed on DS2 achieves a 84.92% overall accuracy and sensitivity of 85.48%, 78.08%, 81.19% and 83.33% for the F, N, S, and V class respectively. As shown in Table IV, the performance of the S class is slightly poor and improving it is challenging, mainly due to the imbalanced dataset issue.

For the second model, the optimal parameters were found to be , , , , and . The confusion matrix is shown in Table V and the final performance of the SVM classifier testing on DS2 had an 85.02% overall accuracy. The detailed Se and +P of each class are shown in Table VI. Note that with the help of the MIT-BIH supraventricular database, the result of the S class is improved, and hence the overall performance.

Reference N 37647 3625 260 2509
S 339 1428 61 1
V 61 415 2503 104
F 36 5 22 315
TABLE IV: Confusion Matrix 1.
Reference N 37681 3555 231 2574
S 299 1470 58 2
V 67 433 2477 106
F 38 7 20 313
TABLE V: Confusion Matrix2.

V Discussion

We propose a novel signal feature representation approach, which is applied to extract time-frequency features from the ECG signal for the automatic heartbeat classification. The proposed algorithm is trained and validated on publicly available databases with the inter-patient CV.

N S V F Tot.
Method # leads #features Se +P Se +P Se +P Se +P Acc
P. De Chazal et al [11] 2 52 86.9 99.2 75.9 38.5 77.7 81.9 89.43 0.08 81.9
M. Llamedo et al [19] 2 39 77.55 99.47 76.46 41.34 82.94 87.97 95.36 4.23 78.0
C. Ye et al [14] 2 132 88.5 97.5 60.8 52.3 81.5 63.1 19.6 2.5 86.4
Z. Zhang et al [9] 2 46 88.9 99.0 79.1 36.0 85.5 92.8 93.8 13.7 86.7
C. Herry et al [18] 1 6 83.13 98.93 81.14 31.93 77.50 79.05 83.25 6.91 82.70
S. Chen et al [52] 1 33 98.4 95.4 29.5 38.4 70.8 85.1 - - 93.1
U. Acharya et al [7] 1 - 91.64 85.17 89.04 94.76 95.08 95.21 94.69 93.47 93.1
S. Mathews et al [25] 1 26 - - 88.39 33.63 77.74 69.2 - - -
Proposed method 1 19 85.56 98.94 80.37 26.9 80.34 88.91 82.80 10.45 85.02
2 38 86.67 98.97 80.92 27.02 80.17 90.32 81.22 12.09 86.02
TABLE VI: Comparison of the proposed method with previous works. (# leads: number of ECG leads used; # features: number of features extracted.)

V-A Performance comparison

A comparison of the proposed algorithm with the state-of-the-art algorithms is shown in Table VI. All results shown in Table VI are trained and validated on the MIT-BIH arrhythmia database. Moreover, except [7], all studies comply with the AAMI standard and follow DS1 and DS2 division schemes proposed in [11] as we do.

The first six methods in Table VI are traditional methods, and the latter two are deep learning approaches. The methods proposed in [52] and [18] depend on only a single ECG lead, while other methods [11, 19, 14], and [9] depend on two-lead ECG signals. In the traditional methods, for the feature extraction, [11] and [19] consider RR interval, ECG landmark features such as QRS duration, T-wave duration, P-wave flag, 2D vectocardiogram (VCG) loop and others, heartbeat segmentation information of P, QRS, T-wave onset, offset points and so on, as their features, whereas [14] and [9] consider a combination of landmark and dynamic features, wavelets, ICA and RR interval as their features. The phase information determined by the synchrosqueezing transform is taken as a feature in [18]. The feature selection is conducted in [9] to determine the best features. A random projection was considered in [52] to determine the final features. Then, [11] and [19] choose LD as their classifiers, while the others choose SVM. For the deep learning approaches, [25] used the RBM and the DBN after extracting feature sets of RR intervals, heart-beat intervals, and segmented morphology, while [7] developed a 9-layer DNN for the ending-to-ending learning.

As observed in Table VI, the proposed classification model achieves a balanced classification rate. The sensitivity of all beat classes is over 80% and the overall accuracy is also greater than 85%. The overall accuracy of [52] was up to 93.1%, which at first glance is better than ours, but the authors neglect classes of small sizes; specifically, the heartbeats in the F class are not considered in the analysis, and the overall accuracy of the S class is not ideal. As the purpose of the proposed automatic heartbeat classification is detecting various kinds of non-lethal arrhythmia, we consider our result better. [7] achieved a 93.47% accuracy, in which synthetic data is used to overcome the classes imbalance. Besides, its experimental scheme is not inter-patient CV, so its performance in the inter-patient CV scheme is not clear.

The results reported in [14] and [9] are over 86%, which are better than our performance. This is expected since two leads and more features ([14] uses 132 initial features and [9] uses 46 features) are used in these papers. However, the sensitivity of the F class is only 19.6%, with the positive predictivity % in [14]. The result in [9] is more balanced and closer to ours, but compared with our approach, they use a complicated feature ranking approach for selecting features and dimension reduction. The purpose of [25] is to classify two abnormal heartbeats of S class and V class. Although the performance of S class and V class is excellent, the overall accuracy from the confusion matrix provided in [25] is below 80%. We thus consider our approach superior.

In order to compare the multi-lead methods from Table VI, we also show the results from training the classifier using the merged decision by the features described in Section 5. The features are extracted form both channels of the aforementioned databases, and the results are shown in Table VI. The overall accuracy is greater than 86% and the sensitivity of all beat classes is over 80%.

In conclusion, among the compared algorithms, the proposed method yields comparable performance, in terms of overall accuracy, as well as the V, S and F classes.

V-B Imbalanced dataset

The imbalanced dataset issue is challenging to all automatic heartbeat classification methods. As considered in [19], perhaps the division of DS1 and DS2 is not suitable for certain beat classes. For example, the atrial premature beats of one record in DS2 account for more than half of the S class. In this work, the weighted kernel SVM is considered, and an extra database is taken into account to alleviate the imbalanced dataset issue.

V-C Real-time implementation

The proposed classifier is trained on a computer with 16 GB RAM and 2.71 GHz Intel core i5 processor. The algorithm is developed in MATLAB R2016a. It takes approximately 81.83 seconds to complete one training process. Once the training of ECG signals is complete, the classification of ECG heartbeat is fast. The critical step in the proposed classification system is the feature extraction based on the AFD. The computation complexity of the AFD algorithm is [53] and the computation time of the AFD with is s. Note that this time is much shorter than the time needed to finish one heartbeat, even when the heart rate is as fast as 180 beats per minute. Thus, the proposed algorithm has the potential for a real-time monitoring system. Real-time implementation will be the focus of future work. Since none of the traditional methods shown in Table VI provide the training time, a comparison cannot be made. Deep learning requires a long training time and a specialized hardware, such as GPU, to efficiently train the algorithm. For example, the CNN in [7] is trained with two Intel Xeon 2.40 GHz (E5620) processors and 24GB of RAM, which takes approximately 9,573.2 seconds to complete one training epoch.

V-D Limitations and Future work

The proposed approach has some limitations. The data is from a publicly available database that is not collected from equipment tailored for telemedicine. Also, the database size is limited. Therefore, a larger database collected from professional mobile devices for the telemedicine is needed to confirm the practical performance of the proposed algorithm.

We focus only on the ECG signal in this paper, while the proposed algorithm has the potential to be applied to other biomedical signals, which will be explored in future work. Furthermore, the possibility of extracting features from AFD to train the deep learning framework to improve the overall performance will be considered in the future study.

Vi Conclusion

This paper presents a novel automatic heartbeat classification based on the recently developed signal processing tool, AFD, which is applied to capture morphological characteristics of the ECG signal from a complex analysis perspective. The SVM classifier is considered for automatic classification, with input features including AFD-derived IFs, amplitude at R-peak location, QRS duration, and three RR interval features. The heartbeat classification performance on the MIT-BIH arrhythmia database is compatible with other state-of-the-art methods that depend on a huge number of features and/or multi-lead ECG. This method has the potential to be used in an ambulatory ECG monitoring device or a mobile health device for real-time diagnosis of non-life threatening arrhythmias.


This study is supported by the research grants:The Science and Technology Development Fund of Macao SAR FDCT 079/2016/A2, 0123/2018/A3, and MYRG2017-00218-FST.


  • [1] J. Emelia, et al., “Heart Disease and Stroke Statistics —2018 Update: A Report From the American Heart Association,” Circulation, Originally published January 31, 2018.
  • [2] L. Benito, et al., “EARLY: a pilot study on early diagnosis of atrial fibrillation in a primary healthcare centre,” EP Europace, Vol. 17, No. 11, 2015, pp. 1688-1693,
  • [3] S.R. Steinhubl, et al., “Effect of a Home-Based Wearable Continuous ECG Monitoring Patch on Detection of Undiagnosed Atrial Fibrillation: The mSToPS Randomized Clinical Trial,” JAMA, Vol. 320, No. 2, 2018, pp. 146-155.
  • [4] J. Schläpfer and H. J. Wellens, “Computer-interpreted electrocardiograms: benefits and limitations”, J. Am. Coll. Cardiol. 70, 1183–1192, 2017.
  • [5] E. H. Houssein and M. Kilany. “ECG signals classification: a review”, Int. J. Intelligent Engineering Informatics, Vol. 5, No. 4, 2017, pp.376-396.
  • [6] Awni Y. Hannun, et al, ”Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network.“ Nature medicine, vol. 25, no. 11, pp. 65, 2019.
  • [7] U. Acharya, et al., “A deep convolutional neural network model to classify heartbeats,” Computers in biology and medicine., vol. 89, pp. 389-396, 2017.
  • [8] Z. Xiong, et al., “ECG signal classification for the detection of cardiac arrhythmias using a convolutional recurrent neural network,” Physiological measurement., 2018.
  • [9] Z. Zhang, J. Dong, X. Luo, et al., “Heartbeat classification using disease-specific feature selection,” Comput. Biol. Med., vol. 46, pp. 79-89, 2014.
  • [10] M. Llamedo, and J. Martinez, “An automatic patient-adapted ECG heartbeat classifier allowing expert assistance,” IEEE Trans. Biomed. Eng., vol. 59, no. 8, pp. 2312-2320, 2012.
  • [11] P. De Chazal, M. Dwyer, and R. Reilly, “Automatic classification of heartbeats using ECG morphology and heartbeat interval features,” IEEE Trans. Biomed. Eng., vol. 51, no. 7, pp. 1196-1206, 2004.
  • [12] H. Gothwal, S. Kedawat, and R. Kumar, ”Cardiac arrhythmias detection in an ECG beat signal using fast fourier transform and artificial neural network.“ Journal of Biomedical Science and Engineering., vol. 4, no. 04, pp. 289, 2011.
  • [13] S. Hemant, and K. Sharma, “An algorithm for sleep apnea detection from single-lead ECG using Hermite basis functions,” Computers in biology and medicine, vol. 77, pp. 116-124, 2016.
  • [14] C. Ye, V. Bhagavatula, and M. Coimbra, “Heartbeat classification using morphological and dynamic features of ECG signals,” IEEE Trans. Biomed. Eng., vol. 59, no. 10, pp. 2930-2941, 2012.
  • [15] G. Lee, et al, ”Gabor feature extraction for electrocardiogram signals.“ 2012 IEEE Biomedical Circuits and Systems Conference (BioCAS). IEEE, 304-307, 2012.
  • [16] P. S. Addison, “Wavelet transforms and the ECG: a review,” Physiological measurement, vol 26.5, pp. R155, 2005.
  • [17] R. Abeysekera, et al, R, ”Time-frequency domain features of ECG signals: Their application in P wave detection using the cross Wigner-Ville distribution.“ International Conference on Acoustics, Speech, and Signal Processing,. IEEE, 1524-1527, 1989.
  • [18] C. Herry, M. Frasch, A. Seely, and H. Wu, “Heart beat classification from single-lead ECG using the synchrosqueezing transform,” Physiological measurement., vol. 38, no. 2, pp. 171, 2017.
  • [19] M. Llamedo, and J. Martinez, “Heartbeat classification using feature selection driven by database generalization criteria,” IEEE Trans. Biomed. Eng., vol. 58, no. 3, pp. 616-625, 2011.
  • [20] P. Schwab, G.C. Scebba, J. Zhang, M. Delai, W. Karlen, “Beat by Beat: Classifying Cardiac Arrhythmias with Recurrent Neural Networks.” Computing, 44, 1, 2017
  • [21] P. Warrick, M.N. Homsi, “Cardiac Arrhythmia Detection from ECG Combining Convolutional and Long Short-Term Memory Networks.” Computing, 44, 1, 2017.
  • [22] E. Übeyli, “Recurrent neural networks employing Lyapunov exponents for analysis of ECG signals.” Expert systems with applications., vol. 37, no. 2, pp. 1192-1199, 2010.
  • [23] M. Zubair, J. Kim, and C. Yoon, “An automated ECG beat classification system using convolutional neural networks.” 2016 6th International Conference on IT Convergence and Security (ICITCS). IEEE, 2016.
  • [24] Ö. Yildirim, “A novel wavelet sequence based on deep bidirectional LSTM network model for ECG signal classification.” Computers in biology and medicine, 96, 189-202, 2018.
  • [25] S. Mathews, C. Kambhamettu, and K. Barner, “A novel application of deep learning for single-lead ECG classification,” Computers in biology and medicine., vol. 99, pp. 53-62, 2018.
  • [26] G. Sannino, and G. De Pietro, “A deep learning approach for ECG-based heartbeat classification for arrhythmia detection,” Future Generation Computer Systems., vol. 86, pp. 446-455, 2018.
  • [27] L. Zhang, T. Qian, W. Mai, and P. Dang, “Adaptive Fourier decomposition-based Dirac type time-frequency distribution,” Mathematical Methods in the Applied Sciences., vol. 40, no. 8, pp. 2815-2833, 2017.
  • [28] B. Ricaud, B. Torresani, “A survey of uncertainty principles and some signal processing applications”. Advances in Computational Mathematics, 40(3), 629-650, 2014.
  • [29] P. Flandrin, “Time-Frequency/Time-Scale Analysis,” Wavelets Analysis and its Application., London: Academic, 1999.
  • [30] P. Dang, T. Qian, and Y. Guo, “Transient time-frequency distribution based on mono-component decompositions,” International Journal of Wavelets, Multiresolution and Information Processing, vol. 11, no. 3, 2013.
  • [31] S. Takenaka, “On the orthogonal functions and a new formula of interpolation,” Japanese J. Math., vol. 2, pp. 129-145, 1925.
  • [32] F. Malmquist, “Sur la détermination d’une classe de fonctions analytiques par leurs valeurs dans un ensemble donné de poits,” C.R. 6ieḿe Cong. Math. Scand. (Kopenhagen, 1925), Copenhagen, 1926, Gjellerups, pp. 253-259.
  • [33] T. Qian and B. Wang, “Adaptive decomposition into basic signals of non-negative instantaneous frequancies–A variation and realization of greedy algorithm,” Adv. Comput. Math.vol. 34, no. 3, pp. 279-293, 2010.
  • [34] T. Qian, H. Li, and M. Stessin, “Comparison of Adaptive Mono-component Decompositions,” Nonlinear Analysis: Real World Applications. vol. 14, no. 2, pp. 1055-1074, 2013.
  • [35] M. Nahon, “Phase Evaluation and Segmentation,” PhD Thesis, Yale University, New Haven. 2000.
  • [36] J. Ma, T. Zhang, and M. Dong, “A novel ECG data compression method using adaptive Fourier decomposition with security guarantee in e-Health applications,” IEEE J. Biomed. Health Inform. vol. 19, no. 3, pp. 986-994, 2015.
  • [37] C. Tan, L. Zhang and H. Wu, “A Novel Blaschke Unwinding Adaptive Fourier Decomposition based Signal Compression Algorithm with Application on ECG Signals,” IEEE. J. Biomed. Health Inform., vol. 23, no. 2, pp. 672-682, 2019.
  • [38] “Recommended Practice for Testing and Reporting Performance Results of Ventricular Arrhythmia Detection Algorithms,” Association for the Advancement of Medical Instrumentation, 1987.
  • [39] “Testing and reporting performance results of cardiac rhythm and ST-segment measurement algorithms,” American National Standard, ANSI/AAMI/ISO EC57, American National Standard std., 1998-(R)2008.
  • [40] A.L. Goldberger, et al. “PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals.” Circulation 101.23 (2000): e215-e220.
  • [41] T. Qian, “Mono-components for decomposition of signals,” Mathematical Methods in the Applied Sciences., vol. 29, no. 10, pp. 1187-1198, 2006.
  • [42] R. Coifman and S. Steinerberger, “Nonlinear phase unwinding of functions,” J. Fourier Anal. Appl. pp. 1-32, 2015.
  • [43] R. R. Coifman, S. Steinerberger, and H.-T. Wu, “Carrier frequencies, holomorphy and unwinding,” SIAM Journal on Mathematical Analysis. 49(6), 4838–4864, 2017.
  • [44] M. Lukianchikov, V. Nazarchuk, C. Xue, “Iterative Variable-Blaschke Factorization,” arXiv preprint arXiv:1810.01458. 2018
  • [45] N. Saito and J. Letelier, ”Presentation: Amplitude and phase factorization of signals via Blaschke product and its applications,” JSIAM. 2009.
  • [46] R. R. Coifman, J. Peyriére, “Phase unwinding, or invariant subspace decompositions of Hardy spaces,” arXiv preprint arXiv:1707.04844. 2017.
  • [47] S. Steinerberger, H.-T. Wu, “On Zeroes of Random Polynomials and Applications to Unwinding,” arXiv preprint arXiv:1807.05587. 2018.
  • [48] ECGpedia, “A free Electrocardiogram (ECG) Tutorial and Textbook,” [online], Available: http://en.ecgpedia.org/wiki/MainPage.
  • [49] V. Vapnik, “The Nature of Statistical Learning Theory,” Springer Science & Business Media., 2013.
  • [50] C. Chang, and C. Lin, “LIBSVM: A library for support vector machines,” ACM Trans. Intell. Sys. and Tech., vol. 2, pp. 1-27, 2011. [online], Available: http://www.csie.ntu.edu.tw/cjlin/libsvm
  • [51] H.-T. Wu, J.-C. Wu, P.-C. Huang, T.-Y. Lin, T.-Y. Wang, Y.-H. Huang, Y.-L. Lo, “Phenotype-based and Self-learning Inter-individual Sleep Apnea Screening with a Level IV-like Monitoring System”. Frontiers in Physiology, 9, 723. 2018
  • [52] S. Chen, et al., “Heartbeat classification using projected and dynamic features of ECG signal,” Biomedical Signal Processing and Control., vol. 31, pp. 165-173, 2017.
  • [53] Y. Gao, M. Ku, T. Qian, and J. Wang, “FFT formulations of adaptive Fourier decomposition,” Journal of Computational and Applied Mathematics. vol. 324, pp. 204-215, 2017.
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
Add comment
Loading ...
This is a comment super asjknd jkasnjk adsnkj
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test description