Related Experiment Videos
Predicting Headache at Age 40 Using Machine Learning: A Life-Course Analysis from the 1982 Pelotas Birth Cohort,
João Pedro Caetano1, Helena Silveira Schuch2, Luiz Alexandre Chisini1
1Graduate Program in Dentistry, Federal University of Pelotas, Pelotas, RS, Brazil.
Objective:
This study aims to develop and evaluate machine learning (ML) models predicting headache at 40 years of age using longitudinal data from the 1982 Pelotas Birth Cohort, Brazil.
Methods:
Analysis included 2,963 participants followed from birth to age 40. The outcome of interest was self-reported headache at age 40, ascertained by a standardized yes/no item. Predictors spanning sociodemographic, lifestyle, sleep, diet, mental health, and orofacial pain domains over the life course were used. Five supervised ML algorithms were evaluated: XGBoost, CatBoost, Random Forest, LightGBM, and TabPFN, benchmarked against multivariable logistic regression. Model performance was primarily assessed using the area under the ROC curve, with accuracy, precision, recall, and F1-score also reported. Data analysis was conducted in Python, with the database split into training (70%) and test (30%) sets. Model interpretability was assessed using Shapley values.
Results:
Self-reported headache was reported by 1,275 individuals (43.0%). The tuned XGBoost classifier achieved the highest discriminative performance (AUC = 0.79, 95% CI 0.76-0.82), which did not differ significantly from multivariable logistic regression (AUC = 0.78, 95% CI 0.75-0.81). Across all algorithms, AUC ranged from 0.76 to 0.79, with specificity consistently high (0.79-0.83) and sensitivity moderate (0.54-0.64). At the 0.50 threshold, the tuned XGBoost classifier showed positive and negative predictive values of 0.70 and 0.75. Restricted to variables measured before age 40, the same classifier achieved an AUC of 0.74 (95% CI 0.71-0.78). Shapley analysis identified female sex, poor sleep quality, psychological distress, dietary trigger foods, lower household income, and reduced social support from friends as the dominant contributors to model output.
Conclusion:
ML models using life-course data can predict midlife headache with moderate-to-good discriminative ability. The prominence of modifiable psychosocial and socioeconomic predictors suggests concrete targets for future etiological and interventional research. Further model refinement, external validation, and assessment of clinical and public health utility are needed before real-world implementation.
Clinical Significance:
Sleep quality, psychological distress, social support and household income, asked during routine dental history-taking, identify adults more likely to report headache; bruxism and dental attendance do not. Because sensitivity is moderate, these items should guide who warrants fuller headache and orofacial pain assessment rather than serve as a screening test.