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.