Automated Diagnosis of Myocardial Infarction ECG Signals Using Sample Entropy in Flexible Analytic Wavelet Transform Framework

Myocardial infarction (MI) is a silent condition that irreversibly damages the heart muscles. It expands rapidly and, if not treated timely, continues to damage the heart muscles. An electrocardiogram (ECG) is generally used by the clinicians to diagnose the MI patients. Manual identification of the changes introduced by MI is a time-consuming and tedious task, and there is also a possibility of misinterpretation of the changes in the ECG. Therefore, a method for automatic diagnosis of MI using ECG beat with flexible analytic wavelet transform (FAWT) method is proposed in this work. First, the segmentation of ECG signals into beats is performed. Then, FAWT is applied to each ECG beat, which decomposes them into subband signals. Sample entropy (SEnt) is computed from these subband signals and fed to the random forest (RF), J48 decision tree, back propagation neural network (BPNN), and least-squares support vector machine (LS-SVM) classifiers to choose the highest performing one. We have achieved highest classification accuracy of 99.31% using LS-SVM classifier. We have also incorporated Wilcoxon and Bhattacharya ranking methods and observed no improvement in the performance. The proposed automated method can be installed in the intensive care units (ICUs) of hospitals to aid the clinicians in confirming their diagnosis.


Introduction
Myocardial infarction (MI) is a condition that indicates the injury of a heart cell due to the lack of oxygenated blood in the cardiac arteries [1].The main cause of MI is coronary heart disease (CHD), which is responsible for nearly one-third of all deaths in the age group of above 35 years [2,3].MI is silent in nature and may lead to fast and non-recoverable damage to the muscles of heart [3].If MI is not controlled timely, then myocardial structure and functions of the left ventricle (LV) continue to be damaged further.For the diagnosis of MI, the electrocardiogram (ECG) is used due to its low operating cost and non-invasive nature [4].Vital information related to the functioning of the heart can be assessed by analyzing the ECG signals.Moreover, the MI results in the ST deviations and T wave abnormalities in the ECG signal [4].Manual identification of the changes in the ECG signals is a difficult task.Only 82% ST-segment elevation in MI subjects may be recognised by the experienced cardiologists [5].Therefore, an automated identification system for MI patients is needed to facilitate the clinicians in their accurate diagnosis.The classification of ECG signals and the extracted beats from ECG signals have been studied in the literature for diagnosis of heart disorders [6][7][8].
In literature, various studies are performed for the detection of MI patients.In [9], a total integral of one ECG cycle and T-wave integral are suggested as features for the detection of MI.Time-domain features computed from 12-lead ECG signals are explored with fuzzy multi-layer perception (FMLP) network to classify the MI ECG signals [10].In [11], a new multiple instance learning based approach is proposed for the detection of MI.The Hermite basis functions are used to decompose the multilead ECG signals and the obtained coefficients are found effective for the detection of acute MI [12].The phase space fractal dimension features and the artificial neural network classifier are explored to detect the MI [13].In [4], authors have applied neuro-fuzzy approach for the diagnosis of MI patients using multilead ECG signals.A hybrid approach based on hidden Markov models (HMMs) and Gaussian mixture models (GMMs) is proposed to distinguish the MI and normal ECG signals in [14].
In [15], characterization of the QRS complex of normal and MI subjects is performed using discrete wavelet transform (DWT).Three different wavelets are used to decompose the ECG signals up to the fourth level of decomposition.The Daubechies wavelet performed best among the three chosen wavelets.The DWT technique is incorporated to extract the QRS complex of ECG signals, and it is found that identification of the MI subject is possible by detecting the QRS complex [16].In [17], the phase of the complex wavelet coefficients obtained from the dual tree complex wavelet transform (DTCWT) of 12-lead ECG signals is computed.Then, multiscale phase alteration values are used as features to identify the normal, MI, and other abnormal ECG signals.In [18], the ECG signals of normal, MI, and coronary artery disease (CAD) are applied to DWT, empirical mode decomposition (EMD), and discrete cosine transform (DCT) techniques.The authors in this study achieved the best performance when features obtained using DCT technique are subjected to the k-nearest neighbour classifier (k-NN) classifier.Contourlet transform (CT) and shearlet transform (ST) based technique is proposed to distinguish normal, MI, CAD, and congestive heart failure (CHF) subjects using ECG beats in [19].The performance of the CT based technique is found to be better in comparison to the ST based method.
Our aim is to develop a method for automated diagnosis of MI patients in this work.We have analyzed normal and ECG beats using sample entropy (SEnt) in flexible analytic wavelet transform (FAWT) [20,21] framework.First, preprocessing is performed to remove the baseline wandering and other noise present in the ECG signals.Then, ECG signals are segmented into the beats.Furthermore, these beats are decomposed up to the 24th level of decomposition using FAWT.Sample entropy (SEnt) is computed from each subband signal, which is reconstructed from the corresponding coefficients of the FAWT based decomposition.The computed features are subjected to the random forest (RF) [22], J48 decision tree [23,24], back propagation neural network (BPNN) [25], and least-squares support vector machines (LS-SVM) [26] classifiers for separating the ECG beats of MI and normal classes.The steps performed in the present work are shown in Figure 1.The organization of the remaining sections of the paper is as follows: the dataset used, preprocessing and segmentation of the ECG signals into beats, FAWT, SEnt, and classification methods are provided in Section 2. The obtained results in this work are given in Section 3 and discussed in Section 4. Finally, Section 5 presents the conclusions of the work.

Dataset Studied in This Work
The dataset, containing normal and MI ECG signals, has been obtained from Physikalisch Technische Bundesanstalt (PTB) diagnostic ECG database from the Physiobank [27,28].Each signal was acquired at the sampling rate of 1000 Hz.The dataset contains normal ECG recordings of 52 subjects and MI ECG recordings of 148 subjects.The ECG signals obtained from the lead-2 have been used in present work.

Preprocessing and Segmentation of ECG Signals
We have used Daubechies 6 (db6) wavelet basis function to eliminate baseline wander and noise present in the ECG signals [29].After preprocessing, each ECG signal is segmented into beats based on R-peak detection.The Pan-Tompkins algorithm is applied to identify the R-peaks [30].The 250 samples from the left and 400 samples from the right of the R-point are considered as one ECG beat [3].Thus, each ECG beat contains 651 samples.Finally, we have 40,182 MI ECG beats and 10,546 normal ECG beats.

Computation of Features in FAWT Framework
In this work, we have computed SEnt in FAWT domain to classify MI and normal ECG beats.The brief explanation of FAWT method is given below.

• FAWT
The FAWT is a rational-dilation wavelet transform, which allows one to easily adjust the dilation factor, Quality (Q)-factor, and redundancy (R).The FAWT employs the fractional sampling rate in high pass and low pass channels.Moreover, it provides analytic bases by separating positive and negative frequencies in high-pass channels [20].Employing fractional sampling rate and analytic bases in FAWT provides shift-invariance, tunable oscillatory bases, and flexible time-frequency covering [21].These properties make this transform suitable for analysing the transient and oscillatory components of the signals.Q-factor controls the frequency resolution of FAWT.The high Q-factor provides finer filter banks for analysing the signals in the frequency domain.For fixed dilation and Q-factors, the redundancy controls the position of the wavelet.
The mathematical expressions of the filter banks for FAWT are given in Table 1.This table also provides expression for perfect reconstruction condition for FAWT.
In Table 1, A and B are used to adjust the sampling rate of the low-pass channel, and C and D are used to adjust the sampling rate of high-pass channels.The ω p and ω s are the cutoff frequencies of the pass-band and stop-band for the low pass filter, respectively.The ω 0 and ω 3 are the stop-band cutoff frequencies for the high pass filter, and ω 1 and ω 2 are the pass-band cutoff frequencies.
The relation between β and the Q-factor is as follows [20]: Redundancy is defined as follows [20]: We have used A = 5, B = 6, C = 1, D = 2 and β = (0.8 × C)/D [21,31,32] in the present work.Level of decomposition is kept at J = 24.The selection procedure of J is given in Section 3. FAWT has been utilized for detecting the CAD in [31,32], in order to diagnose CHF in [33], to identify electroencephalogram (EEG) signals of focal and non-focal classes in [34], and for the faults identification in rotating machinery [21].We have used the Matlab toolbox ( ˙I Bayram, ˙Istanbul Technical University, ˙Istanbul, Turkey) available for FAWT implementation at [35].
Table 1.Mathematical expressions for filters and perfect reconstruction condition of flexible analytic wavelet transform (FAWT).

Filters and Parameters Mathematical Expressions Used in FAWT
Low pass filter [20] where, where, Condition for perfect

Sample Entropy
SEnt [36] measures the complexity of the time series.It improves the performance by excluding the bias due to the self matches counted in the computation of approximate entropy.Higher values of SEnt indicate more complexity of the signal; on the other hand, the lower value of SEnt shows less complexity of the signal.
Let us consider a time-series (y 1 , y 2 , ..........., y P ) of length P for which the SEnt can be computed as [37]: where I m (r) is defined as follows [37]: and where S r j is the total count for which L [Y(j), Y(k)] ≤ r without considering the self-matches.The parameter L [Y(j), Y(k)] is the distance between Y(j) and Y(k) vectors.Y(j) and Y(k) can be given as [37]:

Studied Classification Techniques
We have used RF, J48 decision tree, BPNN, and LS-SVM in this work to perform the classification of normal and MI ECG beats based on the extracted features.In this work, we have used Waikato environment for knowledge analysis (WEKA) toolbox (version 3.7.13,The University of Waikato, Hamilton, New Zeland) for the implementation of RF, J48 decision tree, and BPNN classifiers [38].We have used default parameters provided in WEKA toolbox for RF, J48 decision tree, and BPNN classifiers.Recently, RF, J48 decision tree, and BPNN classifiers have been used to analyze the sleep stages from EEG signals in [39].
Mathematical expression for decision making function of LS-SVM is given as follows [26]: In the above expression, E(y, y z ), α z , y z , b, w z , and Z represent a kernel function, Lagrangian multiplier, the z-th input vector of D-dimensions, bias term, target vector, and total data points, respectively.
Kernel functions are used with LS-SVM to map the input space to the higher dimension space and the two classes can be separated using an optimal hyperplane [26].In this work, linear, polynomial, radial basis function (RBF), and Morlet wavelet kernels are employed with LS-SVM to perform the classification.The mathematical expressions of these kernels are provided in Table 2.In Table 2, x represents the order of the polynomial kernel, σ determines the width of RBF kernel, and q and D represent the scale factor of the Morlet wavelet kernel and the dimension of the feature set, respectively.LS-SVM is widely used in various biomedical signals classifications [40][41][42][43][44].
In the present work, we have evaluated the classification performance in terms of accuracy, specificity, and sensitivity [45].

Results
First, we have segmented the MI and normal ECG signals into the beats.Each ECG beat of both classes is decomposed into different subband signals using FAWT.The sample entropies are computed from these different subband signals.We start performing the experiments with J = 5 and initial parameters for SEnt m = 2, τ = 1, and r = 0.15 are choosen [37].Typical subband signals extracted from the decomposition of normal and MI ECG beats at the 5th level of decomposition using FAWT are shown in Figure 2a,b, respectively.In Figure 2, subband signals SB 1 to SB 5 are reconstructed from the detail coefficients from level 1 to level 5, and SB 6 is reconstructed from the approximate coefficients at level 5.
We fed the features to the RF classifier for selecting the suitable parameters.Variation of classification accuracies for various values for m and τ is provided in Table 3.It can be inferred from the table that accuracy of classification is highest for m = 5 and τ = 1.Classification accuracy for various values of r is shown in Figure 3.We have achieved the maximum classification accuracy for r = 0.35.Hence, we have used the parameters m = 5, τ = 1, and r = 0.35 to compute the sample entropies in this work.Moreover, we have increased the decomposition level to J = 6, and observed that the classification accuracy is increased to 91.95%.Hence, we further increased the decomposition level up to the maximum possible decomposition level using FAWT with parameters values A = 5, B = 6, C = 1, D = 2 and β = (0.8 × C)/D, which is J = 24 [35].The plot of classification accuracy versus decomposition levels is shown in Figure 4. We can observe that accuracy is increasing with increase in the decomposition level.The highest classification accuracy of 97.10% is achieved with RF classifier at J = 24.We have employed a 10-fold cross-validation procedure for the training and testing of the classifier [49].The classification accuracy achieved using J48 decision tree and BPNN classifiers are 93.97% and 92.85%, respectively.Furthermore, we have also tested the features with LS-SVM classifier with different kernel functions, namely, polynomial, linear, RBF, and Morlet wavelet kernels at J = 24.Variation of classification accuracy (%) with the RBF kernel parameter σ is shown in Figure 5.We can observe from Figure 5 that classification accuracy of LS-SVM is at a maximum for RBF kernel parameter σ = 2.2.Plot of changes in the value of accuracy (%) for variation in the parameter q of Morlet wavelet kernel is shown in Figure 6.LS-SVM showed maximum accuracy with Morlet wavelet kernel at q = 11.The performance of LS-SVM, using four different kernels used in our work, is summarized in Table 4. LS-SVM yielded the highest classification performance with RBF kernel, and achieved an accuracy, specificity, and sensitivity of 99.31%, 98.12%, and 99.62%, respectively.
We have also employed Wilcoxon and Bhattacharya ranking methods for improving the performance of the proposed system [50,51].The plots of the classification accuracy (%) for various ranked features are shown in Figures 7 and 8 for RBF and Morlet wavelet kernels, respectively.
It can be noted that the ranking methods are not able to improve the classification performance.The discrimination ability of the features is determined by computing the p-values using the Kruskal-Wallis (KW) test [52].Recently, the KW test has been explored to test the statistical significance of the features in various biomedical signal analysis applications [53][54][55].The p-values are found significantly low (p < 0.0001) for all the features (SEnt computed from 25 subband signals), which indicate good discrimination ability of all the computed features.Mean and standard deviation values for features are provided in Table 5.In Table 5, SEnt refers to the sample entropy and the subscript refers to the corresponding subband signal from which SEnt is computed.Table 5. Mean (M), standard deviation (SD) for normal and MI classes.

Discussions
In the present work, the ECG beats are decomposed into the 24th level of FAWT for obtaining subband signals.Furthermore, SEnt is computed from each of the subband signal.We can observed from Table 5 that SEnt computed from the lower frequency subband signals (SB21, SB22, SB24, and SB25) showed higher values for normal ECG beats in comparison to the MI ECG beats.Therefore, lower frequency subband signals show higher complexity for normal ECG beats than MI ECG beats.However, lower values of SEnt are observed for higher frequency subband signals extracted from normal ECG beats.Hence, complexity of higher frequency subband signals is lower for normal ECG beats.Finally, our method achieved 99.31% accuracy using LS-SVM classifier with RBF kernel.
Summary of the comparison of the present work with the other existing work is provided in Table 7.In [56], and time-domain features are computed from 12-lead ECG signals.The computed features are fed to the BPNN classifier, which yielded sensitivity of 97.5%.In [57], the time-domain method is used for extracting the features from the ECG signals to diagnose the MI patients.The authors have used 12-lead ECG signals of 20 normal and 20 MI subjects.They achieved a sensitivity of 85% to detect the MI subjects.In [58], the authors proposed a method based on the spectral differences of cross wavelet transform (XWT) of the ECG signals.Furthermore, they proposed threshold based classifier and achieved 97.6% classification accuracy.In [5], an algorithm based on the parametrization of ECG signal is developed.In this algorithm, a 20th order polynomial is fitted with the ECG signal.Their method showed 94.4% classification accuracy with J48 decision tree model for the diagnosis of MI.The approach presented in [59] utilized the evaluation of multiscale energy and eigenspace (MEES) features.The suggested method used support vector machine (SVM) classifier with RBF kernel and achieved 96.15% classification accuracy.In [3], ECG beats are decomposed up to the 4th level of decomposition using DWT.From the DWT coefficients, 12 nonlinear parameters are extracted.The authors achieved 98.8% accuracy using a k-NN classifier.They also performed statistical tests for determining the significance levels of the studied features.A method to automatically detect the MI using ECG signals is also proposed in [60].The achieved accuracies were 93.53% and 95.22% using convolutional neural network (CNN) algorithms for the ECG beats with noise and without noise removal, respectively.
We have achieved highest accuracy in comparison to the existing methods that are mentioned in Table 7.Moreover, the methods suggested in [5,[56][57][58][59] used ECG recordings of the multiple leads.However, our method uses only lead-2 ECG recordings, which makes our method less complex than multiple leads methods.The method suggested in [3] also requires ECG records of one lead (lead-11) only.However, the method in [3] achieved 98.8% classification accuracy with 47 features.In comparison to the method in [3], our method has achieved 99.31% accuracy with 25 features.Our method showed better results than the method in [3] with a lesser number of features.The study proposed in [60] also used lead-2 ECG signals and achieved 95.22% accuracy with an 11-layer deep neural network.This method is more complex than our method and also time-consuming.

Conclusions
In this work, normal and MI ECG beats are analyzed using SEnt in FAWT framework.We have achieved the highest classification performance using lead-2 ECG signals as compared to the reported works.We have identified the suitable parameters to compute the SEnt in FAWT domain for the detection of MI subjects accurately.Parameters for the computation of SEnt and the decomposition level in FAWT domain are selected on the basis of classification accuracy computed using an RF classifier.Achieved classification accuracies with RF, J48 decision tree, BPNN, and LS-SVM classifiers are 97.10%,93.97%, 92.85%, and 99.31%, respectively, using the entire dataset.Our method achieved classification accuracy of 98.27% with LS-SVM using balanced data set.Therefore, we can conclude that our methodology has performed well for the detection of MI patients using both balanced and unbalanced (entire) datasets.Our automated system can be used to assist cardiologists to cross check their diagnosis.It can be extended to diagnose the severity of MI.Along with the echocardiography, it can be used to localize the MI.

Figure 3 .
Figure 3. Plot of accuracy (%) versus r of SEnt with RF classifier.

Figure 4 .
Figure 4. Plot of accuracy (%) versus level of decomposition with RF classifier.

Figure 6 .
Figure 6.Plot of accuracies versus q of Morlet wavelet kernel.

Figure 7 .
Figure 7. Plot of accuracy (%) versus number of features using LS-SVM with RBF kernel.

Figure 8 .
Figure 8. Plot of accuracy (%) versus number of features using LS-SVM with Morlet wavelet kernel.

Table 2 .
Different kernel functions and their mathematical expressions.

Table 3 .
Classification accuracies computed using random forest (RF) classifier for different values of m and τ using Sample entropy (SEnt) with r = 0.15.

Table 4 .
Classification accuracy (%) of least-squares support vector machine (LS-SVM) for different kernel functions.

Table 6 .
Classification accuracy (%) of LS-SVM with different kernel functions for balanced dataset.

Table 7 .
Summary of automated diagnosis of MI using ECG.