3.1. Effectiveness of FIR Window Functions in Signal Preprocessing
Quantitative Analysis The Signal-to-Noise Ratio (SNR) is a metric in signal processing used to quantify the clarity and quality of a signal relative to the background noise. It is particularly important in the context of ECG signal analysis where distinguishing true signal from noise can influence diagnostic decisions. The SNR is expressed in decibels (dB) and calculated using the following equation [
22]:
where
represents the power of the desired signal, calculated as the sum of the squares of the signal amplitudes, and
denotes the power of the noise, which is determined by the difference between the original and the FIR-filtered signal:
Here, is the amplitude of the original ECG signal at time t, and is the amplitude after applying an FIR filter, such as Hann, Hamming, or Blackman. The application of these filters typically aims to enhance the SNR by reducing the noise components without distorting the essential features of the ECG signal. By improving the SNR, the filtered signal can offer clearer and more discernible cardiac events, facilitating more accurate analysis and interpretation.
In the analysis of FIR filters applied to ECG signals, the Hann and Hamming filters demonstrated superior performance in enhancing the Signal-to-Noise Ratio (SNR), both achieving improvements around 4 dB (
Figure 3). The Hamming filter slightly outperformed the Hann filter, suggesting its marginally better efficacy in minimizing spectral leakage and enhancing signal clarity. Conversely, the Blackman filter, while still effective, showed a lower SNR improvement of approximately 3 dB. The observed variations in SNR improvements, denoted by error bars in the results, underscore the consistency of the filters’ effects across multiple datasets. This variability is crucial for understanding the practical implications of filter selection in clinical ECG analysis, where signal integrity can significantly influence diagnostic accuracy.
3.2. Performance of Deep Learning Models on Preprocessed Signals
Confusion Matrix Analysis In classifying ECG signals using different windowing techniques in the preprocessing, the evaluation of classification performance is central, with a specific focus on confusion matrices for the Blackman, Hamming, and Hann windows. Classification matrix is a crucial metric to assess how well the classification algorithms perform under the different spectral conditions induced by the respective window types.
The confusion matrix for the Blackman window exhibits prominent diagonal elements, with a notable 10,467 correct classifications for class F, indicating strong accuracy in classification across the observed categories. Misclassifications are minimal, with the most significant confusion between classes F and V, consisting of 35 instances, which is relatively low in comparison to the total classifications. This suggests that the Blackman window maintains high specificity and sensitivity, particularly in distinguishing between closely related classes.
Similarly, the Hamming window’s confusion matrix shows high values on the diagonal, reflective of effective classification, with class F having 10,458 correct classifications. However, this window displays a broader spread of misclassifications, particularly between classes F and V (38 instances), and between classes S and V (40 instances). These figures suggest a slightly reduced specificity under the Hamming window, which might influence its suitability in applications requiring high precision in class differentiation.
The Hann window’s matrix also demonstrates strong diagonal values, albeit with a slight reduction in sensitivity for class S, which has 2,361 correct classifications—a decrease compared to the other windows. Misclassifications are higher, especially between classes F and S (181 instances), and between classes S and V (44 instances), indicating potential challenges in distinguishing these class pairs more so than with the other window functions.
Overall, the comparison of these three window functions reveals robust classification capabilities across all types, yet highlights subtle differences in their performance. The Blackman window appears to offer the best overall accuracy with the least amount of misclassification, making it potentially more suitable for clinical applications where precise class distinction is crucial. On the other hand, the Hamming and Hann windows, while still effective, exhibit a slightly increased tendency for misclassification between certain classes, which could influence their application in specific diagnostic settings.
Overall Performance The performance analysis of the three window functions— Hamming, Hann, and Blackman—on ECG signal classification provides a detailed insight into their effectiveness across five classes (F, N, S, V, Q), evaluated through metrics such as Precision, Recall, and F1-Score (
Table 2). These metrics are defined as follows:
Precision: The ratio of correctly predicted positive observations to the total predicted positive observations.
where
is the number of true positives, and
is the number of false positives.
Recall: The ratio of correctly predicted positive observations to all observations in the actual class.
where
is the number of false negatives.
F1-Score: The harmonic mean of Precision and Recall, providing a balance between the two.
All three models demonstrate excellent performance in classifying class F, with notably high precision and recall, suggesting their strong capability in accurately identifying this category with minimal false positives and negatives. Classes N and S also see relatively good performance, although the recall for class N is slightly reduced, indicating fewer true positives detected relative to the actual positives present. This could impact the clinical utility of the model where missing a positive case can have significant consequences.
Figure 4.
Comparison of confusion matrix for ECG signals classification processed using (a) Hann, (b) Hamming, and (c) Blackman windows.
Figure 4.
Comparison of confusion matrix for ECG signals classification processed using (a) Hann, (b) Hamming, and (c) Blackman windows.
The performance on class V is moderate across all models, with precision slightly lower than other classes, hinting at a higher rate of false positives for this class. This might suggest a common challenge in the classification of this class using window-based spectral analysis, possibly due to the overlap in spectral characteristics between class V and other classes.
A notable observation across all three models is the complete lack of detection of class Q, which exhibits zero values in precision, recall, and F1-Score. This uniform failure to detect class Q likely indicates that class Q represents a type of signal that is undetectable under the current feature extraction and classification methodology employed. This could be due to the absence of distinct or adequate features within the spectral domain that these window functions analyze, or possibly the absence of sufficient representative samples of class Q in the training dataset. Overall, while all three window functions provide robust classification capabilities for most ECG signal classes, the choice among them should consider the specific classification needs and the unique challenges presented by each class. The slight differences in performance metrics between the models can guide the selection of a window function based on whether higher precision or a better-balanced F1-Score is more critical for the intended application.
The results clearly demonstrate the utility of FIR window functions in enhancing the signal-to-noise ratio and reducing artifacts in ECG signals, which in turn significantly improves the performance of deep learning models. The use of Blackman window filtering, in particular, facilitated a more refined feature extraction process, thereby aiding in more accurate heart condition diagnostics. The findings suggest that integrating advanced FIR filtering techniques with deep learning frameworks can significantly advance the field of biomedical signal analysis.