# ECG Heartbeat Classification Using Machine Learning and Metaheuristic Optimization for Smart Healthcare Systems

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Methodology

#### 2.1. Data Preprocessing and Feature Extraction

#### 2.2. Classification

#### 2.2.1. Support Vector Machine

#### 2.2.2. Gradient Boosting Decision Tree

#### 2.2.3. Random Forests

#### 2.2.4. K-Nearest Neighbor

#### 2.3. Marine Predator Algorithm (MPA)

#### 2.3.1. Initialization

#### 2.3.2. Elite and Prey Matrix Construction

#### 2.3.3. Optimization Process

#### 2.3.4. Parameters Optimization

Algorithm 1 Pseudo-code of MPA algorithm. |

1: Initialization step, P, TP, TF, ${\mathrm{P}\mathrm{y}}_{i}$. |

2: while t $<{t}_{max}$ do |

3: Compute the fitness value of each ${\overrightarrow{py}}_{i},f\left(\right)open="("\; close=")">{\overrightarrow{py}}_{i}$ |

4: Construct E |

5: Implement the memory saving |

6: Update $CF$ using Equation (16) |

7: for each $p{y}_{i}$ do |

8: if $\left(\right)$ then |

9: Reposition the current ${\overrightarrow{py}}_{i}$ based on Equation (11) |

10: else |

11: if $\left(\right)$ then |

12: if $\left(\right)$ then |

13: Reposition the current ${\overrightarrow{py}}_{l}$ using Equation (13) |

14: else |

15: Reposition the current ${\overrightarrow{py}}_{i}$ using Equation (15) |

16: end if |

17: else |

18: Reposition the current ${\overrightarrow{py}}_{i}$ using Equation (18) |

19: end if |

20: end if |

21: end for |

22: Compute the fitness value of each ${\overrightarrow{py}}_{i},f\left(\right)open="("\; close=")">{\overrightarrow{py}}_{i}$ |

23: Update $TopPradatorPos$, and $TopPredatorFit$. |

24: Apply the memory saving |

25: Apply the FADS for ∀ ${\mathrm{py}}_{i}$ |

26: $\mathrm{t}++$ |

27: end while |

## 3. Experiments and Results

#### 3.1. Database Descriptions

#### 3.1.1. The MIT-BIH Arrhythmia Dataset (MIT-BIH)

#### 3.1.2. The European ST-T Dataset (EDB)

#### 3.1.3. St. Petersburg INCART Dataset (INCART)

#### 3.2. Evaluation Criteria

#### 3.3. Performance Evaluation

#### 3.3.1. Evaluation of the MPA-SVM

#### 3.3.2. Evaluation of the MPA-GBDT

#### 3.3.3. Evaluation of the MPA-RF

#### 3.3.4. Evaluation of the MPA-kNN

#### 3.4. Comparison with Other Methods

## 4. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Ismail, A.R.; Jovanovic, S.; Ramzan, N.; Rabah, H. ECG Classification Using an Optimal Temporal Convolutional Network for Remote Health Monitoring. Sensors
**2023**, 23, 1697. [Google Scholar] [CrossRef] [PubMed] - Huang, Y.; Li, H.; Yu, X. A novel time representation input based on deep learning for ECG classification. Biomed. Signal Process. Control
**2023**, 83, 104628. [Google Scholar] [CrossRef] - Wang, W.; Kumar, N.; Chen, J.; Gong, Z.; Kong, X.; Wei, W.; Gao, H. Realizing the Potential of Internet of Things for Smart Tourism with 5G and AI. IEEE Netw.
**2020**, 34, 295–301. [Google Scholar] [CrossRef] - Balasundaram, A.; Routray, S.; Prabu, A.; Krishnan, P.; Malla, P.P.; Maiti, M. Internet of things (IoT) based Smart Healthcare System for Efficient Diagnostics of Health Parameters of Patients in Emergency Care. IEEE Internet Things J.
**2023**. [Google Scholar] [CrossRef] - Sangaiah, A.K.; Arumugam, M.; Bian, G.B. An intelligent learning approach for improving ECG signal classification and arrhythmia analysis. Artif. Intell. Med.
**2020**, 103, 101788. [Google Scholar] [CrossRef] - Yang, S.; Lian, C.; Zeng, Z.; Xu, B.; Zang, J.; Zhang, Z. A Multi-View Multi-Scale Neural Network for Multi-Label ECG Classification. IEEE Trans. Emerg. Top. Comput. Intell.
**2023**. [Google Scholar] [CrossRef] - Irfan, S.; Anjum, N.; Althobaiti, T.; Alotaibi, A.A.; Siddiqui, A.B.; Ramzan, N. Heartbeat Classification and Arrhythmia Detection Using a Multi-Model Deep-Learning Technique. Sensors
**2022**, 22, 5606. [Google Scholar] [CrossRef] - Subasi, A.; Dogan, S.; Tuncer, T. A novel automated tower graph based ECG signal classification method with hexadecimal local adaptive binary pattern and deep learning. J. Ambient. Intell. Humaniz. Comput.
**2023**, 14, 711–725. [Google Scholar] [CrossRef] - Tripoliti, E.E.; Papadopoulos, T.G.; Karanasiou, G.S.; Naka, K.K.; Fotiadis, D.I. Heart failure: Diagnosis, severity estimation and prediction of adverse events through machine learning techniques. Comput. Struct. Biotechnol. J.
**2017**, 15, 26–47. [Google Scholar] [CrossRef] [Green Version] - Chandra, B.S.; Sastry, C.S.; Jana, S. Robust heartbeat detection from multimodal data via CNN-based generalizable information fusion. IEEE Trans. Biomed. Eng.
**2019**, 66, 710–717. [Google Scholar] [CrossRef] [Green Version] - Mewada, H. 2D-wavelet encoded deep CNN for image-based ECG classification. Multimed. Tools Appl.
**2023**, 1–17. [Google Scholar] [CrossRef] - Ebrahimi, Z.; Loni, M.; Daneshtalab, M.; Gharehbaghi, A. A review on deep learning methods for ECG arrhythmia classification. Expert Syst. Appl. X
**2020**, 7, 100033. [Google Scholar] [CrossRef] - Murat, F.; Yildirim, O.; Talo, M.; Baloglu, U.B.; Demir, Y.; Acharya, U.R. Application of deep learning techniques for heartbeats detection using ECG signals-analysis and review. Comput. Biol. Med.
**2020**, 120, 103726. [Google Scholar] [CrossRef] - Yao, Q.; Wang, R.; Fan, X.; Liu, J.; Li, Y. Multi-class Arrhythmia detection from 12-lead varied-length ECG using Attention-based Time-Incremental Convolutional Neural Network. Inf. Fusion
**2020**, 53, 174–182. [Google Scholar] [CrossRef] - Ye, C.; Kumar, B.V.; Coimbra, M.T. An automatic subject-adaptable heartbeat classifier based on multiview learning. IEEE J. Biomed. Health Inform.
**2016**, 20, 1485–1492. [Google Scholar] [CrossRef] [PubMed] - Wang, R.; Fan, J.; Li, Y. Deep Multi-Scale Fusion Neural Network for Multi-Class Arrhythmia Detection. IEEE J. Biomed. Health Inform.
**2020**, 24, 2461–2472. [Google Scholar] [CrossRef] - Chen, C.; Hua, Z.; Zhang, R.; Liu, G.; Wen, W. Automated arrhythmia classification based on a combination network of CNN and LSTM. Biomed. Signal Process. Control
**2020**, 57, 101819. [Google Scholar] [CrossRef] - Atal, D.K.; Singh, M. Arrhythmia classification with ECG signals based on the optimization-enabled deep convolutional neural network. Comput. Methods Programs Biomed.
**2020**, 196, 105607. [Google Scholar] [CrossRef] - Wu, Q.; Sun, Y.; Yan, H.; Wu, X. ECG signal classification with binarized convolutional neural network. Comput. Biol. Med.
**2020**, 121, 103800. [Google Scholar] [CrossRef] - Li, Q.; Rajagopalan, C.; Clifford, G.D. A machine learning approach to multi-level ECG signal quality classification. Comput. Methods Programs Biomed.
**2014**, 117, 435–447. [Google Scholar] [CrossRef] - Khorrami, H.; Moavenian, M. A comparative study of DWT, CWT and DCT transformations in ECG arrhythmias classification. Expert Syst. Appl.
**2010**, 37, 5751–5757. [Google Scholar] [CrossRef] - Santos, M.A.; Munoz, R.; Olivares, R.; Rebouças Filho, P.P.; Del Ser, J.; de Albuquerque, V.H.C. Online heart monitoring systems on the internet of health things environments: A survey, a reference model and an outlook. Inf. Fusion
**2020**, 53, 222–239. [Google Scholar] [CrossRef] - Ye, C.; Kumar, B.V.; Coimbra, M.T. Heartbeat classification using morphological and dynamic features of ECG signals. IEEE Trans. Biomed. Eng.
**2012**, 59, 2930–2941. [Google Scholar] [PubMed] - Raj, S.; Ray, K.C. Sparse representation of ECG signals for automated recognition of cardiac arrhythmias. Expert Syst. Appl.
**2018**, 105, 49–64. [Google Scholar] [CrossRef] - Haldar, N.A.H.; Khan, F.A.; Ali, A.; Abbas, H. Arrhythmia classification using Mahalanobis distance based improved Fuzzy C-Means clustering for mobile health monitoring systems. Neurocomputing
**2017**, 220, 221–235. [Google Scholar] [CrossRef] - Zhang, S.; Li, Y.; Wang, X.; Gao, H.; Li, J.; Liu, C. Label decoupling strategy for 12-lead ECG classification. Knowl.-Based Syst.
**2023**, 263, 110298. [Google Scholar] [CrossRef] - Hou, B.; Yang, J.; Wang, P.; Yan, R. LSTM-Based Auto-Encoder Model for ECG Arrhythmias Classification. IEEE Trans. Instrum. Meas.
**2020**, 69, 1232–1240. [Google Scholar] [CrossRef] - Roshan, M.J.; Acharya, U.R.; Prasad, H.; Chua, C.K.; Lim, C.M.; Suri, J.S. Application of higher order statistics for atrial arrhythmia classification. Biomed. Signal Process. Control
**2013**, 8, 888–900. [Google Scholar] - Lu, W.; Hou, H.; Chu, J. Feature fusion for imbalanced ECG data analysis. Biomed. Signal Process. Control
**2018**, 41, 152–160. [Google Scholar] [CrossRef] - Hesar, H.D.; Mohebbi, M. A multi rate marginalized particle extended Kalman filter for P and T wave segmentation in ECG signals. IEEE J. Biomed. Health Inform.
**2019**, 23, 112–122. [Google Scholar] [CrossRef] - Rishi, S.R.; Pachori, R.B. Baseline wander and power line interference removal from ECG signals using eigenvalue decomposition. Biomed. Signal Process. Control
**2018**, 45, 33–49. [Google Scholar] - Kærgaard, K.; Jensen, S.H.; Puthusserypady, S. A comprehensive performance analysis of EEMD-BLMS and DWT-NN hybrid algorithms for ECG denoising. Biomed. Signal Process. Control
**2016**, 25, 178–187. [Google Scholar] [CrossRef] [Green Version] - Kaya, Y.; Uyar, M.; Tekin, R.; Yıldırım, S. 1D-local binary pattern based feature extraction for classification of epileptic EEG signals. Appl. Math. Comput.
**2014**, 243, 209–219. [Google Scholar] [CrossRef] - Nascimento, N.M.M.; Marinho, L.B.; Peixoto, S.A.; do Vale Madeiro, J.P.; de Albuquerque, V.H.C.; Rebouças Filho, P.P. Heart arrhythmia classification based on statistical moments and structural co-occurrence. Circuits Syst. Signal Process.
**2020**, 39, 631–650. [Google Scholar] [CrossRef] - Tuncer, T.; Dogan, S.; Pławiak, P.; Acharya, U.R. Automated arrhythmia detection using novel hexadecimal local pattern and multilevel wavelet transform with ECG signals. Knowl.-Based Syst.
**2019**, 186, 104923. [Google Scholar] [CrossRef] - Hearst, M.A.; Dumais, S.T.; Osuna, E.; Platt, J.; Scholkopf, B. Support vector machines. IEEE Intell. Syst. Their Appl.
**1998**, 13, 18–28. [Google Scholar] [CrossRef] [Green Version] - Lin, C.F.; Wang, S.D. Fuzzy support vector machines. IEEE Trans. Neural Netw.
**2002**, 13, 464–471. [Google Scholar] [PubMed] - Breiman, L. Random forests. Mach. Learn.
**2001**, 45, 5–32. [Google Scholar] [CrossRef] [Green Version] - Gislason, P.O.; Benediktsson, J.A.; Sveinsson, J.R. Random forests for land cover classification. Pattern Recognit. Lett.
**2006**, 27, 294–300. [Google Scholar] [CrossRef] - Jain, N.; Jana, P.K. LRF: A logically randomized forest algorithm for classification and regression problems. Expert Syst. Appl.
**2023**, 213, 119225. [Google Scholar] [CrossRef] - Faramarzi, A.; Heidarinejad, M.; Mirjalili, S.; Gandomi, A.H. Marine predators algorithm: A nature-inspired metaheuristic. Expert Syst. Appl.
**2020**, 152, 113377. [Google Scholar] [CrossRef] - Moody, G.B.; Mark, R.G. The impact of the MIT-BIH arrhythmia database. IEEE Eng. Med. Biol. Mag.
**2001**, 20, 45–50. [Google Scholar] [CrossRef] [PubMed] - Goldberger, A.L.; Amaral, L.A.; Glass, L.; Hausdorff, J.M.; Ivanov, P.C.; Mark, R.G.; Mietus, J.E.; Moody, G.B.; Peng, C.K.; Stanley, H.E. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation
**2000**, 101, e215–e220. [Google Scholar] [CrossRef] [Green Version] - Martis, R.J.; Acharya, U.R.; Mandana, K.; Ray, A.K.; Chakraborty, C. Cardiac decision making using higher order spectra. Biomed. Signal Process. Control
**2013**, 8, 193–203. [Google Scholar] [CrossRef] - Acharya, U.R.; Oh, S.L.; Hagiwara, Y.; Tan, J.H.; Adam, M.; Gertych, A.; San Tan, R. A deep convolutional neural network model to classify heartbeats. Comput. Biol. Med.
**2017**, 89, 389–396. [Google Scholar] [CrossRef] - Sharma, M.; Tan, R.S.; Acharya, U.R. Automated heartbeat classification and detection of arrhythmia using optimal orthogonal wavelet filters. Inform. Med. Unlocked
**2019**, 16, 100221. [Google Scholar] [CrossRef] - Li, H.; Yuan, D.; Wang, Y.; Cui, D.; Cao, L. Arrhythmia classification based on multi-domain feature extraction for an ECG recognition system. Sensors
**2016**, 16, 1744. [Google Scholar] [CrossRef] [Green Version] - Taiyong, L.; Min, Z. ECG classification using wavelet packet entropy and random forests. Entropy
**2016**, 18, 285. [Google Scholar] - Serkan, K.; Ince, T.; Gabbouj, M. Real-time patient-specific ECG classification by 1-D convolutional neural networks. IEEE Trans. Biomed. Eng.
**2015**, 63, 664–675. [Google Scholar] - Yang, H.; Wei, Z. Arrhythmia recognition and classification using combined parametric and visual pattern features of ECG morphology. IEEE Access
**2020**, 8, 47103–47117. [Google Scholar] [CrossRef] - Oh, S.L.; Ng, E.Y.; San Tan, R.; Acharya, U.R. Automated diagnosis of arrhythmia using combination of CNN and LSTM techniques with variable length heart beats. Comput. Biol. Med.
**2018**, 102, 278–287. [Google Scholar] [CrossRef] [PubMed] - Li, Z.; Zhou, D.; Wan, L.; Li, J.; Mou, W. Heartbeat classification using deep residual convolutional neural network from 2-lead electrocardiogram. J. Electrocardiol.
**2020**, 58, 105–112. [Google Scholar] [CrossRef] [PubMed] - Yıldırım, Ö.; Pławiak, P.; Tan, R.S.; Acharya, U.R. Arrhythmia detection using deep convolutional neural network with long duration ECG signals. Comput. Biol. Med.
**2018**, 102, 411–420. [Google Scholar] [CrossRef] - Shu-Lih, O.; Ng, E.Y.; San Tan, R.; Acharya, U.R. Automated beat-wise arrhythmia diagnosis using modified U-net on extended electrocardiographic recordings with heterogeneous arrhythmia types. Comput. Biol. Med.
**2019**, 105, 92–101. [Google Scholar] - Marinho, L.B.; de MM Nascimento, N.; Souza, J.W.M.; Gurgel, M.V.; Rebouças Filho, P.P.; de Albuquerque, V.H.C. A novel electrocardiogram feature extraction approach for cardiac arrhythmia classification. Future Gener. Comput. Syst.
**2019**, 97, 564–577. [Google Scholar] [CrossRef] - Yang, W.; Si, Y.; Wang, D.; Zhang, G. A novel approach for multi-lead ECG classification using DL-CCANet and TL-CCANet. Sensors
**2019**, 19, 3214. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Pławiak, P.; Acharya, U.R. Novel deep genetic ensemble of classifiers for arrhythmia detection using ECG signals. Neural Comput. Appl.
**2020**, 32, 11137–11161. [Google Scholar] [CrossRef] [Green Version] - Patro, K.K.; Jaya Prakash, A.; Jayamanmadha Rao, M.; Rajesh Kumar, P. An Efficient Optimized Feature Selection with Machine Learning Approach for ECG Biometric Recognition. IETE J. Res.
**2020**, 68, 2743–2754. [Google Scholar] [CrossRef]

Datasets | LBP | HOS + CM | HBF | DWT | RR | Total Number of Features |
---|---|---|---|---|---|---|

MIT-BIH | 60 | 12 + 1 | 16 | 32 | 10 | 131 |

EDB | 60 | 12 + 1 | 16 | 26 | 10 | 125 |

INCART | 60 | 12 + 1 | 16 | 26 | 10 | 125 |

Classifiers | Parameters | Range |
---|---|---|

SVM | C | [0.0001,1000] |

Gamma | [0.0001, 1] | |

GBDT | Max_depth | [1, 13] |

Gamma | [0.0001, 1] | |

Learning Rate | [0, 1] | |

RF | Max_depth | [1,13] |

Gamma | [0.0001, 1] | |

Learning Rate | [0, 1] | |

kNN | K | [1,13] |

Database | Subjects | Records | Leads | Location of Electrodes | Sample Rate | Resolution | Duration |
---|---|---|---|---|---|---|---|

MIT-BIH | 48 | 48 | 12 | Chest and limbs | 360 HZ | 11 | 30 min |

EDB | 79 | 90 | 2 | Chest and limbs | 250 HZ | 12 | 120 min |

INCART | 32 | 75 | 12 | Chest and limbs | 257 HZ | 12 | 30 min |

Database | MIT-BIH | EDB | INCART | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

Classes | $\mathrm{Acc}$ | $\mathrm{Se}$ | $\mathrm{Sp}$ | $\mathrm{Pr}$ | $\mathrm{F}1$ | $\mathrm{Acc}$ | $\mathrm{Se}$ | $\mathrm{Sp}$ | $\mathrm{Pr}$ | $\mathrm{F}1$ | $\mathrm{Acc}$ | $\mathrm{Se}$ | $\mathrm{Sp}$ | $\mathrm{Pr}$ | $\mathrm{F}1$ |

$\mathrm{N}$ | $99.14$ | $98.11$ | $99.48$ | $98.41$ | $98.26$ | $99.86$ | $99.7$ | $99.91$ | $99.72$ | $99.71$ | $99.23$ | $98.45$ | $99.48$ | $98.4$ | $98.43$ |

$\mathrm{S}$ | $99.51$ | $99.19$ | $99.61$ | $98.85$ | $99.02$ | $99.9$ | $99.85$ | $\mathbf{99.92}$ | $99.75$ | $99.8$ | $99.57$ | $99.45$ | $99.61$ | $98.84$ | $99.15$ |

$\mathrm{VEBs}$ | $99.51$ | $98.4$ | $\mathbf{99}.\mathbf{89}$ | $\mathbf{99}.\mathbf{67}$ | $99.03$ | $99.18$ | $97.93$ | $99.61$ | $98.83$ | $98.38$ | $99.9$ | $99.58$ | $\mathbf{100}$ | $\mathbf{100}$ | $\mathbf{99}.\mathbf{8}$ |

$\mathrm{F}$ | $\mathbf{99}.\mathbf{78}$ | $\mathbf{99}.\mathbf{9}$ | $99.74$ | $99.21$ | $\mathbf{99}.\mathbf{55}$ | $\mathbf{99}.\mathbf{93}$ | $\mathbf{99}.\mathbf{97}$ | $99.92$ | $99.75$ | $99.86$ | $\mathbf{99}.\mathbf{92}$ | $\mathbf{99}.\mathbf{9}$ | $\mathbf{99}.\mathbf{93}$ | $99.77$ | $99.84$ |

$\mathrm{Average}$ | $99.48$ | $98.90$ | $99.68$ | $99.03$ | $98.97$ | $99.90$ | $99.77$ | $99.94$ | $99.81$ | $99.79$ | $99.47$ | $98.93$ | $99.65$ | $98.96$ | $98.95$ |

Database | MIT-BIH | EDB | INCART | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

Classes | $\mathrm{Acc}$ | $\mathrm{Se}$ | $\mathrm{Sp}$ | $\mathrm{Pr}$ | $\mathrm{F}1$ | $\mathrm{Acc}$ | $\mathrm{Se}$ | $\mathrm{Sp}$ | $\mathrm{Pr}$ | $\mathrm{F}1$ | $\mathrm{Acc}$ | $\mathrm{Se}$ | $\mathrm{Sp}$ | $\mathrm{Pr}$ | $\mathrm{F}1$ |

$\mathrm{N}$ | $99.45$ | $98.97$ | $99.61$ | $98.81$ | $98.89$ | 99.89 | 99.67 | 99.96 | 99.87 | 99.77 | 99.6 | 99.33 | 99.69 | 99.04 | 99.18 |

$\mathrm{S}$ | $\mathbf{99}.\mathbf{7}$ | $99.4$ | $99.79$ | $99.39$ | $99.4$ | 99.91 | 99.94 | 99.91 | 99.73 | 99.83 | 99.77 | 99.74 | 99.78 | 99.35 | 99.55 |

$\mathrm{VEBs}$ | $99.62$ | $98.49$ | $\mathbf{100}$ | $\mathbf{100}$ | $99.24$ | 99.92 | 99.49 | 100 | 100 | 99.84 | 99.58 | 98.59 | 99.92 | 99.76 | 99.17 |

$\mathrm{F}$ | $99.69$ | $\mathbf{99}.\mathbf{73}$ | $99.68$ | $99.04$ | $99.39$ | 99.9 | 99.99 | 99.88 | 99.63 | 99.81 | 99.92 | 99.97 | 99.91 | 99.71 | 99.84 |

$\mathrm{Average}$ | $99.61$ | $99.15$ | $99.77$ | $99.31$ | $99.23$ | 99.91 | 99.77 | 99.95 | 99.85 | 99.81 | 99.72 | 99.41 | 99.82 | 99.47 | 99.44 |

Database | MIT-BIH | EDB | INCART | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

Classes | $\mathrm{Acc}$ | $\mathrm{Se}$ | $\mathrm{Sp}$ | $\mathrm{Pr}$ | $\mathrm{F}1$ | $\mathrm{Acc}$ | $\mathrm{Se}$ | $\mathrm{Sp}$ | $\mathrm{Pr}$ | $\mathrm{F}1$ | $\mathrm{Acc}$ | $\mathrm{Se}$ | $\mathrm{Sp}$ | $\mathrm{Pr}$ | $\mathrm{F}1$ |

$\mathrm{N}$ | 99.52 | 99.11 | 99.66 | 98.96 | 99.04 | 99.91 | 99.72 | 99.98 | 99.92 | 99.82 | 99.62 | 99.37 | 99.7 | 99.07 | 99.22 |

$\mathrm{S}$ | 99.74 | 99.49 | 99.83 | 99.49 | 99.49 | 99.93 | 99.94 | 99.93 | 99.78 | 99.86 | 99.78 | 99.71 | 99.8 | 99.4 | 99.55 |

$\mathrm{VEBs}$ | 99.66 | 98.73 | 99.98 | 99.94 | 99.3 | 99.93 | 99.6 | 100 | 100 | 99.87 | 99.61 | 98.75 | 99.91 | 99.73 | 99.24 |

$\mathrm{F}$ | 99.75 | 99.75 | 99.75 | 99.24 | 99.5 | 99.92 | 100 | 99.9 | 99.69 | 99.84 | 99.93 | 99.95 | 99.92 | 99.77 | 99.86 |

$\mathrm{Average}$ | 99.67 | 99.27 | 99.8 | 99.41 | 99.34 | 99.92 | 99.81 | 99.96 | 99.88 | 99.85 | 99.73 | 99.45 | 99.83 | 99.49 | 99.47 |

Database | MIT-BIH | EDB | INCART | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

Classes | $\mathrm{Acc}$ | $\mathrm{Se}$ | $\mathrm{Sp}$ | $\mathrm{Pr}$ | $\mathrm{F}1$ | $\mathrm{Acc}$ | $\mathrm{Se}$ | $\mathrm{Sp}$ | $\mathrm{Pr}$ | $\mathrm{F}1$ | $\mathrm{Acc}$ | $\mathrm{Se}$ | $\mathrm{Sp}$ | $\mathrm{Pr}$ | $\mathrm{F}1$ |

$\mathrm{N}$ | 94.03 | 80.78 | 98.37 | 94.18 | 86.97 | 94.73 | 81.29 | 99.13 | 96.83 | 88.38 | 89.82 | 73.63 | 95.11 | 83.11 | 78.09 |

$\mathrm{S}$ | 96.36 | 97.57 | 95.96 | 89.04 | 93.11 | 96.66 | 99.19 | 95.8 | 88.95 | 93.79 | 93.03 | 98.58 | 91.17 | 78.95 | 87.68 |

$\mathrm{VEBs}$ | 96.99 | 92.14 | 98.65 | 95.9 | 93.98 | 97.85 | 95.46 | 98.65 | 95.96 | 95.71 | 91.93 | 75.4 | 97.56 | 91.31 | 82.59 |

$\mathrm{F}$ | 98.39 | 99.72 | 97.95 | 94.13 | 96.85 | 99.02 | 99.9 | 98.73 | 96.3 | 98.07 | 99.24 | 99.85 | 99.04 | 97.19 | 98.5 |

$\mathrm{Average}$ | 96.44 | 92.55 | 97.73 | 93.31 | 92.73 | 97.07 | 93.96 | 98.08 | 94.51 | 93.99 | 93.51 | 86.87 | 95.72 | 87.64 | 86.72 |

Database | MIT-BIH | EDB | INCART | ||||||
---|---|---|---|---|---|---|---|---|---|

Average | SVM | MPA-SVM | Improvement % | SVM | MPA-SVM | Improvement % | SVM | MPA-SVM | Improvement % |

$Acc$ | $91.79$ | $99.48$ | $\mathbf{7}.\mathbf{69}$ | $91.31$ | $99.90$ | $\mathbf{8}.\mathbf{59}$ | $87.36$ | $99.47$ | $\mathbf{12}.\mathbf{11}$ |

$Sn$ | $83.73$ | $98.90$ | $\mathbf{15}.\mathbf{17}$ | $82.63$ | $99.77$ | $\mathbf{17}.\mathbf{14}$ | $75.0$ | $98.93$ | $\mathbf{23}.\mathbf{93}$ |

$Sp$ | $94.55$ | $99.68$ | $\mathbf{5}.\mathbf{13}$ | $94.23$ | $99.94$ | $\mathbf{5}.\mathbf{71}$ | $91.61$ | $99.65$ | $\mathbf{8}.\mathbf{04}$ |

$Pr$ | $89.41$ | $99.03$ | $\mathbf{9}.\mathbf{62}$ | $89.65$ | $99.81$ | $\mathbf{10}.\mathbf{16}$ | $87.21$ | $98.96$ | $\mathbf{11}.\mathbf{75}$ |

$F1$ | $84.20$ | $98.97$ | $\mathbf{14}.\mathbf{77}$ | $82.18$ | $99.79$ | $\mathbf{17}.\mathbf{61}$ | $72.62$ | $98.95$ | $\mathbf{26}.\mathbf{33}$ |

Database | MIT-BIH | EDB | INCART | ||||||
---|---|---|---|---|---|---|---|---|---|

Average | GBDT | MPA-GBDT | Improvement % | GBDT | MPA-GBDT | Improvement % | GBDT | MPA-GBDT | Improvement % |

$Acc$ | $96.93$ | $99.61$ | $\mathbf{2}.\mathbf{68}$ | $97.65$ | $99.91$ | $\mathbf{2}.\mathbf{26}$ | $97.44$ | $99.72$ | $\mathbf{2}.\mathbf{28}$ |

$Sn$ | $93.38$ | $99.15$ | $\mathbf{4}.\mathbf{79}$ | $94.80$ | $99.77$ | $\mathbf{4}.\mathbf{97}$ | $95.13$ | $99.41$ | $\mathbf{4}.\mathbf{28}$ |

$Sp$ | $98.12$ | $99.77$ | $\mathbf{1}.\mathbf{65}$ | $98.60$ | $99.95$ | $\mathbf{1}.\mathbf{35}$ | $98.38$ | $99.82$ | $\mathbf{1}.\mathbf{44}$ |

$Pr$ | $94.36$ | $99.31$ | $\mathbf{4}.\mathbf{95}$ | $95.82$ | $99.85$ | $\mathbf{4}.\mathbf{03}$ | $94.6$ | $99.47$ | $\mathbf{4}.\mathbf{87}$ |

$F1$ | $93.84$ | $99.23$ | $\mathbf{5}.\mathbf{39}$ | $95.29$ | $99.81$ | $\mathbf{4}.\mathbf{52}$ | $94.88$ | $99.44$ | $\mathbf{4}.\mathbf{56}$ |

Database | MIT-BIH | EDB | INCART | ||||||
---|---|---|---|---|---|---|---|---|---|

Average | RF | MPA-RF | Improvement % | RF | MPA-RF | Improvement % | RF | MPA-RF | Improvement % |

$Acc$ | $96.90$ | $99.67$ | $\mathbf{2}.\mathbf{77}$ | $97.65$ | $99.92$ | $\mathbf{2}.\mathbf{27}$ | $97.5$ | $99.73$ | $\mathbf{2}.\mathbf{23}$ |

$Sn$ | $93.37$ | $99.27$ | $\mathbf{5}.\mathbf{9}$ | $94.83$ | $99.81$ | $\mathbf{4}.\mathbf{98}$ | $94.75$ | $99.45$ | $\mathbf{4}.\mathbf{7}$ |

$Sp$ | $98.09$ | $99.8$ | $\mathbf{1}.\mathbf{71}$ | $98.86$ | $99.96$ | $\mathbf{1}.\mathbf{1}$ | $98.42$ | $99.83$ | $\mathbf{1}.\mathbf{41}$ |

$Pr$ | $94.26$ | $99.41$ | $\mathbf{5}.\mathbf{15}$ | $98.61$ | $99.88$ | $\mathbf{1}.\mathbf{27}$ | $95.27$ | $99.49$ | $\mathbf{4}.\mathbf{22}$ |

$F1$ | $93.79$ | $99.34$ | $\mathbf{5}.\mathbf{55}$ | $95.3$ | $99.85$ | $\mathbf{4}.\mathbf{55}$ | $94.99$ | $99.47$ | $\mathbf{4}.\mathbf{48}$ |

Database | MIT-BIH | EDB | INCART | ||||||
---|---|---|---|---|---|---|---|---|---|

Average | kNN | MPA-kNN | Improvement % | kNN | MPA-kNN | Improvement % | kNN | MPA-kNN | Improvement % |

$Acc$ | $94.96$ | $96.44$ | $\mathbf{1}.\mathbf{48}$ | $95.40$ | $97.07$ | $\mathbf{1}.\mathbf{67}$ | $92.14$ | $93.51$ | $\mathbf{1}.\mathbf{37}$ |

$Sn$ | $89.17$ | $92.55$ | $\mathbf{3}.\mathbf{38}$ | $90.35$ | $93.96$ | $\mathbf{3}.\mathbf{61}$ | $83.83$ | $86.87$ | $\mathbf{3}.\mathbf{04}$ |

$Sp$ | $96.9$ | $97.73$ | $\mathbf{0}.\mathbf{8}$ | $97.06$ | $98.08$ | $\mathbf{1}.\mathbf{02}$ | $94.94$ | $95.72$ | $\mathbf{0}.\mathbf{78}$ |

$Pr$ | $91.3$ | $93.31$ | $\mathbf{2}.\mathbf{01}$ | $92.16$ | $94.51$ | $\mathbf{2}.\mathbf{35}$ | $86.88$ | $87.64$ | $\mathbf{0}.\mathbf{76}$ |

$F1$ | $89.71$ | $92.73$ | $\mathbf{7}.\mathbf{14}$ | $90.56$ | $93.99$ | $\mathbf{3}.\mathbf{43}$ | $83.83$ | $86.72$ | $\mathbf{2}.\mathbf{89}$ |

Methods | #Classes | #Beats | Classifier | Acc % | Sn % |
---|---|---|---|---|---|

Roshan et al. [44] | 5 | 34,989 | SVM | 93.50 | 99.30 |

Li et al. [47] | 5 | 1800 | SVM | 97.30 | 97.40 |

Taiyong and Min [48] | 4 | 100,688 | RF | 94.60 | 98.51 |

Serkan et al. [49] | 5 | 83,648 | CNN | 99.10 | 93.91 |

Acharya et al. [45] | 5 | 109,449 | CNN | 94.03 | 96.71 |

Yang et al. [50] | 15 | 104986 | KNN | 97.70 | - |

Rishi et al. [46] | 4 | 109,449 | KNN | 98.00 | 85.33 |

Shu-Lih et al. [51] | 5 | 16,499 | LSTM-CNN | 98.10 | 97.50 |

Li et al. [52] | 4 | 94,013 | ResNet | 99.06 | 93.21 |

Yildirim et al. [53] | 13 | 833 | 1D-CNN | 95.20 | 93.52 |

Oh et al. [54] | 5 | 94,667 | Modified U-Net | 97.32 | 94.44 |

Marinho et al. [55] | 5 | 100467 | Bayes | 94.30 | - |

Yang et al. [56] | 15 | 3350 | DL-CCANet | 98.31 | 90.89 |

Plawiak et al. [57] | 17 | 774 | FGE | 95.00 | 94.62 |

Patro et al. [58] | 5 | 3551 | PSO-GA-SVM | 95.30 | 94.00 |

Qihang et al. [14] | 8 | 6877 | ATI-CNN | 81.20 | 80.10 |

The proposed method | 4 | 80,000 | MPA-SVM | 99.48 | 98.90 |

4 | 80,000 | MPA-GBDT | 99.61 | 99.15 | |

4 | 80,000 | MPA-RF | 99.67 | 99.27 | |

4 | 80,000 | MPA-kNN | 96.42 | 92.55 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Hassaballah, M.; Wazery, Y.M.; Ibrahim, I.E.; Farag, A.
ECG Heartbeat Classification Using Machine Learning and Metaheuristic Optimization for Smart Healthcare Systems. *Bioengineering* **2023**, *10*, 429.
https://doi.org/10.3390/bioengineering10040429

**AMA Style**

Hassaballah M, Wazery YM, Ibrahim IE, Farag A.
ECG Heartbeat Classification Using Machine Learning and Metaheuristic Optimization for Smart Healthcare Systems. *Bioengineering*. 2023; 10(4):429.
https://doi.org/10.3390/bioengineering10040429

**Chicago/Turabian Style**

Hassaballah, Mahmoud, Yaser M. Wazery, Ibrahim E. Ibrahim, and Aly Farag.
2023. "ECG Heartbeat Classification Using Machine Learning and Metaheuristic Optimization for Smart Healthcare Systems" *Bioengineering* 10, no. 4: 429.
https://doi.org/10.3390/bioengineering10040429