Abnormal ECG Classification using Empirical Mode Decomposition and Entropy

Heart disease is one of the leading causes of death in the world. Early detection followed by therapy is one of the efforts to reduce the mortality rate of this disease. One of the leading medical instruments for diagnosing heart disorders is the electrocardiogram (ECG). The shape of the ECG signal represents normal or abnormal heart conditions. Some of the most common heart defects are atrial fibrillation and left bundle branch block. Detection or classification can be difficult if performed visually. Therefore in this study, we propose a method for the automatic classification of ECG signals. This method generally consists of feature extraction and classification. The feature extraction used is based on information theory, namely Fuzzy entropy and Shannon entropy, which is calculated on the decomposed signal. The simulated ECG signals are of three types: normal sinus rhythm, atrial fibrillation, and left bundle branch block. Support vector machine and k-Nearest Neighbor algorithms were employed for the validation performance of the proposed method. From the test results obtained, the highest accuracy is 81.1% with specificity and sensitivity of 79.4% and 89.8%, respectively. It is hoped that this proposed method can be further developed to assist clinical diagnosis.


192
empirical mode decomposition (EMD)-based algorithms for the analysis and classification of ECG signals. One of them obtained high detection in identifying ECG signals complexity both sensitivity (99.96%) and specificity (99.81%) [11]. Entropy is another way of detecting and extracting ECG signal properties. Entropy measures have been successfully validated for evaluating short, sparse, and noisy time series data. In this study, we proposed Fuzzy entropy and Shannon entropy. The Fuzzy entropy is used to measure the subjective value of information under uncertainty and is applied to the seal assumption problem [12] [13], then we compare its performance with Shannon entropy.
In the last stage, we explored two popular machine learning models [14][15][16][17][18], Support Vector Machine (SVM) and K-Nearest Neighbours (KNN), to classify the normal, LBBB, and AF from the ECG signals. This work proposes an ECG classification algorithm based on the SVM that is widely used for the classification of feature extracted ECG [19][20] because of its simplicity, robustness, and effectiveness [21][22][23] which will be compared with the KNN method. The KNN method is often used to study ECG authentication [24][25][26].
As reminder, the paper organized as follow. In Section II, the overview of ECG dataset, EMD method, entropy methods, and classifier method. We move on with result and discussion in Section III. Conclusion, limitation, and future study are presented in Section IV.

II. MaterIal and Methods
The proposed classification method is depicted in Fig. 1. In the first stage, the raw ECG signal consisting of normal, AF, and LBBB is decomposed into five levels. Furthermore, measurements of Shannon and Fuzzy entropy were carried out on the decomposition signal. This process then generates a feature vector. The last stage is validation of the proposed system performance. The details of the proposed method are explained in the following sub-section.

A. ECG Dataset
The signals used in this study were obtained from the open database of ECG signals by Pławiak [27]. This dataset was collected from http://www.physionet.org PhysioNet [28] from the MIT-BIH Arrhythmia database [29]. ECG signals were recorded from forty-five patients using 200 [adu/mV] amplification with a sampling frequency of 360 Hz. Signals are recorded from one lead. This database consists of 17 classes: normal, pacemaker rhythm, and 15 abnormal ECG classes. All signals have a length of 3600 samples (10-seconds). In this study, the ECG signals used consisted of normal sinus rhythm (NSR), atrial fibrillation (AF), and left bundle branch block (LBBB) classes with the number of fragments 283, 135, and 103, respectively. Fig. 2 shows the ECG signal which is simulated in this study. At first glance, these signals have similarities so that they can be difficult to detect manually.

B. Empirical Mode Decomposition (EMD)
For nonlinear and non-stationary signal analysis, EMD is an adaptive, data-dependent decomposition method [30]. The intrinsic mode functions (IMFs) approach decomposes a signal into a finite collection of oscillatory components [10]. The original x (t) signal can be expressed as the sum of total K number of extracted IMFs from i=1 and the final residual R(t) as seen in Eq. 1 [31].

Fuzzy Entropy
Fuzzy entropy is a sample entropy derivative demonstrated to produce superior outcomes in some cases than sample entropy. In comparison to sample entropy, fuzzy entropy has a higher relative consistency and is less dependent on data length [32]. The fuzzy entropy using the logarithm function (H), is given by Eq. 2, where K =1/n is constanta, m k is the total number of signal, and m i is the membership function [33] [34].

D. Shannon Entropy
The entropy is the average information from all of the events. If it relates to the classical information entropy, Shannon entropy is given by Eq. 3 [35].
is Shannon entropy that influenced by X as a random variables of signals, and P k =(P 1 , P 2 ,P 3 , ...., P n ) is a dimensional probabilities variable of X.

E. Support Vector Machine (SVM)
The SVM concept creates a hyperplane that divides all training data into two groups or classes. Several designs are shown as members of two groups or classes in Fig. 3. Line-1 and Line 2 are two examples of different selectivity borders that can be used to find the optimal hyperplane [26].
The equation of line-linear SVM (f(x)) in Fig. 2 were given by Eq. 4 and Eq. 5 [36] [37]: The key idea of SVM is, given a set of n labelled examples N= {(x 1 , y 1 ), …, (x n , y n )}, where α i is Lagrange multiplier, x i represents a dimensional vector of an image, y i ∈ {1,-1} is the label to find a hyperplane, and b is a hyperplane's scalar threshold.
where K(x, x i ) is polynomial kernel, x denotes a point on the hyperplane, σ is a positive real number [38].

F. K-Nearest Neighbor (KNN)
Another well-known supervised learning strategy is KNN, which assigns a classification to a data point based on the proportion of its neighbors [39] [40]. It chooses  k samples from the training set that are closest to them, then approaches their class for a majority of votes, with k being an odd number to avoid ambiguity [41] [42]. It uses distance measurements such as "Euclidean distance" to locate the neighbor [43] [44].

III. results and dIscussIon
In this study, the signal was decomposed using EMD before feature extraction. The decomposition results of IMF-1 to IMF-5 signals are shown in Fig. 4 and Fig. 5. Fuzzy Entropy and Shannon entropy are then calculated on the decomposed signal. From this calculation, 10 feature values are generated, consisting of 5 fuzzy entropy features and 5 Shannon entropy features. Fig.3 and Fig.4 show the mean and p-value for each feature. For the all entropy-IMF, the mean of each method illustrates the disparities between classes, with overlapping standard deviations. For both Fuzzy entropy and Shannon entropy, the difference with the lowest significance was found in IMF-2 (p<0.05).
Meanwhile, the most significant difference was found in the Shannon entropy IMF-4 with an F-value of 92.335 and p<0.000, but still had overlapping standard deviations. From this observation, it is indicated that a higher IMF level tends to generate a higher significance difference. By observing these characteristics, it is possible that the accuracy does not reach 100%. The selection of specific features is not carried out in this study because all features generate the best accuracy.
From the statistical analysis, it is known that the proposed method provides discriminatory parameters among classes. Furthermore, the performance validation of the proposed method is carried out using the SVM and k-NN algorithms. The total number of predictors is 10 predictors as input classifier. There are three scenarios Cross validation with k = 10 was employed for iteration of training data and test data. The test results for each scenario are presented in Table 1.
From this test, the best performance was obtained in scenario-3 with an accuracy of 81.1%, sensitivity of 79.4%, and Specificity of 89.8%. In the scenario with the highest accuracy, all entropy values are used as predictors. From this test, it is known that k-NN generates higher accuracy than SVM in all scenarios and kernel types. k-NN with the number of k = 7 produces better performance than k = 5 although the increase in accuracy is not significant. From this test, it is also known that Shannon entropy produces higher accuracy than Fuzzy entropy, it can be interpreted that Shannon entropy provides better discriminatory features than Fuzzy entropy. This confirms the finding of the most significant difference in Shannon entropy IMF-4 as mentioned above. Table 2 shows the confusion matrix from the scenario that produces the highest accuracy. The highest true detection was found in normal ECG and lowest in atrial fibrillation. Misclassification in Atrial fibrillation is most often detected as a normal ECG. Based on Fig. 4 and Fig.  5, the mean and standard deviation of Fuzzy entropy and Shannon entropy in IMF-2 for atrial fibrillation and normal ECG groups have very similar features, also marked by a low significance F value. Therefore, the false detection of atrial fibrillation is higher than the others. To confirm it, two class classification simulations were performed: normal vs atrial fibrillation and normal vs LBBB. The simulation results are shown in Table 3. From this simulation it is also seen that normal vs atrial fibrillation cases have lower accuracy than normal vs LBBB cases.
From this study, it is known that the proposed method can provide discriminatory features between normal, atrial fibrillation, and left bundle branch block ECG signals. The resulting detection accuracy is > 80% with high specificity although in the case of atrial fibrillation it still produces a fairly low accuracy. The accuracy of this study is not higher than that of the study [45], [46], however, this study simulates a case of ECG abnormality that is different from the previous study and this study still has a great opportunity to be explored further. The proposed method in this study can be considered for further exploration e.g. IMF selection or analysis using more IMF or combined with other feature extraction methods so as to generate higher detection accuracy. In addition, scenarios are needed to overcome data imbalances, for example by oversampling or down sampling.

IV. conclusIon
In this study, we propose a method for the automatic classification of ECG signals. The simulated ECG signals are of three types: normal sinus rhythm, atrial fibrillation and LBBB, and AF. The feature extraction used is based on empirical mode decomposition and information theory, namely Fuzzy entropy and Shannon entropy. Support vector machine and K-Nearest Neighbor algorithms were employed for the validation performance of the proposed method. From the test results obtained, the highest accuracy is 81.1%, with specificity and sensitivity of 79.4% and 89.8%, respectively. An important issue that becomes the limitation of this study is data imbalance, which may be overcome by oversampling or down-sampling. In future works, the study is still wide open for exploration, for example the use of other entropy methods, selection of IMF, and other classifiers. In addition, simulations are also needed for classification cases with more classes.