# An Effective Deep Learning Model for Automated Detection of Myocardial Infarction Based on Ultrashort-Term Heart Rate Variability Analysis

Authors: Muhammad Bilal Shahnawaz; Hassan Dawood
Journal: Mathematical Problems in Engineering
 (2021)

---

## Abstract

Myocardial infarction (MI), usually termed as heart attack, is one of the main cardiovascular diseases that occur due to the blockage of coronary arteries. This blockage reduces the blood supply to heart muscles, and a prolonged deficiency of blood supply causes the death of heart muscles leading to a heart attack that may cause death. An electrocardiogram (ECG) is used to diagnose MI as it causes variations like ST-T changes in the recorded ECG. Manual inspection of these variations is a tedious task and also requires expertise as the variations produced by MI are often very short in duration with a low amplitude. Hence, these changes may be misinterpreted, leading to delayed diagnosis and appropriate treatment. Therefore, computer-aided analysis of ECG may help to detect MI automatically. In this study, a robust deep learning model is proposed to detect MI based on heart rate variability (HRV) analysis of ECG signals from a single lead. Ultrashort-term HRV analysis is performed to compute HRV analysis features from time-domain and frequency-domain parameters through power spectral density estimations. Nonlinear HRV parameters are also computed using Poincare Plot, Recurrence Analysis, and Detrended Fluctuation Analysis. A finely tuned customized artificial neural network (ANN) algorithm is applied on 23 HRV features for MI detection and classification. The K-fold validation method is used to avoid any biases in results and reported 99.1% accuracy, 100% sensitivity, 98.1% specificity, and 99.0%F1 for MI detection, whereas 98.85% accuracy, 97.40% sensitivity, 99.05% specificity, and 97.70% F1 score is achieved for classification. Furthermore, the ANN algorithm completed its execution in just 59 seconds that indicates the efficiency of the proposed ANN model. The overall performance in terms of computed evaluation matrices and execution time indicates the robustness and cost-effectiveness of the proposed methodology. Thus, the proposed model can be used for high-performance MI detection, even in wearable devices.


---

## Body

## 1. Introduction

Heart rate variability (HRV) is the physiological phenomenon to measure fluctuations between successive cardiac beats, termed as RR intervals [1, 2]. The variation in cardiac beats causes irregularities that may result in bradycardia or tachycardia, and HR fluctuates from the normal scale. This irregular behavior informs about the current or an imminent disease [3]. HRV results because of autonomic nervous system (ANS) modulation and is usually used to evaluate the functioning of ANS activities. ANS consists of two branches: sympathetic activity and parasympathetic activity, and the balance between these activities regulates heart rate (HR) [4]. Increased sympathetic activity and decreased parasympathetic activity results in cardioacceleration that increases HR and decreases HRV. Contrarily, escalated parasympathetic activity and suppressed sympathetic activity cause cardiodeceleration and results in decreased HR and increased HRV [5].HRV is one of the most reliable noninvasive tools. HRV analysis is performed by processing electrocardiograms (ECG) signals that are also noninvasive, usually recorded from traditional Holter devices [6, 7]. ECG is used to analyze heart activity and detect any cardiac disease [8]. ECG shows pictorial information of the electrophysiological fluctuations that occurred by depolarization of the atria and repolarization of the ventricles during heartbeats [9]. ECG signal is divided into some characteristic waveforms, i.e., P, QRS, and T waves sequentially, and some segments labeled as PR, QT, and ST segments [9]. Each component represents different functionality and provides prognostic information for different cardiac diseases. ECG is usually recorded from twelve leads and a different number of leads are being used to diagnose cardiovascular diseases. However, HRV analysis can be performed by using a single lead [1, 2].HRV analysis has been accepted as a biomarker and widely used by researchers to assess the health of control subjects and patients suffering from hypertension, diabetes, renal failure, stress, and various cardiovascular diseases (CVDs) such as coronary artery disease (CAD), myocardial infarction (MI), atrial fibrillation (AF), ventricular fibrillation (VF), congestive heart failure (CHF), ventricular tachyarrhythmia (VTA), and cardiac arrhythmia [5, 7, 10–19]. Conventionally, HRV analysis has been categorized into long-term analysis, performing analysis of 24 h recordings, and short-term analysis, processing 5 min ECG. A very few studies performed long-term analysis, whereas short-term analysis is preferred in almost all the HRV analysis studies due to its low computational cost. All of the previously mentioned CVDs have been detected and classified using short-term HRV analysis except MI. MI can be detected using shorter ECG signals, whereas short-term HRV analysis requires at least 5 min ECGs. Recently, different studies have performed ultrashort-term HRV (US-HRV) analysis using ECGs less than 5 min, so MI can also be detected using US-HRV analysis. Traditionally, HRV analysis was performed using linear features, including time-domain (TD) and frequency domain (FD) features. However, nonlinear (NL) domain features are also used individually or in the combination with linear features, in recent studies.Hirsch et al. [12] extracted a few linear and NL short-term HRV features from the R-R interval (RRI) series to feed into three machine learning classifiers to classify AF. Among these classifiers, Random forest (RF) detected AF accurately up to 97.4%. Similarly, Narin et al. [13] extracted short-term HRV features from TD and FD using 5 minutes recording and predicted the onset of paroxysmal AF (PAF) by applying K-nearest neighbor (KNN) classifier. KNN predicted PAF onset with an accuracy of 90%. Shi et al. [14] suggested a novel entropy termed Renyi Distribution Entropy (RdisEn) to perform short-term HRV analysis detected CAD with the combination of RdisEn and some statistical features. HRV analysis features were extracted from lead II, and KNN and support vector machine (SVM) classifiers were applied on selected features. KNN detected CAD from healthy subjects with an accuracy of 97.5%, using only 5 features (RdisEn with the combination of four statistical features). Isler et al. [15] used linear and nonlinear HRV features to classify CHF patients from healthy controls by applying a 3-stage classifier. Frequency domain features were computed from different transform methods, and nonlinear parameters were calculated using Poincare plot (PCP), detrended fluctuation analysis (DFA), sample entropy (SampEn), and symbolic dynamics from ECG of 5 minutes. Five classifiers were employed on different combinations of these features and among which multilayer perceptron (MLP) classified CHF patients with an accuracy of 98.8%. Rohila and Sharma [16] extracted nonlinear features including five entropy, four PCP, and one DFA exponent feature whereas five time-frequency domain features using S-transform, from 5 min ECG for HRV analysis to detect CAD. SVM and RF were applied to classify sudden cardiac death (SCD) accurately up to 91.67% from CAD and CHF patients. Taye et al. [17] used linear and NL HRV analysis features extracted from 5 min ECG to predict VTA by applying convolutional neural network (CNN) along with machine learning (ML) classifiers. CNN predicted VTA with the highest accuracy of 84.6% as compared to other ML classifiers.All of the aforementioned recent studies have performed short-term HRV analysis that is preferred due to its reliability. However, various studies are trying to embed HRV analysis in portable or wearable devices. Therefore, recent studies have also focused on ultrashort-term HRV (US-HRV) analysis by processing an ECG of less than 5 min. Castaldo et al. [20] used HRV analysis features from 3 min ECG to investigate mental stress. In another study, Castaldo et al. [21] performed ultrashort-term HRV analysis and used different combinations of features from time, frequency, and NL domain extracted from ECGs of various lengths less than 5 min. The experimental results suggested six US-HRV features that can investigate mental stress with less computational cost as compared to short-term analysis. Zubair and Yoon [22] used 1 min PPG and performed ultrashort pulse rate variability analysis to investigate stress. Most of the studies performing ultrashort HRV analysis have focused mainly on stress detection and investigation, whereas very few studies have investigated cardiovascular diseases using US-HRV. A recent study [23] has used both linear and nonlinear features to detect VF and achieved higher accuracy of 94.7% by applying SVM on 2 nonlinear features. They extracted HRV analysis features from 1 min ECG signals. Ebrahimzadeh et al. [24] used linear and nonlinear features from 1 min ECG and performed HRV analysis to predict SCD by applying an MLP classifier. Twelve segments of 1 min ECG were analyzed and predicted SCD with an averaged accuracy of 88.29%. Though some studies have performed ultrashort-term HRV (US-HRV) analysis of ECG signals, it is still a research goal for researchers to detect and classify different CVDs by analyzing signals shorter than 5 min.MI is the leading CVD that occurs because of blocked coronary arteries [25]. The blockage reduces the blood supply through arteries, whereas a continuous blood supply is required by heart muscles to keep themselves alive and functional [26]. If the blood supply is decreased, heart muscles get damaged, and a prolonged deficiency or discontinued blood supply causes the death of heart muscles leading to a heart attack that may cause death [25, 27, 28]. MI can be detected by analyzing ECG as it causes morphological variations in the recorded ECG. The analysis of these morphological changes like QRS complex distortion, ST-segment elevation or depression, and T-wave inversion is commonly used to detect MI. MI is the major cause of humans’ demise. According to World Health Organization (WHO), almost 31% of the worldwide deaths per annum are due to CVDs, and MI and strokes contribute up to 85% of these CVD deaths [29]. According to American Heart Association (AHA), a death happens every 40 seconds in the United States of America due to MI [30]. As MI shows no evident symptoms at the initial stage and develops quickly, early diagnosis and accurate detection of MI is a global research objective to ameliorate human life.In the proposed study, MI is detected by performing US-HRV analysis of ECG signals from the publicly available dataset PTB (Physikalisch-Technische Bundesanstalt). The proposed methodology extracts US-HRV analysis features and applies one of the basic deep learning models, i.e., ANN, to detect MI rather than directly applying classification algorithms on ECG signals or selected beats from signals. The key contributions of the proposed study are as follows:(1)
A novel US-HRV analysis of ECG signals (length < 5 min) is performed for the analysis of MI(2)
TD, FD, and NL HRV analysis features are extracted for MI detection rather than beats from lead II ECG signals after preprocessing(3)
A finely tuned ANN is applied on US-HRV analysis features extracted from a single lead(4)
An analysis is performed based on records rather than specific beats or frames(5)
State-of-the-art evaluation matrices are computed to evaluate the performance of the model. Furthermore, K-fold validation was adopted to ensure reliability and avoid any biases(6)
The proposed model detected MI with higher accuracy and outperformed the existing models applied on the same dataset, as compared to the published literatureThe remaining manuscript is arranged as follows: Section2 presents the literature work for MI detection. Section 3 illustrates the database, preprocessing, features extraction and selection, proposed algorithm, training model, and tools used for training the model. Section 4 reports the results and discusses the other methodologies performing MI detection and/or classification. Section 5 concludes the study and gives directions for future work.


## 2. Literature Work

Numerous researchers have proposed different MI detection methods using a different number of leads, specific features, and a variety of classifiers. References [26, 31, 32] used time-domain features, [33–37] used frequency domain features, and [38–41] used different entropy measures to detect MI. Dohare et al. [26] used duration of P-wave and QRS complex, T wave inversion, and ST-segment variations and applied SVM to detect MI using 14 features. Arif et al. [31] used morphological features Q wave amplitude, T wave, and ST-segment variations and applied KNN to classify healthy subjects and MI patients. Remya et al. [32] used Q-peak and ST-elevation features and classified anterior MI and inferior MI by applying ANN. These all studies used just time-domain features from averaged beats for all leads.Diker et al. [33] extracted discrete wavelet transform (DWT) parameters in conjunction with time-domain features and 9 out of 23 features were used to separate the MI cases from healthy subjects by applying SVM. Banerjee and Mitra [34] used cross wavelet transform (XWT) to classify abnormal ECG patterns from normal. They selected a template for normal ECG for three leads, and coherence was computed with other patterns for classification. Acharya et al. [35] applied Discrete Cosine Transform (DCT), DWT, and Empirical Mode Decomposition (EMD) to extract features for CAD classification. They achieved better performance by feeding only seven features obtained from DCT into KNN. Sharma et al. [36] used multiscale energies and eigenvalues of multiscale covariance matrices to detect MI by applying SVM and KNN. The best performance to detect MI was achieved using SVM. Sadhukhan et al. [37] utilized the concept that MI causes variations in the ECG waveform that are reflected precisely in the phase distribution patterns. Two discriminatory features from three leads were identified, and logistic regression was applied to detect MI. Similarly, Sharma and Sunkaria [38] achieved 98.69% accuracy with SVM while detecting MI using three leads (II, III, and a VF). Padhy and Dandapat [39] detected MI by applying a 2-D multilead ECG tensor. Sopic et al. [40] extracted multiple TD and FD features and fed them into the RF classifier to classify MI and achieved an accuracy of 83.26%. Acharya et al. [41] used FD and NL domain features, different types of entropy features, to detect and classify MI. Different combinations of all features extracted from 611,405 beats of twelve leads were fed into KNN and the highest accuracy of 98.8% was achieved with 47 features extracted from the V5 lead. Han and Shi [42] fused energy entropy was calculated after decomposing the ECG signal and morphological features extracted from beats for a single lead. Based on this single-lead features, features from all the twelve leads are fused with energy entropy to detect MI. After applying principal component analysis (PCA) to reduce dimensional complexity, SVM achieved the highest accuracy of 92.69% with 22 features from 12 leads.All of the aforementioned studies have used traditional ML classifiers to detect and classify MI though limitations related to these methods are apparent. Human expertise is required to extract and select useful features especially related to ST-T changes. Therefore, in recent studies, deep learning (DL) models have been applied by researchers due to their self-ability of learning and extracting useful features from raw ECG data [43]. Acharya et al. [8] implemented an 11-layered CNN to detect MI from lead II. Liu et al. [44] segmented the ECG signals to obtain beats from multiple leads and implemented a multilead CNN (MLCNN) to detect MI. MLCNN was optimized using 2-D CNN and Lead Asymmetric Pooling (LAP) and achieved an accuracy of 96%. Lui and Chow [45] implemented a combination of CNN and recurrent neural networks (RNN) on hand-crafted features, including time-domain HRV analysis features from single-lead ECG data and detected MI with the highest 92.4% sensitivity, 97.7% specificity, and F1 score of 94.6%. Tripathy et al. [46] performed a multiresolution analysis of ECG signals from 12 leads. The time scale decomposition was performed for 12-lead signals using Fourier-Bessel (FB) series expansion based empirical wavelet transform (FBSE-EWT). The signal from each lead was decomposed into nine subbands and statistical features, i.e., the entropy, the skewness, and the kurtosis, were evaluated from each subband using FBSE-EWT. Finally, a feature vector from 12-lead signals was fed into deep learning based least square-SVM (DL-LSSVM) to detect MI and achieved better results. In another study, Tripathy et al. [47] proposed a CNN model to localize and detect MI from 12-lead signals and also classified different types of MI using beats from multiple leads. For MI localization, the same FBSE-EWT with the addition of fixed order ranges was used to analyze the beats and the first 26 order ranges were proved most informative for MI localization. Liu et al. [25] proposed a combination of CNN and bidirectional long short-term memory (B-LSTM) and detected MI. Han et al. [48] presented ML–ResNet structure composed of residual blocks and feature fusion to detect MI. Feng et al. [49], Alghamdi et al. [50], and Hammad et al. [51] applied CNN-LSTM, CNN, and CNN along with introducing a focal loss function, respectively, and achieved better MI detection results from lead II signals without performing features extraction. Though all of these studies have achieved better results (>90%) with or without performing features extraction, our study has performed much better than the existing studies by achieving a sensitivity of 100%.


## 3. Materials and Methods

The proposed methodology detects MI and classifies MI patients and healthy subjects. The novel approach includes HRV analysis of ECG signals based on which detection and classification are performed using ANN. Finally, results are evaluated using K-fold validation. The proposed model is visualized in Figure1.Figure 1
The workflow of the suggested methodology to detect MI. HRV features are extracted from the 2 min ECG signals after preprocessing and fed into ANN algorithm to detect and classify MI.


### 3.1. Dataset

In the current study, ECG signals are used from the PTB dataset [52], publicly available at physioNet. The dataset consists of signals for 290 subjects, including 52 healthy subjects, 148 MI patients, and 68 subjects suffering from some other CVD, whereas no clinical information is available for 22 subjects. Subjects’ numbers 124, 132, 134, and 161 are missing from the dataset. For each subject, there are one to five records and each record consists of 15 ECGs; 12 for conventional ECG leads while 3 ECGs for frank leads. Each signal is digitized at a sampling rate of 1000 Hz.


### 3.2. Preprocessing

In the preprocessing stage, the QRS complex is detected, followed by denoising and downsampling. A high-pass filter with a cut-off frequency of 0.5 Hz is used to remove baseline wanders, including low-frequency ST segments. A band-pass filter is also used to overcome the effects of power line interferences. The denoised signals are analyzed in the frequency domain to rectify the phase and to enhance the R-peaks using the Hilbert transform. Subsequently, R-peaks are detected from the QRS complex using the thresholding. Afterward, downsampling is performed as a sampling rate of 250 Hz is enough for extracting reliable HRV analysis matrices and also alleviates the computation burden [25, 53]. Furthermore, each record is of duration from 30 seconds to ∼2 minutes. Since all of the time-domain parameters cannot be calculated for ECG signals (<1 minute), subjects having ECG recordings of 30 seconds are excluded. Though each lead is placed at a different position at the chest and provides different useful diagnostic characteristics still lead II is commonly used to classify ECG signals [8, 33, 45, 48–51, 54, 55]. Therefore, ECG signals from lead II for 187 subjects are included in the study for the final analysis.


### 3.3. Features Extraction

Currently, short-term analysis is preferred for CVDs analysis due to its reliability. However, various recent studies are trying to embed HRV analysis in portable and wearable devices by shortening the length of HRV excerpts. Therefore, we have extracted different TD, FD, and NL US-HRV analysis features from signals of shorter length (∼2 minutes), listed in Table1.Table 1
HRV analysis features extracted from linear (TD & FD) and nonlinear domain according to the standard guidelines [5–7].
CategoryFeaturesDescriptionNo. of featuresReferenceTimeDomainFeaturesmeanRRMean of consecutive RR intervals (RRI)1[6, 7]SDNNStandard deviation (SD) of RRI1[6, 7]SDANNSD of averaged RRI1[6, 7]RMSSDRoot mean square of consecutive differences1[6, 7]pNN50%Proportion of the number of RRI with difference of more than 50 ms1[6, 7]FrequencyDomainFeaturesVLFpeakPeak frequency value in VLF range (f ≤ 0.04 Hz)1[6, 7]LFpeakPeak frequency value in LF range (0.04 ≤f ≤ 0.15 Hz)1[6, 7]HFpeakPeak frequency value in HF range (0.15 ≤f ≤ 0.4 Hz)1[6, 7]VLFAPSpectral absolute power in VLF range (f ≤ 0.04 Hz)1[6, 7]LFAPSpectral absolute power in LF range (0.04 ≤f ≤ 0.15 Hz)1[6, 7]HFAPSpectral absolute power in HF range (0.15 ≤f ≤ 0.4 Hz)1[6, 7]LF/HFRatio of LF and HF1[6, 7]Poincare analysisSD1The SD of the instantaneous beat-to-beat variability1[7]SD2The SD of consecutive or long-term variability1[7]Detrended fluctuation analysisAlpha 1Alpha 2DFA features2[7]Recurrence analysisREC, DET, LAM, Lmean(bts),Lmax(bts),Vmean(bts), Vmax(bts),Recurrence analysis features,d = 10, lag = 17[5]


#### 3.3.1. Time-Domain HRV Analysis Features

TD features are extracted from RR intervals (RRI) of the heartbeat. Five features are considered according to the guidelines [6, 7], including mean of consecutive RRI (mean RR), standard deviation (SD) of RRI (SDNN), SD of averaged RRI (SDANN), root mean square of consecutive differences (RMSSD), and proportion of the number of RRI with a difference of more than 50 ms, to the total number of RRI (pNN50%).


#### 3.3.2. Frequency Domain HRV Analysis Features

The FD features are extracted through the power spectral density (PSD) estimations. There are different methods to perform spectral analysis. However, PSD estimation for HRV analysis is usually performed through Fast Fourier Transform (FFT) autoregressive (AR) and Lomb-Scargle (LS) periodograms [56]. Though these methods obtain comparable results in most cases, they differentiate regarding preprocessing and length of ECG signal. FFT has a nonequal distancing problem and usually requires interpolation to convert data at an equal distance that can introduce biases in the data, whereas AR and LS periodograms do not need interpolation [13, 56]. Furthermore, FFT typically requires an ECG signal of at least 5 minutes, whereas the AR model works on shorter ECG signals of 2 minutes [56]. According to [25, 56], the LS periodogram has outperformed both traditionally used FFT and AR methods and has been used in recent studies for HRV analysis to detect CVDs [2, 15]. Therefore, we have calculated ten frequency domain features through an LS-based periodogram.HRV analysis spectrum is mostly divided into three major frequency bands: very low frequency (VLF), low frequency (LF), and high frequency (HF) [6]. We have extracted peak values of these bands, absolute power values (VLFAP, LFAP, and HFAP), and LF/HF. Though a study [57] has contradicted the hypothesis for LF/HF, it is still widely used as an HRV measure [7].


#### 3.3.3. Nonlinear Domain HRV Analysis Features

Though, initially, just time and frequency domain features were involved in HRV analysis but, now nonlinear features are widely used along with linear features. Nonlinear methods are used to quantify the complexity and short-term variations produced by RR intervals. For nonlinear features, we have extracted Poincare plot [58], recurrence analysis features [2], and Detrended Fluctuation Analysis (DFA) parameters [59] according to the recent guidelines regarding HRV analysis [7].


### 3.4. Classification Algorithm

In the proposed methodology, an ANN model with three layers is implemented. The first layer is the input layer having 23 neurons and rectified linear unit (Relu) as activation function. The second layer is the hidden layer that constructs the model, consists of 12 neurons, and has the same activation function Relu. Relu function is computed by using the relation:R(x) = max(0, x), which gives an output x if it is a positive value; otherwise, it returns 0 value. Relu function improves the performance of the ANN model by introducing sparsity and restrains the appearance of overfitting that can reduce the efficiency of a model by alleviating the dependence of parameters [60]. The output layer uses the sigmoid function to classify the total values acquired from hidden layers into two classes, 1 for healthy subjects and 0 for MI patients.Every neuron has some basic features known as the input, weight (w), and bias (b) which get updated during the learning process. Each neuron takes x-values as an input (from the range of 1 ton) and multiplies x with w, and adds b in the final results to calculate output value as shown below:(1)Z=w1x1+w2x2+…+w3x3+b.The weights are tuned continuously after estimating the error between calculated and actual output. Finally, the results from equation (1) are fed into the activation function as expressed in the following equation: (2)Outputn=activationZ=g∑i=1nwixi+b,where g is the activation function to calculate the output. The neural network architecture is completely connected and each neuron from one layer is connected to all neurons of the other layer. For the hidden layer, output from the first layer is used as an input, and the hidden layer processes this input similar to the first layer, to produce output for the next layer. Afterward, as we have to classify two classes, the loss function of binary cross-entropy has been incorporated as shown in the following equation:(3)Hq=−1N∑i=1nyi⋅logpyi+1−yi⋅log1−pyi,where yi is the target value (1 for healthy subjects and 0 for MI patients) and p(y) is the probability for the point to be a healthy subject for all N points. For each healthy subject (y = 1), log(p(y)) is added to the loss indicating the log probability of its being a healthy subject. On the contrary, log(1 − p(y)) is added into the loss for MI patients indicating the log probability of its being a patient. Optimizers are used to minimize the cost function by tuning the parameters of the neural network. Traditional optimizers need to be tuned manually, whereas adaptive optimizers automatically adopt the values for parameters. In the proposed ANN, an adaptive optimizer, Adam optimizer [61], is used for updating weights iteratively. Adam optimizer is computationally efficient, requires fewer resources, and is usually suitable for problems with a large number of data points or parameters and very sparse gradients.


### 3.5. Training

One of the crucial points in classification problems is the tuning of the hyperparameters for the proposed classification model. Hyperparameters like batch size, epoch’s number, and learning rate may affect the overall performance of the ANN model significantly, for MI detection and classification [48]. Though different methods are proposed to tune the hyperparameters [62]; there is still no state-of-the-art procedure for tuning. In this study, the grid search technique [63] is applied for tuning in which best values are discovered from some random values that produce the best classification results. For the training of the proposed model, the loss function of binary cross-entropy and Adam optimizer has been incorporated with 150 epochs and a mini-batch size of 10. The hyperparameters are tuned to attain optimal results.


### 3.6. Performance Evaluation

Dataset is split into training and testing data to evaluate the performance of the proposed model. For performance evaluation, commonly used matrices for MI detection and classification, i.e., accuracy (Ac), sensitivity (Sn), specificity (Sp), andF1, are computed.(4)Ac=TP+TNTP+TN+FP+FN×100%,Sn=TPTP+FN×100%,Sp=TNTN+FP×100%,Pp=TPTP+FP×100%,F1=2×Sn×PpSn+Pp×100%,where TP and FN represent MI patients predicted as MI and HS, whereas TN and FP depict the HS predicted as HS and MI patients, respectively.


### 3.7. Tools and Techniques

For preprocessing of signals and features extraction, RR-APET software [64] is used, which is open source and publicly available free of cost. RR-APET software is an alternative HRV analysis software for Kubios [4] in terms of performance. The proposed ANN model is implemented in Python using TensorFlow and Keras libraries for which the anaconda platform is used. TensorFlow [65] is a library used to perform various machine learning tasks, using the central processing unit (CPU) and mostly graphical processing units (GPUs) for increasing efficiency. TensorFlow is a backend library, whereas Keras is used on the top of Tensorflow. Though both are used to build and train the models, Keras is exceptionally user-friendly and easy to use as compared to TensorFlow [66]. For efficient results, the proposed neural network is implemented on Google Colab.


## 3.1. Dataset

In the current study, ECG signals are used from the PTB dataset [52], publicly available at physioNet. The dataset consists of signals for 290 subjects, including 52 healthy subjects, 148 MI patients, and 68 subjects suffering from some other CVD, whereas no clinical information is available for 22 subjects. Subjects’ numbers 124, 132, 134, and 161 are missing from the dataset. For each subject, there are one to five records and each record consists of 15 ECGs; 12 for conventional ECG leads while 3 ECGs for frank leads. Each signal is digitized at a sampling rate of 1000 Hz.


## 3.2. Preprocessing

In the preprocessing stage, the QRS complex is detected, followed by denoising and downsampling. A high-pass filter with a cut-off frequency of 0.5 Hz is used to remove baseline wanders, including low-frequency ST segments. A band-pass filter is also used to overcome the effects of power line interferences. The denoised signals are analyzed in the frequency domain to rectify the phase and to enhance the R-peaks using the Hilbert transform. Subsequently, R-peaks are detected from the QRS complex using the thresholding. Afterward, downsampling is performed as a sampling rate of 250 Hz is enough for extracting reliable HRV analysis matrices and also alleviates the computation burden [25, 53]. Furthermore, each record is of duration from 30 seconds to ∼2 minutes. Since all of the time-domain parameters cannot be calculated for ECG signals (<1 minute), subjects having ECG recordings of 30 seconds are excluded. Though each lead is placed at a different position at the chest and provides different useful diagnostic characteristics still lead II is commonly used to classify ECG signals [8, 33, 45, 48–51, 54, 55]. Therefore, ECG signals from lead II for 187 subjects are included in the study for the final analysis.


## 3.3. Features Extraction

Currently, short-term analysis is preferred for CVDs analysis due to its reliability. However, various recent studies are trying to embed HRV analysis in portable and wearable devices by shortening the length of HRV excerpts. Therefore, we have extracted different TD, FD, and NL US-HRV analysis features from signals of shorter length (∼2 minutes), listed in Table1.Table 1
HRV analysis features extracted from linear (TD & FD) and nonlinear domain according to the standard guidelines [5–7].
CategoryFeaturesDescriptionNo. of featuresReferenceTimeDomainFeaturesmeanRRMean of consecutive RR intervals (RRI)1[6, 7]SDNNStandard deviation (SD) of RRI1[6, 7]SDANNSD of averaged RRI1[6, 7]RMSSDRoot mean square of consecutive differences1[6, 7]pNN50%Proportion of the number of RRI with difference of more than 50 ms1[6, 7]FrequencyDomainFeaturesVLFpeakPeak frequency value in VLF range (f ≤ 0.04 Hz)1[6, 7]LFpeakPeak frequency value in LF range (0.04 ≤f ≤ 0.15 Hz)1[6, 7]HFpeakPeak frequency value in HF range (0.15 ≤f ≤ 0.4 Hz)1[6, 7]VLFAPSpectral absolute power in VLF range (f ≤ 0.04 Hz)1[6, 7]LFAPSpectral absolute power in LF range (0.04 ≤f ≤ 0.15 Hz)1[6, 7]HFAPSpectral absolute power in HF range (0.15 ≤f ≤ 0.4 Hz)1[6, 7]LF/HFRatio of LF and HF1[6, 7]Poincare analysisSD1The SD of the instantaneous beat-to-beat variability1[7]SD2The SD of consecutive or long-term variability1[7]Detrended fluctuation analysisAlpha 1Alpha 2DFA features2[7]Recurrence analysisREC, DET, LAM, Lmean(bts),Lmax(bts),Vmean(bts), Vmax(bts),Recurrence analysis features,d = 10, lag = 17[5]


### 3.3.1. Time-Domain HRV Analysis Features

TD features are extracted from RR intervals (RRI) of the heartbeat. Five features are considered according to the guidelines [6, 7], including mean of consecutive RRI (mean RR), standard deviation (SD) of RRI (SDNN), SD of averaged RRI (SDANN), root mean square of consecutive differences (RMSSD), and proportion of the number of RRI with a difference of more than 50 ms, to the total number of RRI (pNN50%).


### 3.3.2. Frequency Domain HRV Analysis Features

The FD features are extracted through the power spectral density (PSD) estimations. There are different methods to perform spectral analysis. However, PSD estimation for HRV analysis is usually performed through Fast Fourier Transform (FFT) autoregressive (AR) and Lomb-Scargle (LS) periodograms [56]. Though these methods obtain comparable results in most cases, they differentiate regarding preprocessing and length of ECG signal. FFT has a nonequal distancing problem and usually requires interpolation to convert data at an equal distance that can introduce biases in the data, whereas AR and LS periodograms do not need interpolation [13, 56]. Furthermore, FFT typically requires an ECG signal of at least 5 minutes, whereas the AR model works on shorter ECG signals of 2 minutes [56]. According to [25, 56], the LS periodogram has outperformed both traditionally used FFT and AR methods and has been used in recent studies for HRV analysis to detect CVDs [2, 15]. Therefore, we have calculated ten frequency domain features through an LS-based periodogram.HRV analysis spectrum is mostly divided into three major frequency bands: very low frequency (VLF), low frequency (LF), and high frequency (HF) [6]. We have extracted peak values of these bands, absolute power values (VLFAP, LFAP, and HFAP), and LF/HF. Though a study [57] has contradicted the hypothesis for LF/HF, it is still widely used as an HRV measure [7].


### 3.3.3. Nonlinear Domain HRV Analysis Features

Though, initially, just time and frequency domain features were involved in HRV analysis but, now nonlinear features are widely used along with linear features. Nonlinear methods are used to quantify the complexity and short-term variations produced by RR intervals. For nonlinear features, we have extracted Poincare plot [58], recurrence analysis features [2], and Detrended Fluctuation Analysis (DFA) parameters [59] according to the recent guidelines regarding HRV analysis [7].


## 3.3.1. Time-Domain HRV Analysis Features

TD features are extracted from RR intervals (RRI) of the heartbeat. Five features are considered according to the guidelines [6, 7], including mean of consecutive RRI (mean RR), standard deviation (SD) of RRI (SDNN), SD of averaged RRI (SDANN), root mean square of consecutive differences (RMSSD), and proportion of the number of RRI with a difference of more than 50 ms, to the total number of RRI (pNN50%).


## 3.3.2. Frequency Domain HRV Analysis Features

The FD features are extracted through the power spectral density (PSD) estimations. There are different methods to perform spectral analysis. However, PSD estimation for HRV analysis is usually performed through Fast Fourier Transform (FFT) autoregressive (AR) and Lomb-Scargle (LS) periodograms [56]. Though these methods obtain comparable results in most cases, they differentiate regarding preprocessing and length of ECG signal. FFT has a nonequal distancing problem and usually requires interpolation to convert data at an equal distance that can introduce biases in the data, whereas AR and LS periodograms do not need interpolation [13, 56]. Furthermore, FFT typically requires an ECG signal of at least 5 minutes, whereas the AR model works on shorter ECG signals of 2 minutes [56]. According to [25, 56], the LS periodogram has outperformed both traditionally used FFT and AR methods and has been used in recent studies for HRV analysis to detect CVDs [2, 15]. Therefore, we have calculated ten frequency domain features through an LS-based periodogram.HRV analysis spectrum is mostly divided into three major frequency bands: very low frequency (VLF), low frequency (LF), and high frequency (HF) [6]. We have extracted peak values of these bands, absolute power values (VLFAP, LFAP, and HFAP), and LF/HF. Though a study [57] has contradicted the hypothesis for LF/HF, it is still widely used as an HRV measure [7].


## 3.3.3. Nonlinear Domain HRV Analysis Features

Though, initially, just time and frequency domain features were involved in HRV analysis but, now nonlinear features are widely used along with linear features. Nonlinear methods are used to quantify the complexity and short-term variations produced by RR intervals. For nonlinear features, we have extracted Poincare plot [58], recurrence analysis features [2], and Detrended Fluctuation Analysis (DFA) parameters [59] according to the recent guidelines regarding HRV analysis [7].


## 3.4. Classification Algorithm

In the proposed methodology, an ANN model with three layers is implemented. The first layer is the input layer having 23 neurons and rectified linear unit (Relu) as activation function. The second layer is the hidden layer that constructs the model, consists of 12 neurons, and has the same activation function Relu. Relu function is computed by using the relation:R(x) = max(0, x), which gives an output x if it is a positive value; otherwise, it returns 0 value. Relu function improves the performance of the ANN model by introducing sparsity and restrains the appearance of overfitting that can reduce the efficiency of a model by alleviating the dependence of parameters [60]. The output layer uses the sigmoid function to classify the total values acquired from hidden layers into two classes, 1 for healthy subjects and 0 for MI patients.Every neuron has some basic features known as the input, weight (w), and bias (b) which get updated during the learning process. Each neuron takes x-values as an input (from the range of 1 ton) and multiplies x with w, and adds b in the final results to calculate output value as shown below:(1)Z=w1x1+w2x2+…+w3x3+b.The weights are tuned continuously after estimating the error between calculated and actual output. Finally, the results from equation (1) are fed into the activation function as expressed in the following equation: (2)Outputn=activationZ=g∑i=1nwixi+b,where g is the activation function to calculate the output. The neural network architecture is completely connected and each neuron from one layer is connected to all neurons of the other layer. For the hidden layer, output from the first layer is used as an input, and the hidden layer processes this input similar to the first layer, to produce output for the next layer. Afterward, as we have to classify two classes, the loss function of binary cross-entropy has been incorporated as shown in the following equation:(3)Hq=−1N∑i=1nyi⋅logpyi+1−yi⋅log1−pyi,where yi is the target value (1 for healthy subjects and 0 for MI patients) and p(y) is the probability for the point to be a healthy subject for all N points. For each healthy subject (y = 1), log(p(y)) is added to the loss indicating the log probability of its being a healthy subject. On the contrary, log(1 − p(y)) is added into the loss for MI patients indicating the log probability of its being a patient. Optimizers are used to minimize the cost function by tuning the parameters of the neural network. Traditional optimizers need to be tuned manually, whereas adaptive optimizers automatically adopt the values for parameters. In the proposed ANN, an adaptive optimizer, Adam optimizer [61], is used for updating weights iteratively. Adam optimizer is computationally efficient, requires fewer resources, and is usually suitable for problems with a large number of data points or parameters and very sparse gradients.


## 3.5. Training

One of the crucial points in classification problems is the tuning of the hyperparameters for the proposed classification model. Hyperparameters like batch size, epoch’s number, and learning rate may affect the overall performance of the ANN model significantly, for MI detection and classification [48]. Though different methods are proposed to tune the hyperparameters [62]; there is still no state-of-the-art procedure for tuning. In this study, the grid search technique [63] is applied for tuning in which best values are discovered from some random values that produce the best classification results. For the training of the proposed model, the loss function of binary cross-entropy and Adam optimizer has been incorporated with 150 epochs and a mini-batch size of 10. The hyperparameters are tuned to attain optimal results.


## 3.6. Performance Evaluation

Dataset is split into training and testing data to evaluate the performance of the proposed model. For performance evaluation, commonly used matrices for MI detection and classification, i.e., accuracy (Ac), sensitivity (Sn), specificity (Sp), andF1, are computed.(4)Ac=TP+TNTP+TN+FP+FN×100%,Sn=TPTP+FN×100%,Sp=TNTN+FP×100%,Pp=TPTP+FP×100%,F1=2×Sn×PpSn+Pp×100%,where TP and FN represent MI patients predicted as MI and HS, whereas TN and FP depict the HS predicted as HS and MI patients, respectively.


## 3.7. Tools and Techniques

For preprocessing of signals and features extraction, RR-APET software [64] is used, which is open source and publicly available free of cost. RR-APET software is an alternative HRV analysis software for Kubios [4] in terms of performance. The proposed ANN model is implemented in Python using TensorFlow and Keras libraries for which the anaconda platform is used. TensorFlow [65] is a library used to perform various machine learning tasks, using the central processing unit (CPU) and mostly graphical processing units (GPUs) for increasing efficiency. TensorFlow is a backend library, whereas Keras is used on the top of Tensorflow. Though both are used to build and train the models, Keras is exceptionally user-friendly and easy to use as compared to TensorFlow [66]. For efficient results, the proposed neural network is implemented on Google Colab.


## 4. Results and Discussions

In this research article, a novel technique is proposed for detecting and classifying MI. The proposed methodology uses HRV analysis of ECG signals to detect MI. For HRV analysis, ECG signals are acquired from a standard dataset PTB, which has been used for MI detection by numerous researchers and is publicly available. PTB dataset consists of 148 records for MI patients and 52 for HS. After performing preprocessing, resampling, and data selection, a total of 23 HRV analysis features were extracted, including 5 TD, 10 FD features from Lomb-Scargle, and 11 NL features (2 from Poincare Plot, 2 from Detrended Fluctuation Analysis, and 7 from Recurrence Analysis). HRV analysis features commonly used in literature are summarized and compared for both classes using boxplots, as shown in Figure2.Figure 2
(a-m) The plot boxes for different HRV features commonly used in literature. (a-e) box plots for summarizing and comparing values for commonly used TD HRV features that show higher values for controls compared to MI patients. All box plots are drawn using the actual values for features. (f-i) are box plots for FD features that also showed higher values for healthy subjects. Due to high variation between min and max values, box plots for VLF_AP, LF_AP, and HF_AP are drawn after normalization to make the graph clear and visible, whereas for LF/HF, actual values are used. Similarly, (j) and (k) show box plots for PCP features, whereas (l) and (m) are box plots for DFA features that are also drawn using actual values.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)Usually, MI detection is performed based on two types of evaluation, i.e., class-based evaluation and subject-based evaluation. In class-based evaluation, data is randomly split into training and testing data, although there may be variation among different records, and overlap of patients is also possible in training and testing data. Contrarily, for subject-based evaluation, a model is trained on a specific dataset and tested using the data of different patients. Though the subject-based approach is more generalized than class-based, the first one is being used by most researchers for MI detection. Currently, this is the first study to perform HRV analysis for MI detection and classification; therefore, we have just performed class-based evaluation in this study.For MI detection and classification, a finely tuned customized 3-layered ANN was applied on extracted features to calculate evaluation matrices commonly used in literature. At the first layer, HRV analysis features were fed as input, and the Relu activation function was applied on 23 neurons. Similarly, at the second layer Relu function was applied on 12 neurons to train the model. At both layers, Relu was used to avoid overfitting while training the model, and weights were updated using Adam optimizer at each iteration. Finally, at the output layer, binary cross-entropy was incorporated as the loss function and for classification. The classification results were validated using K-fold validation to avoid any biases in results. Table2 shows the computed evaluation matrices for 10-folds and averaged results are used for the evaluation of the model. It is obvious from Table 2 that the performance of the proposed methodology for MI detection is adequate. For MI detection, averaged 99.1% accuracy, 100% sensitivity, 98.1% specificity, and 99.0% F1 are achieved. For the first 2-fold, only sensitivity for MI patients and specificity for HS is 100%, whereas for the remaining 8-fold, all matrices are 100% which shows that after 2-fold, all of the MI patients and HS are detected correctly. Moreover, little difference at the first 2-fold, whereas no difference for the remaining 8-fold shows the reliability and robustness of the algorithm. Furthermore, Table 3 shows the contribution of both classes, i.e., HS and MI, which highlights that both classes have been detected correctly with an average of 98.85% accuracy, 97.40% sensitivity, 99.05% specificity, and 97.70% F1 score. Finally, though DL models often take more time to complete their execution as compared to ML models, the proposed ANN completed its execution in just 59 seconds. Thus, the proposed model can be used in wearable devices performing HRV analysis for MI detection with high performance as we have used just 2 min ECG signals.Table 2
10-fold cross validation results for MI detection.
FoldAccuracy (%)Sensitivity (%)Specificity (%)F1 (%)19410088932971009397310010010010041001001001005100100100100610010010010071001001001008100100100100910010010010010100100100100Average99.110098.199.0Table 3
Results for classification of MI and HS across 10-fold cross validation.
ClassAccuracy (%)Sensitivity (%)Specificity (%)F1 (%)MI99.110098.199.0HS98.694.810096.4Average98.8597.4099.0597.70Numerous researchers have proposed different approaches for MI detection and classification using the PTB dataset, which is publicly available on PhysioNet. Different types of preprocessing steps are applied and different numbers of leads and features are used following different ML and/or DL methods for detection or classification of MI. Different studies performing different MI detection and classification techniques and their performance are elaborated in the remaining part of the discussion section. Afterward, Table4 summarizes a few latest and the proposed methodology that processed ECG records instead of specific or corrected beats from signals to detect MI. Six out of twelve studies reported in Table 4 have applied SVM to detect MI where Han and Shi [42] achieved the best results, i.e., greater than 99% for all evaluation matrices. Four studies have applied CNN, one study applied logistic regression and, one study applied RF to detect MI from ECG records. Seven studies have reported averaged results after 10-fold cross-validation (CV) and three performed 5-fold validation, whereas two studies have not mentioned it explicitly. The proposed study has applied one of the basic deep learning models (ANN) and achieved excellent results by achieving 100% sensitivity for MI detection. The results are reported after a 10-fold CV to avoid any biases in results.Table 4
Comparison of the proposed methodology with the recent studies performing MI detection using the ECG signals from the PTB database. Comparison comprises a number of records for normal subjects and MI patients, number of leads used, type and number of features, classification algorithm, k-fold CV, and evaluation matrices commonly used in literature.
AuthorYearDataset used (leads)FeaturesNo of featuresClassifier/methodologyValidation methodEvaluation parametersSharma and Sunkaria [38]2017Records: 3240 IMI, 3037 normal (3)Stationary wavelet transform entropy/energy10SVM10-CVAc = 98.84Sn = 99.35Sp = 98.29Padhy and Dandapat [39]2017Records: 369 MI, 79 normal (12)Singular value decomposition and wavelet energy35SVM5-CVAc = 95.3Sn = 94.6Sp = 96.0Dohare et al. [26]2018Records: 60 MI, 60 normal (12)Amplitude, area, mean, standard deviation, skewness kurtosis of P, QRS, and ST-T;14SVM---Ac = 96.66Sn = 96.66Sp = 96.66Sadhukhan et al. [37]2018Records: 308 MI, 65 normal (3)6 discrete fourier transform phase values (2 per lead)6Logistic regression/threshold based5-CVAc = 95.6Sn = 96.5Sp = 92.7Sopic et al. [40]2018Records: 52 MI, 52 normal (1)Time/frequency features72RF---Ac = 82.36Sn = 87.95Sp = 78.82Diker et al. [33]2018Records:148 MI, 52 normal (1)Morphological, time-domain and discrete wavelet transform features9SVM10-CVAc = 87.8Sn = 86.97Sp = 88.67Lui and Chow [45]2018Records: 368 MI, 80 normal, 74 other, 278 noisy (1)Hand-crafted features including few time-domain HRV analysis features26CNN-LSTM stacking decoding10-CVSn = 92.4Sp = 97.7F1 = 94.6Han and Shi [42]2019Records: 28213 MI, 5373 normal (12)Energy entropy based on MODWPT; morphologicalfeatures18SVM10-CVAc = 99.75Sn = 99.37Pp = 99.70F1 = 99.54Feng et al. [49]2019Records: 368 MI, 80 normal (1)No features extraction---CNN-LSTM10-CVAc = 95.4Sn = 98.2Sp = 86.5F1 = 96.8Alghamdi et al. [50]2020Records: 80, 364 MI, 21,092 normal (1)Data augmentation, no feature extraction---CNN10-CVAc = 99.02Sn = 98.79Sp = 99.49Hammad et al. [51]2021Records: 368 MI, 181 normal (1)No features extraction---CNN + focal loss5-CVAc = 98.8Sn = 97.6Sp = 98.3F1 = 97.9Sridhar et al. [67]2021Records: 148 MI, 52 normal (1)Nonlinear features---SVM10-CVAc = 97.96Sn = 98.89Sp = 93.80Proposed2021Records: 148 MI, 52 normal (1)Time domain, frequency domain, nonlinear HRV analysis features23ANN10-CVAc = 99.1Sn = 100Sp = 98.1F1 = 99.0SVM: support vector machine, CNN: convolutional neural network, RF: random forest, LSTM: long short-term memory, CV: cross validation, MI: myocardial Infarction, ANN: artificial neural network.Dohare et al. [26] used TD features and applied SVM to achieve accuracy, sensitivity, and specificity of 96.6% with 14 features. Diker et al. [33] extracted FD parameters in conjunction with TD features and 9 out of 23 features were used to separate the MI cases from healthy subjects by applying SVM. They achieved 87.80% accuracy, 86.97% sensitivity, and 88.67% specificity. Sadhukhan et al. [37] identified two discriminatory features from three leads and applied logistic regression to detect MI with an averaged 95.6% accuracy, 96.5% sensitivity, and 92.7% specificity. Han and Shi [42] fused energy entropy and morphological features extracted from a single lead. Based on this single-lead features, features from all the twelve leads are fused with energy entropy to detect MI. After applying principal component analysis (PCA) to reduce dimensional complexity, SVM achieved the highest accuracy of 99.75%, the sensitivity of 99.37%, whereas F1 of 83.26% with 22 features from 12 leads. Similarly, Sharma and Sunkaria [38] achieved 81.71% accuracy, 79.01% sensitivity, 79.26% specificity with SVM to detect MI using three leads (II, III, and a VF). Padhy and Dandapat [39] detected MI by applying a 2-D multilead ECG tensor and achieved 95.3% accuracy, 94.6% sensitivity, and 96% specificity. Sopic et al. [40] extracted multiple TD and FD features and fed them into the RF classifier to classify MI. They achieved 83.26% accuracy, 87.95% sensitivity, and 78.82% specificity. In a recent study, Sridhar et al. [67] extracted NL features from lead II and applied SVM to detect MI with 97.96% accuracy, 98.89% sensitivity, and 93.80% specificity after 10-fold validation. Lui and Chow [45] implemented a combination of CNN and recurrent neural networks (RNN) on hand-crafted features, including time-domain HRV analysis features from single-lead ECG data, and detected MI with the highest 92.4% sensitivity, 97.7% specificity, and F1 score of 94.6%. The other three studies utilized DL models’ self-ability of learning and extracting useful features from raw ECG data. Feng et al. [49] applied a combination of CNN and LSTM to preprocessed signals and achieved 95.4% accuracy, 98.2% sensitivity, 86.5% specificity, and 96.8% F1 score. Alghamdi et al. [50] also applied a finely tuned CNN followed by preprocessing to achieve MI detection accuracy of 99.02%, sensitivity of 98.79%, and specificity of 99.49%. Hammad et al. [51] applied CNN directly to raw data and detected MI without any preprocessing and features extraction. They achieved 98.8% accuracy, 97.6% sensitivity, 98.3% specificity, and 97.9% F1 score.Consequently, this is the first study to perform HRV analysis for MI detection. Comparison with literature indicates that the proposed ANN model performs better MI detection and also achieved better classification results by performing HRV analysis of ECG signals. Though the dataset was not so large, it still indicates better performance when compared to the recent studies, as the same standard dataset PTB was used. Therefore, we may suggest adopting our methodology in wearable devices performing HRV analysis to detect and classify MI.


## 5. Conclusion and Future Work

In this study, a robust ANN model was proposed to detect and classify MI from healthy subjects using only lead II data. The proposed model performed preprocessing including denoising to remove baseline wanders and downsampling to alleviate the computational cost. Short-term HRV analysis of ECG signals is preferred due to its reliability. However, various studies are trying to embed HRV analysis in portable or wearable devices. Therefore, US-HRV analysis was performed to compute HRV analysis features and then a finely tuned ANN algorithm was applied to these HRV features. The customized ANN achieved impressive MI detection and classification results compared to the other studies from literature performing the same task. K-fold validation method was used to evaluate results without any biases and reported 99.1% accuracy, 100% sensitivity, 98.1% specificity, and 99.0%F1 for MI detection, whereas 98.85% accuracy, 97.4% sensitivity, 99.05% specificity, and 97.7% F1 score was achieved for classification. Furthermore, the ANN algorithm finished its execution in just 59 seconds, demonstrating the efficacy of the model. The overall performance in terms of computed evaluation matrices and execution time indicates the robustness and cost-effectiveness of the proposed methodology though further evaluation is needed for a large dataset. Notwithstanding, the proposed model can be used in wearable devices performing HRV analysis for MI detection with high performance as we have used just 2 min ECG signals.The main limitation of this study is that only class-based evaluation is performed. In the future, subject-independent CV can be performed in addition to some other deep learning models like CNN or LSTM to increase accuracy further. Similarly, the proposed model can be applied to diagnose other cardiovascular diseases. A shorter ECG may also be used for evaluation. In the current study, no extraordinary work was done for feature selection. Therefore, in the future, the most dominating features can be extracted by evaluating the results with different combinations of features. Similarly, 5-fold evaluation can be used instead of 10-fold, as no difference was seen in values of evaluation matrices after the first 2-fold. Furthermore, age and gender factors may also be added with HRV analysis features.



---

*Source: 6455053-2021-09-20.xml*