Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Mar 14:12:1389402.
doi: 10.3389/fcvm.2025.1389402. eCollection 2025.

The use of heart rate variability, oxygen saturation, and anthropometric data with machine learning to predict the presence and severity of obstructive sleep apnea

Affiliations

The use of heart rate variability, oxygen saturation, and anthropometric data with machine learning to predict the presence and severity of obstructive sleep apnea

Rafael Rodrigues Dos Santos et al. Front Cardiovasc Med. .

Abstract

Introduction: Obstructive sleep apnea (OSA) is a prevalent sleep disorder with a high rate of undiagnosed patients, primarily due to the complexity of its diagnosis made by polysomnography (PSG). Considering the severe comorbidities associated with OSA, especially in the cardiovascular system, the development of early screening tools for this disease is imperative. Heart rate variability (HRV) is a simple and non-invasive approach used as a probe to evaluate cardiac autonomic modulation, with a variety of newly developed indices lacking studies with OSA patients.

Objectives: We aimed to evaluate numerous HRV indices, derived from linear but mainly nonlinear indices, combined or not with oxygen saturation indices, for detecting the presence and severity of OSA using machine learning models.

Methods: ECG waveforms were collected from 291 PSG recordings to calculate 34 HRV indices. Minimum oxygen saturation value during sleep (SatMin), the percentage of total sleep time the patient spent with oxygen saturation below 90% (T90), and patient anthropometric data were also considered as inputs to the models. The Apnea-Hypopnea Index (AHI) was used to categorize into severity classes of OSA (normal, mild, moderate, severe) to train multiclass or binary (normal-to-mild and moderate-to-severe) classification models, using the Random Forest (RF) algorithm. Since the OSA severity groups were unbalanced, we used the Synthetic Minority Over-sampling Technique (SMOTE) to oversample the minority classes.

Results: Multiclass models achieved a mean area under the ROC curve (AUROC) of 0.92 and 0.86 in classifying normal individuals and severe OSA patients, respectively, when using all attributes. When the groups were dichotomized into normal-to-mild OSA vs. moderate-to-severe OSA, an AUROC of 0.83 was obtained. As revealed by RF, the importance of features indicates that all feature modalities (HRV, SpO2, and anthropometric variables) contribute to the top 10 ranks.

Conclusion: The present study demonstrates the feasibility of using classification models to detect the presence and severity of OSA using these indices. Our findings have the potential to contribute to the development of rapid screening tools aimed at assisting individuals affected by this condition, to expedite diagnosis and initiate timely treatment.

Keywords: autonomic modulation of the heart; heart rate variability; machine learning; obstructive sleep apnea; oxygen saturation.

PubMed Disclaimer

Conflict of interest statement

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest. The author(s) declared that they were an editorial board member of Frontiers, at the time of submission. This had no impact on the peer review process and the final decision.

References

    1. Dempsey JA, Veasey SC, Morgan BJ, O’Donnell CP. Pathophysiology of sleep apnea. Physiol Rev. (2010) 90(1):47–112. 10.1152/physrev.00043.2008 - DOI - PMC - PubMed
    1. Kapur VK, Auckley DH, Chowdhuri S, Kuhlmann DC, Mehra R, Ramar K, et al. Clinical practice guideline for diagnostic testing for adult obstructive sleep apnea: an American academy of sleep medicine clinical practice guideline. J Clin Sleep Med. (2017) 13(3):479–504. 10.5664/jcsm.6506 - DOI - PMC - PubMed
    1. Jafari B, Mohsenin V. Polysomnography. Clin Chest Med. (2010) 31(2):287–97. 10.1016/j.ccm.2010.02.005 - DOI - PubMed
    1. Berry RB, Budhiraja R, Gottlieb DJ, Gozal D, Iber C, Kapur VK, et al. Rules for scoring respiratory events in sleep: update of the 2007 AASM manual for the scoring of sleep and associated events. J Clin Sleep Med. (2012) 8(5):597–619. 10.5664/jcsm.2172 - DOI - PMC - PubMed
    1. Flemons WW, Douglas NJ, Kuna ST, Rodenstein DO, Wheatley J. Access to diagnosis and treatment of patients with suspected sleep apnea. Am J Respir Crit Care Med. (2004) 169(6):668–72. 10.1164/rccm.200308-1124PP - DOI - PubMed

LinkOut - more resources