## 4 Result  
For the enhanced STOP-BANG model, various machine learning classification techniques were employed, including Logistic Regression, Random Forest, Support Vector Machine (SVM), and K-Nearest Neighbor (K-NN), to assess the performance in diagnosing obstructive sleep apnea. These methods were evaluated based on accuracy, sensitivity, specificity, and F1 score, aiding in determining the most effective model for obstructive sleep apnea diagnosis. The significant outcomes of this analysis are summarized in Tables 3-6, showcasing the results for each classification technique.  
The results for each model are as follows. When comparing the best-performing model with actual data and control group data, the comparison yielded in Table 7.  
Figure 1 showed that Logistic Regression varied in performance, with changes in the regularization strength C, particularly excelling at C = 5, where it achieved an accuracy of 0.92, sensitivity of 0.96, specificity of 0.71, and F1 score of 0.81. The Random Forest model displayed consistent performance with n_estimators = 100, resulting in an accuracy of 0.85, sensitivity of 0.88, specificity of 0.71, and F1 score of 0.78. The SVM model stood  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**K value** & **7** & **9** & **11** & **13** \\ \hline
**Accuracy** & 0.92 & 0.92 & 0.94 & 0.96 \\ \hline
**Sensitivity** & 0.71 & 0.71 & 0.85 & 0.71 \\ \hline
**Specificity** & 0.89 & 0.89 & 0.92 & 0.92 \\ \hline
**F1 Score** & 0.96 & 0.93 & 0.95 & 0.96 \\ \hline \hline \end{tabular}
\end{table}
Table 6: K-NN result.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**C value** & **0.01** & **0.1** & **1** & **5** \\ \hline
**Accuracy** & 0.87 & 0.94 & 0.91 & 0.92 \\ \hline
**Sensitivity** & 1 & 0.96 & 0.94 & 0.96 \\ \hline
**Specificity** & 0 & 0.42 & 0.71 & 0.71 \\ \hline
**F1 Score** & 0 & 0.59 & 0.81 & 0.81 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Logistic Regression result.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**n\_estimators** & **10** & **50** & **100** & **200** & **500** \\ \hline
**Accuracy** & 0.84 & 0.84 & 0.85 & 0.84 & 0.85 \\ \hline
**Sensitivity** & 0.86 & 0.88 & 0.88 & 0.9 & 0.9 \\ \hline
**Specificity** & 0.71 & 0.57 & 0.71 & 0.42 & 0.57 \\ \hline
**F1 Score** & 0.78 & 0.69 & 0.78 & 0.58 & 0.69 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Random Forest result.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**C value** & **0.1** & **1** & **10** & **100** \\ \hline
**Accuracy** & 0.87 & 0.87 & 0.92 & 0.92 \\ \hline
**Sensitivity** & 1 & 1 & 0.96 & 0.96 \\ \hline
**Specificity** & 0.86 & 0.86 & 0.92 & 0.92 \\ \hline
**Sensitivity** & 0.89 & 0.89 & 0.94 & 0.96 \\ \hline
**Specificity** & 0.61 & 0.32 & 0.83 & 0.71 & 0.71 \\ \hline \hline \end{tabular}
\end{table}
Table 5: SVM result.  
out in terms of sensitivity and F1 score, showing an accuracy of 0.92, sensitivity of 0.96, specificity of 0.71, and F1 score of 0.92 at C = 10. The most significant findings came from the K-NN algorithm, which, at K = 11, recorded the highest performance metrics among all models used in this study, with an accuracy of 0.94, sensitivity of 0.94, specificity of 0.83, and F1 score of 0.95. This suggests that the K-NN model is a meaningful option for OSA diagnosis using the STOP-BANG questionnaire, capable of improving accuracy, sensitivity, and specificity simultaneously. A closer look at the results confirms that among the machine learning classification models applied with the STOP-BANG questionnaire and OSA diagnostic data, the K-NN model notably offers high sensitivity and specificity. Specifically, the model's specificity demonstrated a significant improvement, moving from a specificity of 0.61 in the research data and 0.47 in the control group data to 0.83, thereby proving how applying machine learning models to OSA diagnoses using the STOP-BANG questionnaire can effectively enhance sensitivity and specificity.