Personalized prediction of the following-day migraine attacks: a machine learning approach based on digital headache diary records
Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Objective Migraine is a globally prevalent neurological disorder that significantly impacts patients' daily functioning, yet precise prediction of attacks remains challenging due to interindividual variability. The study aims to develop a personalized predictive model for forecasting the following-day migraine attacks using machine learning technique. Methods Between February and October 2023, patients with a clinical diagnosis of migraine were recruited from two medical centers to participate in a three-month prospective cohort study using a digital headache diary application. Data from a digital diary were utilized to implement supervised learning algorithms, including KNN, SVM, Random Forest, and XGBoost to predict the following-day migraine attacks. The dataset was split into 80% training and 20% testing sets, and model performance was evaluated using accuracy, recall, precision, F1-score, specificity and AUC. Results A total of 25 migraine patients with 5 to 14 monthly attack days was analyzed. The KNN model achieved a recall rate of 91% and an AUC of 0.83 for predicting the following-day migraine attacks. Moreover, based on ablation testing, the most significant predictive features identified were pain intensity, pain location, medication efficacy and menstrual cycle status. Conclusions This is the first prospective, multicenter study in Taiwan to utilize real-world digital headache diary data over a three-month period. The findings demonstrate the utility of machine learning—particularly KNN—in predicting the following-day migraine attacks based on key features such as pain intensity, menstrual cycle, medication effectiveness, and pain location. This patient-centered, data-driven approach offers a novel tool for short-term migraine prediction applicable to clinical care and self-management.