Abstract
Electrocardiogram (ECG) is the most common method for monitoring the working of the heart. ECG signal is the basis to determine normal or abnormal rhythm, thereby helping to accurately diagnose cardiovascular diseases. Therefore, an automatic algorithm to detect and diagnose abnormal heart rhythms is essential. There are many methods of classifying arrhythmias using machine learning algorithms such as k-nearest neighbors (KNN), support vector machines (SVM), based on the features extracted from the record of ECG signal. Actually, deep learning algorithms are evolving and highly effective in image analysis and processing. In this research, a dense neural network model is proposed to classify normal and abnormal beats. Input ECG signal presenting a time series is converted into 2-D spectral image by applying wavelet transform. Our research is evaluated based on using the Massachusetts Institute of Technology-Beth Israel Hospital (MIT-BIH) arrhythmia database. The accuracy of the classification algorithm we employ is 99.8%, demonstrating the model's validity when compared to other reports' findings. This is the foundation for our algorithm to prove it can be utilized as an efficient model for categorizing arrhythmia using ECG signals.
Introduction
Arrhythmias—irregularities in the heart's electrical activity—are leading indicators of cardiovascular disease, which accounts for over 30% of global mortality. While ECGs are the standard diagnostic tool, manual interpretation is time-consuming, subjective, and prone to human error, especially during long-term monitoring. Traditional machine learning approaches, such as Support Vector Machines (SVM) or k-Nearest Neighbors (KNN), require extensive "feature engineering," where experts must manually define relevant signal characteristics. This paper addresses the need for a more automated, highly accurate "end-to-end" pipeline that captures the full complexity of the heartbeat by transforming 1D time-series data into a 2D visual representation suitable for deep learning.
Methodology
The proposed approach utilizes a three-stage pipeline to process and classify cardiac signals.
- Pre-processing: The system detects R-peaks and extracts a window of 401 data points centered on each peak.
- 2D Transformation: Instead of raw time-series data, the model uses the Continuous Wavelet Transform (CWT) with a Morlet mother wavelet. This converts the 1D signal into a 2D spectral image (a scalogram) of 150x401 pixels, capturing how frequency components change over time.
- Deep Learning: These 2D images are fed into a Dense Neural Network (DNN) consisting of fully connected layers (500 and 100 nodes).
The study utilized the MIT-BIH Arrhythmia Database, extracting a balanced set of 9,000 heartbeats (4,500 normal and 4,500 abnormal) for training and validation.
Results
The model's performance is among the highest reported for binary arrhythmia classification, achieving an overall accuracy of 99.81%. Key performance metrics include:
- Sensitivity: 99.7%
- Specificity: 99.8%
- Precision: 99.8%
When compared to other state-of-the-art models, including LSTMs and CNNs, this approach consistently yielded superior accuracy and F1 scores for two-class classification.
Discussion and Conclusion
The core innovation of this research is the demonstration that dimensionality matters for non-stationary signals like heartbeats. While a 1D view only shows amplitude over time, a 2D scalogram provides a "topographical map" of the heart's energy across different frequencies.
By using CWT, the researchers effectively performed feature extraction mathematically, allowing a relatively straightforward DNN to outperform more complex models. Future work will focus on expanding this to multi-class classification to identify specific arrhythmia types and optimizing the CWT process for real-time monitoring on wearable devices.
Summary updated