An Accurate, Low-Cost Machine Learning System for Sleep Apnea Detection

CSEF · 2026 Medicine & Physiology (Track 2) (Senior Division)

Overview

Sleep apnea, a disorder in which breathing repeatedly stops and starts during sleep due to airway obstruction or disrupted brain signaling, affects over one billion people worldwide.However, over 80-90% of these cases remain undiagnosed due to the high cost and inaccessibility of polysomnography, which requires 25+ sensors and costs over $3,000. This project developed and evaluated a low-cost machine learning system to detect sleep apnea events using only ECG and SpO₂ signals, targeting a final hardware cost of ~$20. Using the HuGCDN2014-OXI dataset of 83 participants, ECG and SpO₂ signals were segmented into one-minute windows and processed to extract six factors detailing cardiovascular variation and oxygen desaturation patterns. Five machine learning models - XGBoost, SVM-RBF, Hidden Markov Model, Gaussian Process Classifier, and Naive Bayes Network - were implemented and compared against a traditional SpO₂ threshold baseline using stratified 80/20 train-test splitting. XGBoost achieved the highest participant-level AUC of 0.958, outperforming all models and the baseline. To assess generalizability, the trained model was applied without retraining to the independent PhysioNet Apnea-ECG dataset, achieving 0.86 AUC using ECG features alone, confirming cross-dataset validity. All machine learning models significantly outperformed the threshold baseline, demonstrating that multi-feature classification captures apnea patterns that threshold methods miss. A low-cost hardware prototype integrating ECG and SpO₂ sensors was assembled using an Arduino microcontroller to demonstrate real-world deployment feasibility. These results suggest machine learning is a viable segue to affordable, accurate at-home sleep apnea screening, expanding the opportunity for diagnosis to the millions currently undetected.

Competition history

  • CSEF 2026 Medicine & Physiology (Track 2) (Senior Division) · Entry S-21-20

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Browse more like this

Source: California Science & Engineering Fair public projects

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. An account also raises your daily allowance for “Has this been done?”, and lets you create a key for the MCP server with a much higher limit than anonymous use. Browsing stays public.

Continue with Google