ECG Heartbeat Classification: A Comparative Study of Machine Learning and Deep Learning Approaches for Arrhythmia Detection | IJCT Volume 13 – Issue 6 | IJCT-V13I6P89

IJCT
International Journal of Computer Techniques
ISSN 2394-2231 · Peer-Reviewed · Open Access
📚 Volume 13, Issue 6
📅 November 13, 2026
📄 Pages 760–765
🔖 ID: IJCT-V13I6P89

ECG Heartbeat Classification: A Comparative Study of Machine Learning and Deep Learning Approaches for Arrhythmia Detection

Author(s)

Ishita Pahuja, Diya Tyagi

Abstract

Electrocardiogram (ECG) signals provide useful information about the functioning of the heart and help identify abnormal heart rhythms. While these signals are commonly used in cardiac monitoring, analysing them manually can be challenging, especially when large amounts of data are involved. This project explores how machine learning and deep learning can be used to classify ECG heartbeats and distinguish between different heartbeat patterns. The work uses the MIT-BIH heartbeat dataset, which contains five categories of heartbeats: Normal, Supraventricular, Ventricu lar, Fusion and Unknown. Different traditional machine learning algorithms and deep learning models are explored. These include CNN, GRU, hybrid CNN-RNN and attention-based architectures. Since the dataset contains an unequal distribution of heartbeat classes, techniques such as SMOTE, data augmentation and class weighting are also considered. Grad-CAM is used alongside the deep learning models to highlight the parts of an ECG signal that influence their predictions. Through these approaches, the project examines the differ ences between various classification models, particularly in their ability to recognise less frequent heartbeat categories. It also looks at how visual explanations can help in understanding the predictions made by deep learning models. The overall aim is to explore different approaches to ECG heartbeat classification while considering both model performance and interpretability.

Keywords

ECG Classification, Arrhythmia Detection, Ma chine Learning, Deep Learning, CNN, GRU, Class Imbalance, Explainable AI

Conclusion

This study compared the performance of several classical machine-learning algorithms and a number of deep-learning architectures for ECG heartbeat classification into five cate gories of heartbeats. The best performing model among the classical machine-learning algorithms was the Random Forest model using a combination of the raw ECG waveform and engineered features, which achieved a macro-F1 score of 0.9155. The best performing deep-learning architecture was the Hybrid CNN–RNN model, which achieved a macro-F1 score of 0.9064. The class-weighted CNN achieved the highest recall for the minority S and F classes. This study highlights the effectiveness of combining feature engineering with en semble learning for ECG classification, as well as the need to handle the class-imbalance problem in ECG classification. Furthermore, the experiments conducted in this study show that overall accuracy is not a good measure of the performance of a classification model for ECG classification, as it can be heavily influenced by the performance of the model on the most frequent class, while the performance of the model on the under-represented classes can be very poor. Further work is required to investigate the generalizability and reliability of the models developed in this study. In particular, we plan to conduct patient-wise evaluation, leakage-free feature selection, experiments with multiple random seeds, as well as more systematic explainability analysis

References

[1] P. de Chazal, M. O’Dwyer, and R. B. Reilly, “Automatic Classification of Heartbeats Using ECG Morphology and Heartbeat Interval Features,” IEEE Transactions on Biomedical Engineering, vol. 51, no. 7, pp. 1196 1206, 2004. doi: 10.1109/TBME.2004.827359.
[2] E. J. da S. Luz, W. R. Schwartz, G. Camara-Chavez, and D. Menotti, “ECG-Based Heartbeat Classification for Arrhythmia Detection: A Sur vey,” Computer Methods and Programs in Biomedicine, vol. 127, pp. 144–164, 2016. doi: 10.1016/j.cmpb.2015.12.008.
[3] S. Kiranyaz, T. Ince, and M. Gabbouj, “Real-Time Patient-Specific ECG Classification by 1-D Convolutional Neural Networks,” IEEE Transactions on Biomedical Engineering, vol. 63, no. 3, pp. 664–675,
2016. doi: 10.1109/TBME.2015.2468589.
[4] U. R. Acharya, S. L. Oh, Y. Hagiwara, J. H. Tan, M. Adam, A. Gertych, and R. S. Tan, “A Deep Convolutional Neural Network Model to Classify Heartbeats,” Computers in Biology and Medicine, vol. 89, pp. 389–396,
2017. doi: 10.1016/j.compbiomed.2017.08.022.
[5] A. Y. Hannun, P. Rajpurkar, M. Haghpanahi, G. H. Tison, C. Bourn, M. P. Turakhia, and A. Y. Ng, “Cardiologist-Level Arrhythmia Detection and Classification in Ambulatory Electrocardiograms Using a Deep Neural Network,” Nature Medicine, vol. 25, no. 1, pp. 65–69, 2019. doi: 10.1038/s41591-018-0268-3.
[6] N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer, “SMOTE: Synthetic Minority Over-sampling Technique,” Journal of Artificial Intelligence Research, vol. 16, pp. 321–357, 2002. doi: 10.1613/jair.953.
[7] F. Murat, O. Yildirim, M. Talo, U. B. Baloglu, Y. Demir, and U. R. Acharya, “Application of Deep Learning Techniques for Heart beats Detection Using ECG Signals—Analysis and Review,” Comput ers in Biology and Medicine, vol. 120, Art. no. 103726, 2020. doi: 10.1016/j.compbiomed.2020.103726.
[8] R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, and D. Batra, “Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization,” in Proceedings of the IEEE International Conference on Computer Vision (ICCV), pp. 618–626, 2017. doi: 10.1109/ICCV.2017.74.
[9] Y. M. Ayano, F. Schwenker, B. D. Dufera, and T. G. Debelee, “In terpretable Machine Learning Techniques in ECG-Based Heart Disease Classification: A Systematic Review,” Diagnostics, vol. 13, no. 1, Art. no. 111, 2023. doi: 10.3390/diagnostics13010111.

📋 How to Cite This Paper

Ishita Pahuja, Diya Tyagi (2026). ECG Heartbeat Classification: A Comparative Study of Machine Learning and Deep Learning Approaches for Arrhythmia Detection. International Journal of Computer Techniques, 13(6), 760–765. ISSN: 2394-2231. DOI: https://doi.org/10.5281/zenodo.24198470
© 2026 International Journal of Computer Techniques (IJCT). All rights reserved. · ijctjournal.org
Submit Your Paper