Abstract
Artificial intelligence is revolutionizing modern healthcare by enabling more precise and predictive diagnostics. In cardiology, AI is playing a vital role by assisting medical practitioners in analyzing complex electrocardiography (ECG) patterns with greater accuracy. As cardiovascular diseases continue to be a leading cause of mortality globally, the early prediction of sudden cardiac arrest remains a significant clinical challenge. This study explores the application of both machine learning (ML) and deep learning (DL) techniques of time series ECG data for the early prediction of life-threatening cardiac events. The analysis confirms that deep learning models excel at detecting intricate patterns by automatically learning features directly from raw data, though they often demand large datasets and substantial computational resources. In contrast, traditional machine learning approaches are more computationally efficient and interpretable, making them a practical choice for resource-constrained environments. Experimental results demonstrate the superior performance of deep learning models, with a Convolutional Neural Network (CNN) achieving an accuracy of 99.89%. Among machine learning models, the Random Forest classifier performed best, achieving an accuracy of 99.06% and highlighting the reliability of ensemble learning methods. These findings demonstrate the significant potential of AI-based ECG analysis to improve early diagnosis and clinical decision making.
Data availability
The MIT BIH Arrhythmia and PTB DB ECG_Datasets are analyzed during this study is publicly available at ECG_Datasets repository https://drive.google.com/drive/folders/1b1\({}_{6} f 3 N S 3 S T J-r b 42 w y S 5 u q 9 N q B_{H} 7 f N\). Further, in case of any issue its also available from the corresponding author on reasonable request.
References
World Health Organization Cardiovascular diseases (CVDs) (2021).
Xiong, W. et al. Multichannel feature fusion network-based technique for heart sound signal classification and recognition. Expert Syst. Appl. 273, 126839 (2025).
Zhu, Y.et al. Identification of necroptosis and immune infiltration in heart failure through bioinformatics analysis. J. Inflamm. Res. 18, 2465–2481 (2025).
Amini, M., Zayeri, F. & Salehi, M. Trend analysis of cardiovascular disease mortality, incidence, and mortality-to-incidence ratio: Results from global burden of disease study 2017. BMC Public Health 21(1), 401 (2021).
Šiaučiūnaitė, V., Vainoras, A., Navickas, Z. & Ragulskis, M. Detection of ischemic episodes based on two consecutive declines in the JT/ST algebraic relationship. Appl. Sci. 11(11), 4805 (2021).
Kennedy, C. E., Aoki, N., Mariscalco, M. & Turley, J. P. Using time series analysis to predict cardiac arrest in a PICU. Pediatr. Crit. Care Med. 16(9), e332–e339 (2015).
Al Hinai, G., Jammoul, S., Vajihi, Z. & Afilalo, J. Deep learning analysis of resting electrocardiograms for the detection of myocardial dysfunction, hypertrophy, and ischaemia: A systematic review. Eur. Heart J. Digit. Health 2(3), 416–423 (2021).
Sengupta, J. Investigation of Deep Learning Models for Analysis of Heart Disorders in Smart Health Care based IoT Environment. J. Smat Internet Things (JSIoT) 2024(01), 01–16 (2024).
Chang, A., Cadaret, L. & Liu, K. Machine learning in electrocardiography and echocardiography: Technological advances in clinical cardiology. Curr. Cardiol. Rep. 22(12), 168 (2020).
Zhou, F.-Y., Jin, L.-P. & Dong, J. Premature ventricular contraction detection combining deep neural networks and rules inference. Artif. Intell. Med. 79, 42–51 (2017).
Jangra, M., Dhull, S., Singh, K., Singh, A. & Cheng, X. O-Wcnn: An optimized integration of spatial and spectral feature map for arrhythmia classification. Complex Intell. Syst. 9, 2685–2698 (2021).
Sakli, N. et al. ResNet-50 for 12-lead electrocardiogram automated diagnosis. Comput. Intell. Neurosci. 2022, 7617551 (2022).
Haleem, M. et al. Time adaptive ECG driven cardiovascular disease detector. Biomed. Signal Process. Control 70, 102968 (2021).
Zhang, X. et al. Automated detection of cardiovascular disease by electrocardiogram signal analysis: A deep learning system. Cardiovasc. Diagn. Ther. 10(2), 227–235 (2020).
Xiao, H. et al. Big data, extracting insights, comprehension, and analytics in cardiology: an overview. J. Healthc. Eng. 2021(1), 6635463 (2021).
Li, C. et al. DeepECG, Image-based electrocardiogram interpretation with deep convolutional neural networks. Biomed. Signal Process. Control 69, 102824 (2021).
Lih, O. et al. Comprehensive electrocardiographic diagnosis based on deep learning. Artif. Intell. Med. 103, 101789 (2020).
Jahmunah, V., Ng, E., San, T. & Acharya, U. Automated detection of coronary artery disease, myocardial infarction and congestive heart failure using GaborCNN model with ECG signals. Comput. Biol. Med. 134, 104457 (2021).
Shen, Y. et al. Risk prediction for cardiovascular disease using ECG data in the China Kadoorie Biobank. Proc. Annu. Int. Conf. IEEE Eng. Med. Biol. Soc., pp. 2419–2422, (2016).
Smigiel, S. ECG classification using orthogonal matching pursuit and machine learning. Sensors 22(13), 4960 (2022).
Wang, D., Meng, Q., Chen, D., Zhang, H. & Xu, L. Automatic detection of arrhythmia based on multi-resolution representation of ECG signal. Sensors 20(6), 1579 (2020).
Sangamesh, H., Cheripelli, R. & Nijaguna, G. S. Reconceiving the edge intelligence based IoT devices for an effective classification of ECG systems. J. Smat Internet Things (JSIoT) 2024(02), 79–92 (2024).
Yildirim, O., Plawiak, P., Tan, R. & Acharya, U. Arrhythmia detection using deep convolutional neural network with long-duration ECG signals. Comput. Biol. Med. 102, 411–420 (2018).
Saboor, A. et al. A method for improving prediction of human heart disease using machine learning algorithms. Mobile Inf. Syst. 2022(1), 1410169 (2022).
Deng, Y. et al. ST-Net: Synthetic ECG tracings for diagnosing various cardiovascular diseases. Biomed. Signal Process. Control 61, 101997 (2020).
Karthik, S., Santhosh, M., Kavitha, M. & Paul, A. Automated deep learning based cardiovascular disease diagnosis using ECG signals. Comput. Syst. Sci. Eng. 42(1), 183–199 (2022).
Ibrahim, L., Mesinovic, M., Yang, K. & Eid, M. Explainable prediction of acute myocardial infarction using machine learning and Shapley values. IEEE Access 8, 210410–210417 (2020).
Ambekar, S. & Phalnikar, R. Disease risk prediction by using convolutional neural network. In: Proc. 4th Int. Conf. Comput. Commun. Control Autom. (ICCUBEA), pp. 1–5, (2018).
Ramprakash, P., Sarumathi, R., Mowriya, R. & Nithyavishnupriya, S. Heart disease prediction using deep neural network. In: Proc. Int. Conf. Inventive Comput. Technol. (ICICT), pp. 666–670 (2020).
Mohan, S., Thirumalai, C. & Srivastava, G. Effective heart disease prediction using hybrid machine learning techniques. IEEE Access 7, 81542–81554 (2019).
Shah, D., Patel, S. & Bharti, S. K. Heart disease prediction using machine learning techniques. SN Comput. Sci. 1(6), 345 (2020).
Yadav, K. K., Sharma, A. & Badholia, A. Heart disease prediction using machine learning techniques. Inf. Technol. Ind. 9(1), 207–214 (2021).
Tama, B. A., Im, S. & Lee, S. Improving an intelligent detection system for coronary heart disease using a two-tier classifier ensemble. Biomed. Res. Int. 2020, 9816142 (2020).
Pan, Y., Fu, M., Cheng, B., Tao, X. & Guo, J. Enhanced deep learning assisted convolutional neural network for heart disease prediction on the Internet of Medical Things platform. IEEE Access 8, 189503–189512 (2020).
Fitriyani, N. L., Syafrudin, M., Alfian, G. & Rhee, J. HDPM: An effective heart disease prediction model for a clinical decision support system. IEEE Access 8, 133034–133050 (2020).
Dai, H., Hwang, H.-G. & Tseng, V. S. Convolutional neural network-based automatic screening tool for cardiovascular diseases using different intervals of ECG signals. Comput. Methods Progr. Biomed. 203, 106035 (2021).
Zacarias, H. et al. ECG forecasting system based on long short-term memory. Bioengineering 11(1), 89 (2024).
Yao, J. et al. Combining rhythm information between heartbeats and BiLSTM-treg algorithm for intelligent beat classification of arrhythmia. J. Healthc. Eng. 2021, 8642576 (2021).
Tadesse, G. et al. DeepMI: Deep multi-lead ECG fusion for identifying myocardial infarction and its occurrence-time. Artif. Intell. Med. 121, 102192 (2021).
Toma, T. I. & Choi, S. A parallel cross convolutional recurrent neural network for automatic imbalanced ECG arrhythmia detection with continuous wavelet transform. Sensors 22(19), 7396 (2022).
Wani, N. A., Kumar, R. & Bedi, J. DeepXplainer: An interpretable deep learning based approach for lung cancer detection using explainable artificial intelligence. Comput. Methods Progr. Biomed. 243, 107879 (2024).
Wani, N. A. et al. Synergizing fusion modeling for accurate cardiac prediction through explainable artificial intelligence. IEEE Trans. Consum. Electron. 71(1), 1504–1512 (2025).
Saharan, S. et al. A deep learning and explainable artificial intelligence based scheme for breast cancer detection. Sci. Rep. 15, 32125 (2025).
Hu, R. et al. A transformer-based deep neural network for arrhythmia detection using continuous ECG signals. Comput. Biol. Med. 144, (2022).
Shi, S. & Liu, W. B2-ViT Net: Broad vision transformer network with broad attention for seizure prediction. IEEE Trans. Neural Syst. Rehabil. Eng. 32, 178–188 (2023).
Jahangir, R. et al. ECG-based heart arrhythmia classification using feature engineering and a hybrid stacked machine learning. BMC Cardiovasc Disord 25, 260 (2025).
Funding
This research work is supported by the Ministry of Higher Education (MOHE) under the 2023 Translational Research Program for the Energy Sustainability Focus Area (Project ID: MMUE/240001), the 2024 ASEAN IVO (Project ID: 2024-02), and Multimedia University, Malaysia.
Author information
Authors and Affiliations
Contributions
Conceptualization, M.K.U; writing-original draft preparation, M.K.U. and R.W; Administration and Validation, M.F.A., and S.A.; Software, R.W.; Visualization, M.K.U.; Resources, R.W.; Supervision, S.A; Funding, I.E.L; writing-review and editing, M.F.A., F.A, S.A, S. J, and F. S; All authors have read and agreed to the published version of the paper.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Umair, M.K., Waheed, R., Abrar, M.F. et al. Time series electrocardiography (ECG) data for early prediction of cardiac arrest. Sci Rep (2026). https://doi.org/10.1038/s41598-026-35788-9
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-026-35788-9