## 3 Results  
The metrics of accuracy, sensitivity, specificity, and F1 score are used for quantitative evaluation. The results are reported in Table 2. The rationale for testing multiple feature combinations is to provide a systematic evaluation benchmark in the realm of machine learning for the purpose outlined in this work. The code is provided here: [[https://colab.research.google.com/drive/16n6](https://colab.research.google.com/drive/16n6) Zy03 TATbd-_TRfbJ1 lg8 Tja_N0 SN5?usp=sharing]([https://colab.research.google.com/drive/16n6](https://colab.research.google.com/drive/16n6) Zy03 TATbd-_TRfbJ1 lg8 Tja_N0 SN5?usp=sharing), accessed on 10 January 2024.  
In OSA classification, models relying solely on a single feature type, either hypnodensity or hypnograms, achieved an F1 score of 57.80. The inclusion of sleep and medical data led to a noticeable improvement, with F1 scores increasing to 69.40 and 69.30, respectively. This enhancement indicates a more balanced model performance in terms of precision and recall.  
In terms of accuracy, both hypnodensity (54.20%) and hypnograms (54.00%) perform roughly the same, i.e., once again only improving over random chance when additional contextual information is incorporated. This underscores the importance of adding patient characteristics and historical health records, allowing the assimilation of patient-specific nuances into the classification process. For insomnia and depression with the same features, scores of (54.90%) and (82.60%) are obtained, respectively. When using only image representations, the training process was unstable, likely because single-night sleep transitions offer insufficient information for these two conditions.  
Our models achieved high sensitivity (\(\approx\)79%) but relatively lower specificity (\(\approx\)48%) for OSA classification. This suggests that the model effectively identifies true positives but struggles with false positives. Although high sensitivity is valuable for screening, especially for conditions such as OSA, where false negatives can lead to serious health risks, low specificity can result in unnecessary clinical evaluations. An approach to improve specificity is to incorporate stricter decision thresholds or ensemble models that combine predictions from multiple classifiers.  
For insomnia, neither metric is remarkable (\(\approx\)55%), and for depression, there is a high specificity (96.10%), which is not ideal for screening potential at-risk patients as the sensitivity is only 31.20%).  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Features** & **Accuracy (\%)** & **Sensitivity (\%)** & **Specificity (\%)** & **F1-Score (\%)** \\ \hline \multicolumn{5}{c}{OSA Classification} \\ \hline Hypnodensity & 54.20 & 79.70 & 21.00 & 57.80 \\ \hline Hypnodensity + Sleep + Medical & 63.10 & 74.20 & 48.70 & 69.40 \\ \hline Hypnograms & 54.00 & 79.70 & 20.50 & 57.80 \\ \hline Hypnograms + Sleep + Medical & 62.80 & 74.10 & 48.10 & 69.30 \\ \hline \multicolumn{5}{c}{Insomnia Classification} \\ \hline Hypnograms + Sleep + Medical & 54.90 & 54.60 & 55.10 & 53.90 \\ \hline \multicolumn{5}{c}{Depression Classification} \\ \hline Hypnograms + Sleep + Medical & 82.60 & 31.20 & 96.10 & 42.80 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Quantitative model performance metrics for classification of each condition with sleep stage architecture, sleep, and medical features.