
van wickle
ABS 060: Real-Time Migraine Prediction Using Machine Learning with Blood Oxygenation and Barometric Pressure Data
Elizabeth Baker ¹
¹ University of Louisville Department of Bioengineering
Van Wickle (2025) Volume 1, ABS 060
Introduction: Migraines affect over one billion people worldwide, with current management approaches largely reactive rather than preventive due to the difficulty of predicting onset. This study develops a real-time migraine prediction model integrating blood oxygen saturation (SpO₂) and barometric pressure data. The model's predictive performance achieved 94.50% accuracy, 0.972 AUC-ROC (area under the receiver operating characteristic curve, indicating excellent discriminative ability), 0.889 precision, and 0.821 recall. Model reliability was verified through multiple validation approaches: five-fold cross-validation demonstrated exceptional stability (coefficient 0.0075), while a small training-test performance gap (0.0345) confirmed the model wasn't overfitting to training data. Statistical validation through proportions z-test (z=8.684, p<0.001, null accuracy=0.803) verified performance significantly exceeded chance. SHAP (SHapley Additive exPlanations) analysis provided model interpretability, identifying experimental hypoxia-triggered attacks (44.3%) and hypoxia-induced headache (17.7%) as the strongest predictors.
The model architecture, selected after comparative analysis of six machine learning approaches, employs an optimized Random Forest classifier incorporating clinically-established SpO₂ thresholds and barometric pressure changes known to trigger migraines. The algorithm's reliance on data that can be extracted from standard smartwatch sensors and environmental measurements makes it particularly suitable for integration into existing wearable health monitoring systems, enabling a shift from reactive to preventive migraine care, with potential benefits for millions of migraine sufferers.
Methods: A computational framework integrating blood oxygen saturation (SpO₂) and barometric pressure data for migraine prediction was developed. Using knowledge from previous clinical studies, a synthetic dataset (n=1000) modeling physiological and environmental factors was generated. The risk scoring model incorporated weighted variables including experimental hypoxia-triggered attacks, aura induction, hypoxia-induced headache, and oxygen saturation thresholds. Additional features for oxygen criticality and barometric pressure drops were engineered. The preprocessing pipeline included KNN imputation, robust scaling, and class rebalancing via SMOTEENN. Five machine learning algorithms were implemented: Random Forest, Neural Network, Gradient Boosting, SVM, and XGBoost. The dataset was partitioned into training (64%), validation (16%), and test (20%) sets. Performance was evaluated using accuracy, precision, recall, F1-score, AUC-ROC, and cross-validation metrics, with SHAP analysis for feature importance interpretation.
Results: The machine learning models demonstrated strong predictive capabilities on the simulated data. The XGBoost model performed best, achieving 95.50% accuracy, precision of 0.9412, recall of 0.8205, F1-score of 0.8767, and an AUC-ROC of 0.9848. Random Forest also performed well (94.50% accuracy, AUC-ROC of 0.9724). Five-fold cross-validation yielded mean scores ranging from 0.9734 to 0.9877, with XGBoost showing the highest stability (0.9877±0.0081). Training-test performance gaps ranged from 0.0254 (SVM) to 0.0450 (Gradient Boosting), with XGBoost at 0.0378, suggesting good generalization without excessive overfitting. SHAP analysis revealed hypoxia-related variables had the strongest influence on model predictions, confirming the clinical relevance of capturing established migraine triggers.
Discussion: This study establishes a methodological framework for evaluating machine learning approaches to migraine prediction before clinical implementation. Tree-based ensemble methods, particularly XGBoost, demonstrated superior performance with simulated data based on clinical evidence. The significant influence of hypoxia-related variables in the models aligns with established research on migraine triggers. The approach uniquely combines blood oxygen saturation and barometric pressure—increasingly available through consumer wearables—for potential migraine prediction. While the simulated results represent an upper bound of real-world performance, they provide valuable guidance for data collection protocols and model selection in future clinical investigations. The framework developed offers a pathway toward personalized, anticipatory migraine management that could substantially improve patient outcomes through timely preventive interventions.
Volume 1, Van Wickle
Computational, ABS 060
April 12th, 2025
Other Articles in Computational