Using natural language processing to automatically classify written self-reported narratives by patients with migraine or cluster headache
- PMID: 36180844
- PMCID: PMC9524092
- DOI: 10.1186/s10194-022-01490-0
Using natural language processing to automatically classify written self-reported narratives by patients with migraine or cluster headache
Abstract
Background: Headache medicine is largely based on detailed history taking by physicians analysing patients' descriptions of headache. Natural language processing (NLP) structures and processes linguistic data into quantifiable units. In this study, we apply these digital techniques on self-reported narratives by patients with headache disorders to research the potential of analysing and automatically classifying human-generated text and information extraction in clinical contexts.
Methods: A prospective cross-sectional clinical trial collected self-reported narratives on headache disorders from participants with either migraine or cluster headache. NLP was applied for the analysis of lexical, semantic and thematic properties of the texts. Machine learning (ML) algorithms were applied to classify the descriptions of headache attacks from individual participants into their correct group (migraine versus cluster headache).
Results: One-hundred and twenty-one patients (81 participants with migraine and 40 participants with cluster headache) provided a self-reported narrative on their headache disorder. Lexical analysis of this text corpus resulted in several specific key words per diagnostic group (cluster headache: Dutch (nl): "oog" | English (en): "eye", nl: "pijn" | en: "pain" and nl: "terug" | en: "back/to come back"; migraine: nl: "hoofdpijn" | en: "headache", nl: "stress" | en: "stress" and nl: "misselijkheid" | en: "nausea"). Thematic and sentiment analysis of text revealed largely negative sentiment in texts by both patients with migraine and cluster headache. Logistic regression and support vector machine algorithms with different feature groups performed best for the classification of attack descriptions (with F1-scores for detecting cluster headache varying between 0.82 and 0.86) compared to naïve Bayes classifiers.
Conclusions: Differences in lexical choices between patients with migraine and cluster headache are detected with NLP and are congruent with domain expert knowledge of the disorders. Our research shows that ML algorithms have potential to classify patients' self-reported narratives of migraine or cluster headache with good performance. NLP shows its capability to discern relevant linguistic aspects in narratives from patients with different headache disorders and demonstrates relevance in clinical information extraction. The potential benefits on the classification performance of larger datasets and neural NLP methods can be investigated in the future.
Trial registration: This study was registered with clinicaltrials.gov with ID NCT05377437.
Keywords: Cluster headache; Machine learning; Migraine; Natural language processing.
© 2022. The Author(s).
Conflict of interest statement
None.
Figures
Similar articles
-
mBrain: towards the continuous follow-up and headache classification of primary headache disorder patients.BMC Med Inform Decis Mak. 2022 Mar 31;22(1):87. doi: 10.1186/s12911-022-01813-w. BMC Med Inform Decis Mak. 2022. PMID: 35361224 Free PMC article.
-
Natural language processing with machine learning methods to analyze unstructured patient-reported outcomes derived from electronic health records: A systematic review.Artif Intell Med. 2023 Dec;146:102701. doi: 10.1016/j.artmed.2023.102701. Epub 2023 Nov 1. Artif Intell Med. 2023. PMID: 38042599 Free PMC article.
-
Biomarkers of Migraine and Cluster Headache: Differences and Similarities.Ann Neurol. 2023 Apr;93(4):729-742. doi: 10.1002/ana.26583. Epub 2023 Jan 4. Ann Neurol. 2023. PMID: 36565271
-
Natural Language Processing Accurately Differentiates Cancer Symptom Information in Electronic Health Record Narratives.JCO Clin Cancer Inform. 2024 Aug;8:e2300235. doi: 10.1200/CCI.23.00235. JCO Clin Cancer Inform. 2024. PMID: 39116379
-
[Digitization in the diagnosis and treatment of headache].MMW Fortschr Med. 2024 Nov;166(20):67-69. doi: 10.1007/s15006-024-4435-9. MMW Fortschr Med. 2024. PMID: 39576541 Review. German.
Cited by
-
AI-Guided Cancer Therapy for Patients with Coexisting Migraines.Cancers (Basel). 2024 Oct 31;16(21):3690. doi: 10.3390/cancers16213690. Cancers (Basel). 2024. PMID: 39518129 Free PMC article. Review.
-
A Large Language Model-Based Generative Natural Language Processing Framework Finetuned on Clinical Notes Accurately Extracts Headache Frequency from Electronic Health Records.medRxiv [Preprint]. 2023 Oct 3:2023.10.02.23296403. doi: 10.1101/2023.10.02.23296403. medRxiv. 2023. Update in: Headache. 2024 Apr;64(4):400-409. doi: 10.1111/head.14702. PMID: 37873417 Free PMC article. Updated. Preprint.
-
A large language model-based generative natural language processing framework fine-tuned on clinical notes accurately extracts headache frequency from electronic health records.Headache. 2024 Apr;64(4):400-409. doi: 10.1111/head.14702. Epub 2024 Mar 25. Headache. 2024. PMID: 38525734 Free PMC article.
-
Application of Artificial Intelligence in the Headache Field.Curr Pain Headache Rep. 2024 Oct;28(10):1049-1057. doi: 10.1007/s11916-024-01297-5. Epub 2024 Jul 8. Curr Pain Headache Rep. 2024. PMID: 38976174 Review.
-
Convergence of Artificial Intelligence and Neuroscience towards the Diagnosis of Neurological Disorders-A Scoping Review.Sensors (Basel). 2023 Mar 13;23(6):3062. doi: 10.3390/s23063062. Sensors (Basel). 2023. PMID: 36991773 Free PMC article.
References
-
- Vos T, et al. Global, regional, and national incidence, prevalence, and years lived with disability for 328 diseases and injuries for 195 countries, 1990–2016: a systematic analysis for the Global Burden of Disease Study 2016. Lancet. 2017;390(10100):1211–1259. doi: 10.1016/S0140-6736(17)32154-2. - DOI - PMC - PubMed
-
- Headache Classification Committee of the International Headache Society (IHS) (2018) The International Classification of Headache Disorders, 3rd edition. Cephalalgia : an international journal of headache 38(1):1–211. 10.1177/0333102417738202 - PubMed
Publication types
MeSH terms
Associated data
Grants and funding
LinkOut - more resources
Full Text Sources
Medical
Research Materials