Abstract
Background/Objectives: Patients with headache experience depression, anxiety, and reduced quality of life, which are individually associated with pain intensity and painkiller use, but their comprehensive combined effect remains unclear. Methods: Comprehensive patient groups were formed based on unsupervised clustering using machine learning algorithms, and their associations were analyzed via ordinary least square regression. K-means and t-distributed stochastic neighbor embedding (t-SNE) combined with hierarchical density-based spatial clustering of applications with noise (HDBSCAN) were applied for clustering. Results: A total of 813 patients were subdivided via K-means clustering (2 clusters) and t-SNE + HDBSCAN clustering (4 clusters). In the K-means clustering, Cluster 1 showed significantly lower peak pain intensity (coefficient [95% CI]: -0.7 [-1 to -0.4]) and frequency of painkiller use (-2.3 [-3.4 to -1.3]) compared to Cluster 0. In the t-SNE + HDBSCAN clustering, Clusters 2 and 3 showed higher peak pain intensity (1.1 [0.5-1.7] and 1.6 [1.0-2.2], respectively) and more frequent painkiller use (2.5 [0.4-4.5] and 4.4 [2.2-6.7], respectively) than Cluster 1. Conclusions: The clustering approach successfully generated groups that reflected a comprehensive profile of depression-, anxiety-, and headache-related quality of life. The clusters demonstrated significant differences which can help better characterize patients based on their psychological and functional impact.