# Comparison of Dimensionality Reduction Approaches and Logistic Regression for ECG Classification
## 4 Results and Analysis  
### Overall Classification Performance  
The proposed methods were evaluated on a held-out test set representing 40% of the dataset (\(n\) = 4258 records), ensuring class proportions matched the full dataset. All models were assessed based on six metrics: PPV, NPV, sensitivity, specificity, accuracy, and F1-score. Performance was analyzed separately for each of the five rhythm classes (SB, SR, AFIB, ST, SVT) and across five models: PCA-KNN, UMAP-KNN, LR-ML, LR-BJ, and LR-BN. Table 2 summarizes the classification metrics for each model and class.  
\begin{table}
\begin{tabular}{l l c c c c c c} \hline \hline
**Diagnostic** & **Model** & **PPV** & **NPV** & **Sensitivity** & **Specificity** & **Accuracy** & **F1-Score** \\ \hline SB & PCA-KNN & 86.74 & 96.29 & 93.80 & 91.81 & 92.53 & 90.13 \\  & UMAP-KNN & 98.53 & 93.87 & 90.04 & 99.10 & 95.58 & 93.99 \\  & LR-ML & 89.95 & 99.65 & 99.42 & 93.65 & 95.75 & 94.57 \\  & LR-BJ & 91.30 & 99.81 & 99.68 & 94.58 & 96.43 & 95.27 \\  & LR-BN & 90.61 & 99.80 & 99.68 & 94.10 & 96.13 & 95.07 \\ \hline SR & PCA-KNN & 57.49 & 89.23 & 43.36 & 93.61 & 86.12 & 49.44 \\  & UMAP-KNN & 62.69 & 92.76 & 63.84 & 92.42 & 87.67 & 63.26 \\  & LR-ML & 0.00 & 83.37 & 0.00 & 99.97 & 83.35 & – \\  & LR-BJ & – & 83.37 & 0.00 & 100.00 & 83.37 & – \\  & LR-BN & – & 83.37 & 0.00 & 100.00 & 83.37 & – \\ \hline AFIB & PCA-KNN & 31.57 & 87.80 & 43.06 & 81.45 & 75.08 & 36.43 \\  & UMAP-KNN & 53.08 & 88.67 & 40.23 & 92.93 & 84.19 & 45.95 \\  & LR-ML & 64.00 & 86.07 & 20.40 & 97.72 & 84.90 & 30.84 \\  & LR-BJ & 53.98 & 86.14 & 22.10 & 96.26 & 83.96 & 31.41 \\ \hline ST & PCA-KNN & 57.85 & 87.97 & 23.89 & 96.97 & 86.12 & 33.82 \\  & UMAP-KNN & 72.01 & 95.66 & 75.32 & 94.90 & 91.99 & 73.65 \\  & LR-ML & 36.36 & 85.33 & 1.90 & 99.42 & 84.95 & 3.64 \\  & LR-BJ & 15.96 & 85.18 & 2.37 & 97.82 & 83.65 & 3.98 \\  & LR-BN & 16.43 & 85.21 & 3.64 & 96.77 & 82.95 & 5.91 \\ \hline SVT & PCA-KNN & 58.10 & 96.89 & 49.19 & 97.81 & 94.97 & 53.28 \\  & UMAP-KNN & 73.23 & 97.46 & 58.47 & 98.68 & 96.34 & 64.88 \\  & LR-ML & 64.00 & 98.98 & 83.87 & 98.28 & 96.31 & 72.73 \\  & LR-BJ & 69.70 & 97.84 & 64.92 & 98.25 & 96.31 & 67.23 \\  & LR-BN & 71.84 & 98.21 & 70.97 & 98.28 & 96.69 & 71.37 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Performance metrics for each diagnostic and model.  
The UMAP-KNN model demonstrates the most balanced performance across all metrics and rhythm classes, outperforming logistic regression models particularly in more ambiguous or imbalanced cases such as SR, AFIB, and ST. Figure 3 shows the low-dimensional UMAP embedding of the ECG data. The spatial separation of rhythm clusters indicates the capacity of UMAP to uncover structure in high-dimensional ECG features.  
The results demonstrate that UMAP-KNN outperforms other models in PPV, NPV, sensitivity, and F1-score for SB, SR, and ST, confirming its robustness in handling irregular and imbalanced classes. Although LR-ML leads in PPV for AFIB and in sensitivity for SVT, UMAP-KNN provides more balanced performance across all rhythms. Logistic regression models, especially LR-B) and LR-BN, achieve high NPV and specificity, particularly in SB, SVT, and AFIB. Notably, LR-BJ shows perfect specificity (100%) for SR and ST. However, the logistic models fail to identify SR and ST in terms of sensitivity, with F1-scores close to zero. Overall, LR-BJ performs best for SB, with the highest F1-score (95.27%) and accuracy (96.43%). UMAP-KNN surpasses all others for SR and ST in F1-score (63.26% and 73.65%, respectively). LR-BN achieves the top F1-score for SVT (71.37%), although UMAP-KNN remains close. These outcomes are derived from confusion matrices of each model. As an illustration, Figure 4 presents the confusion matrix for UMAP-KNN on SB classification.