Abstract

Background: Continuous positive airway pressure (CPAP) is a standard treatment for Obstructive sleep apnea. However, adherence to CPAP is low, due to suboptimal pressure management.

Aims: To develop a machine-learning model for early detection of sleep apnea using single-lead electrocardiogram (ECG) signals. Data collected during CPAP titration reflects better patients? responses to PAP treatment at home.

Methods: 71 sets of single-lead ECGs with annotations were obtained from Sleep Center, Shuangho Hospital, Taipei. The data were divided into non-overlapping 30-second segments, and defined as pre-30, pre-60, pre-90, and normal breathing. These segments were transformed into spectrograms at three frequency bands corresponding to frequency ranges of overall ECG waveform, QRS complex, and T wave, respectively. Via Bag-of-Features technique, common patterns in the spectrograms corresponding to specific pre-OSA or normal breathing were extracted and input to four machine learning algorithms, including Support vector machine (SVM); K-nearest neighbor; Decision tree; and Linear discriminant analysis. 

Results: SVM outperformed with the highest accuracy of 98.2% and F1-score of 0.93. Pre-60 segments performed better than pre-30 and pre-90, particularly at the 8-50 Hz frequency band.

Conclusion: Our study is the first to examine the performance of the pre-OSA detection algorithms under the effect of CPAP.