Participants underwent overnight PSG monitoring (SOMNO screen TM plus PSG + sleep monitor) at the Sleep Medical Center of West China Fourth Hospital of Sichuan University with symptoms of breathlessness and snoring at night were included in this study from January to December in 2023. Apnea-Hypopnea Index (AHI) was calculated to determine whether patients had OSA and their severity.
Inclusion criteria①Age ≥ 18 years old on the day of PSG monitoring; ②Participants who received PSG monitoring in the Sleep Medical Center of West China Fourth Hospital of Sichuan University for the first time without any OSA related treatment (such as continuous positive airway pressure, multilevel upper respiratory tract minimally invasive surgery) before; ③Participants with complete demographic information (such as age, sex, height and weight) and PSG monitoring record (monitoring duration ≥ 7 h); ④Healthy people (sleep apnea hypopnea index AHI < 5) and OSA patients with varying degrees of severity diagnosed through PSG.
Exclusion criteria①Participants who drank caffeinated beverages (such as tea and coffee)/alcohol or took hypnotics (such as estazolam and zopiclone) on the day of monitoring; ②Patients with artifact of ECG signal, blood pressure signal and minimum blood oxygen saturation signal accounting for more than 30% in their PSG records after data analyzing. ③Patients with congestive heart failure, coronary heart disease, thyroid dysfunction and mental illness.
Data preprocessingIn this study, fast Fourier transform was applied to detect and identify the peak (R-peak) of QRS complex waves in ECG signals. Time interval between each adjacent R-peak (R-R interval, RRi) was calculated as the basis of other derived HRV time domain features. Secondly, due to the physical movement at the beginning and end of PSG monitoring, which generated a large amount of signal artifacts. HRV related features were subsequently calculated based on ECG signals extracted within time in bed (TIB). Finally, to avoid the impact of dimensions between different features and missing values on the result of this study, features used to train prediction model had been standardized and the mean imputation method was performed to process missing continuous variables.
Features extractionA total of 17 features including HRV time domain, frequency domain features and general demographic characteristics were extracted for prediction model training. The name and description of each feature were listed below (Table 1).
Table 1 The name and description of 17 featuresModel selection and parameter settingThe prediction model was constructed by RF algorithm to determine whether a patient had OSA, especially moderate to severe OSA. Although any machine learning classification algorithm can be used to train the model, RF algorithm is considered in this study. RF algorithm is a high-performance ensemble learning algorithm that builds multiple decision trees as weak classifiers, which can be trained quickly and avoid the negative effect of overfitting on disease severity prediction [13]. Therefore, to apply RF algorithm reasonably and fit a high-performance prediction model, it is necessary to adjust the parameters of prediction model, such as the number, depth of trees, and the number of leaf nodes. The optimal setting for parameters were found by applying grid search method in this study. To begin with, a series of options were set for each parameter, and then different options for each parameter were utilized to fit models respectively. Lastly, the model with the best parameters was selected according to the result of performance comparison (evaluated by accuracy) between different models, and returned the detail setting of each parameter from the selected model (Table 2).
Table 2 The detail setting of each parameter after grid searchingDataset split and cross validation70% (n = 558) of the 798 patients were randomly assigned to the training set, and the remaining 30% (n = 240) were assigned to the test set. 10-fold cross validation was applied to evaluate the model performance. According to the rationale of 10-fold cross validation, patients were randomly divided into 10 subgroups, 9 subgroups of which were used to construct the model to predict OSA severity, and the remaining 1 subgroup was reserved for verifying the model prediction performance. The process above was repeated for 10 times to ensure that each subgroup was once designated to test the performance of the model, which produced 10 test results. The average of 10 results was calculated to obtain the final evaluation result.
Performance indicators and statistical analysisTrue positive (TP), False positive (FP), True negative (TN) and False negative (FN) were used to demonstrate the prediction results. The relationship between the predicted severity and the actual severity were displayed through confusion matrix containing TP, FP, TN, and FN. Sensitivity, specificity, accuracy, F1 score and area under the curve (AUC) were also used to comprehensively evaluate the prediction performance of the model.
Quantitative features were described by mean ± standard deviation, while qualitative features were described by percentage (%). If quantitative features followed normal distribution, ANOVA was applied to compare the difference between groups; If not, Kruskal-Wallis H rank sum test was applied to compare the difference between groups. Pearson Chi-square test or Fisher exact test were applied to compare the difference between groups for qualitative features. Unless otherwise specified, all tests were conducted by two-sided tests, and the significance level was set to 0.05 (α = 0.05). All of the hypothesis tests were implemented by SAS 9.4 and R 4.2.2 in study; Data imputation, standardization, splitting, random forest model training, 10-fold cross validation and results plotting were performed by Python 3.11 scikit-learn and matplotlib. Finally, to ensure the repeatability of research results, the random seed was set to 1.
留言 (0)