Machine learning techniques have been widely applied in the medical field, with electrocardiogram (ECG) signals being pivotal for detecting arrhythmias and other applications such as sleep analysis and biometric identity recognition. Traditionally, selecting the right features was essential for achieving good performance in classification. However, with the advent of deep learning, particularly convolutional neural networks (CNNs), the classifier itself extracts and selects the relevant features. This development raises the question of whether it is necessary to represent ECG data in different domains, such as the frequency domain, for optimal performance.
This study aims to evaluate the performance of CNNs in three tasks: classification of rhythm, apnea detection and identity recognition, using three input formats: time sequence, Fourier frequency components and spectrogram. The databases used for this analysis were MIT-BIH Arrhythmia, ECG-ID and Apnea-ECG from PhysioNet. Customized CNN networks were employed for time series and Fast Fourier Transform (FFT) components, while transfer learning with EfficientNet, pre-trained on the ImageNet database, was utilized for spectrograms. The results were validated using N-fold cross-validation, with N being 10 for the arrhythmia and apnea databases, and 4 for the identity database.
The mean accuracy obtained for each task was consistently higher when using the time domain compared to the frequency domain, with differences ranging from 1.4% to 5.4%. Consequently, there is no advantage in transforming time-series data into the frequency domain for these tasks.