Abstract Introduction Obstructive Sleep Apnea (OSA) is characterized by reduction in airflow. Hypopnea is a smaller reduction in airflow compared to apnea but also accompanied by drop in oxygen saturation leading to sympathetic activation. Frequent OSA events are correlated with incidence of cardiovascular diseases. Measuring changes in airflow requires overnight polysomnography that is expensive. Electrocardiogram (ECG) is available through wearable devices at home and therefore, detecting OSA events using ECG can make OSA diagnostics more accessible. This paper studies the use of ECG morphology and an ensemble machine learning algorithm to detect OSA events. The algorithm designed is light weight to ensure that it can be implemented on an embedded processor. Methods The data from the Apnea, Bariatric surgery, and CPAP (ABC) study provided by the National Sleep Research Resource is used for the analysis. Twenty-six subjects diagnosed with severe OSA are considered with single night polysomnography before treatment. Since OSA events have a minimum 10s duration, 10s non-overlapping windows with OSA labels from a technician scoring is used. Features are extracted from the PQRST complex and majority voting across multiple algorithms is used to select the top 7 features (SDNN, RMSSD, P-P interval, P-duration, P-R interval, T-duration and T-P interval) with highest explanatory power. We train a random forest classifier using leave-one-out methodology where 25 subjects are used for training and the 26th subject is used for testing (all permutations are used). We use sensitivity, precision and F1 score for evaluation. Results The algorithm detects the precise occurrence (onset and offset) as well as the total number of events during the night. The precision, sensitivity and F1 scores are 70%, 96% and 80% respectively. The prediction leans towards higher occurrence of OSA events as the subjects suffer from severe OSA. We uncover 32% of false positives are events that are accompanied by significant SPO2 desaturation pointing to the inaccuracy of manual scoring. Assuming these false positives are correct predictions the precision increases to 79%. Conclusion The classification of OSA events using ECG features and machine learning demonstrates the feasibility of using wearables to measure OSA in a home setting. Support (if any)
Read full abstract