Personalized machine learning prediction of next-day migraine persistence using digital headache diary data.
Journal:
Headache
Published Date:
Jul 15, 2026
Abstract
OBJECTIVES/BACKGROUND: Migraine is a disabling neurological disorder with substantial interindividual variability. Predicting whether an ongoing migraine attack will persist into the following day remains challenging. We evaluated the feasibility and predictive performance of personalized machine learning models for predicting next-day migraine persistence using longitudinal digital headache diary data. METHODS: This prospective longitudinal cohort study was designed for prognostic prediction model development. Participants were recruited from two medical centers in Taiwan between February 2023 and October 2023, and each completed a 3-month digital headache diary observation period. Patients with 5-14 monthly headache days were included. Same-day diary records from index migraine days were used to predict next-day migraine persistence. Personalized and generalized models were developed using k-nearest neighbors (KNN), support vector machine, random forest, and eXtreme Gradient Boosting (XGBoost). Model performance was evaluated using discrimination, calibration, and sensitivity analyses. RESULTS: A total of 25 patients were included. Compared with the generalized KNN model, the personalized KNN model achieved significantly higher area under the curve (AUC) (0.83 ± 0.09 vs. 0.63 ± 0.04; ΔAUC = 0.20). Among personalized models, KNN also outperformed support vector machine, random forest, and eXtreme gradient boosting, with ΔAUC values of 0.23, 0.15, and 0.16, respectively; the corresponding Holm-adjusted p-values were <0.001, 0.003, and <0.001. The personalized KNN model showed the lowest Brier score (0.13 ± 0.04), with a calibration intercept of 0.08 and calibration slope of 0.80. Ablation analysis indicated that the KNN model performance was most sensitive to the removal of pain intensity, menstrual cycle status, perceived medication effectiveness, and pain location, with pain intensity showing the largest effect. CONCLUSION: Personalized machine learning models based on digital headache diary data may feasibly predict next-day persistence of ongoing migraine. Larger external validation studies are needed to confirm model generalizability and clinical applicability.
Authors
Keywords
No keywords available for this article.