## 4 Discussion  
First of all, it is important to clarify that a 1-min signal length was selected for HRV analysis because most studies have based their classifiers on this timeframe [7; 80]. This is primarily because the most widely used database in the literature, APNEA-ECG, provides annotations in 1-min intervals. Although the Task Force established that the minimum required for HRV analysis was 5 min of ECG recordings, trends have evolved over the decades, showing that analysis can be effectively reduced to shorter intervals without compromising classifier performance, especially when it comes to detect OSA episodes, which generally last from 15 to 30 s [3]. This has been supported in other studies with ultra-short ECG recordings, considering intervals as brief as 15 s [81]. The results clearly show that DL models outperform ML models, underscoring the limited value of RQA features in ML compared to the richer, unthresholded RP representation (i.e., DM). This aligns with findings in other research fields [32; 33], where RQA can introduce information leakage by oversimplifying changes in the phase space. As seen in Table 5, ML models based solely on RQA features delivered poor results, while significant improvements occurred with image-based features and DL models. This suggests that recurrence analysis, at an adequate level of abstraction, enhances classification performance. Conversely, this pattern does not reproduce for time-frequency analysis. Traditional ML models trained on discrete time-frequency features showed no substantial performance gains when compared to their DL counterparts using CWT and CNNs. Therefore, recurrence analysis offers deeper insights into HRV dynamics for OSA detection than conventional time-frequency transformations, such as CWT. Furthermore, the significance of pre-training becomes evident in the final performance of the models. As demonstrated in the results in Table 4, the pre-trained version of AlexNet with DMs outperformed the rest of the DL models. The prior exposure to a diverse range of colors and shapes from ImageNet may have provided the network with additional levels of abstraction, enhancing its ability to distinguish between apneic and normal episodes. However, this effect was not replicated in subsequent experiments involving RP (thresholded DM) and CWT. This missing improvement may be attributed to the information leakage inherent in RP and CWT representations, making DM images more effective for this task. The optimal outcomes in our study, around 75% Ac, may appear lower compared to previously reported state-of-the-art results. However, direct comparisons are difficult due to differences in experimental contexts. Many prior studies reporting Ac above 90% often \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline
**Input** & **\# Features** & **Model** & **Ac** & **Se** & **Sp** & **PPV** & **NPV** & **F1** \\  & 5 & SVM & 68.41 & 21.69 & 89.06 & 46.70 & 72.01 & 29.62 \\  & 5 & KNN & 62.35 & 33.32 & 75.18 & 37.24 & 71.84 & 35.17 \\ RQA features & 5 & DT & 59.38 & 41.26 & 67.39 & 35.87 & 72.19 & 38.37 \\  & 5 & BAG & 62.76 & 32.18 & 76.28 & 37.48 & 71.79 & 34.63 \\  & 5 & ADA & 66.45 & 27.84 & 83.52 & 42.75 & 72.37 & 33.72 \\ \hline Time, & 4 & SVM & 63.82 & 59.65 & 70.42 & 76.13 & 52.45 & 55.82 \\ frequency, & 11 & KNN & 61.81 & 62.23 & 59.58 & 71.22 & 50.60 & 56.21 \\ and complexity & 5 & DT & 59.79 & 63.65 & 53.69 & 68.49 & 48.28 & 54.91 \\ features & 8 & BAG & 63.39 & 62.47 & 64.86 & 73.77 & 52.21 & 56.88 \\  & 9 & ADA & 65.89 & 68.42 & 61.91 & 73.97 & 55.34 & 61.18 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Table of results from other OSA detectors based on traditional ML. Models trained with MIT-BIH + UCD-DB, and tested with Apnea-ECG. rely on training and validating their models with a single dataset, which has been shown to artificially inflate results, as demonstrated in previous works [40; 82; 83; 84; 85].