@Article{info:doi/10.2196/iproc.6103, author="Kong, Xuan and Ferree, Thomas C and Gozani, Shai N", title="Sleep Phenotypes in Chronic Pain Sufferers: Application of Machine Learning to a Large Database", journal="iproc", year="2016", month="Dec", day="12", volume="2", number="1", pages="e7", keywords="sleep phenotype; chronic pain; machine learning; clustering analysis", abstract="Background: Chronic pain affects over 100 million American adults. There is a negative reciprocal relationship between chronic pain and sleep. As many as 80{\%} of chronic pain patients report poor sleep quality and daytime fatigue. We have recently reported on the clinical benefits of fixed-site high-frequency transcutaneous electrical nerve stimulation (Quell, NeuroMetrix, Inc) in a chronic pain cohort. In addition to delivering therapeutic neurostimulation, this device collects health data including utilization, sleep measures, and activity metrics. The data is communicated to the patient through a smartphone app and aggregated in a cloud server. This digital health database presents a novel opportunity to study population characteristics in a large cohort of chronic pain sufferers. Objective: Our primary objective was to use machine learning techniques on a large database of sleep data in chronic pain sufferers to determine ``sleep phenotypes.'' The long-term goal of this research is to develop personalized therapeutic profiles that optimize sleep in chronic pain patients. Methods: De-identified data from device users consenting to have their data uploaded to a cloud server was analyzed. Individual users were characterized by their median sleep data. The analyzed sleep parameters included total sleep time (TST, hours), sleep efficiency (SE, {\%}), periodic leg movement index (PLMI, events/hour), position change rate (PCR, events/hour), and time out of bed (OOB, minutes). K-means clustering was used to partition the data set into 3 mutually exclusive clusters based on TST, PLMI, PCR, and OOB. The optimal number of clusters was determined by the Silhouette value. Clustering was based on the correlation metric. One-way ANOVA was used to test whether the 3 cluster groups had a common mean for each sleep parameter. For parameters with differences in group means, t test was used to identify which pairs of means were different. Results: A total of 389 users with 5 or more nights of TST between 4 and 12 hours were included in the analysis. The sizes of the 3 clusters were 161 (41.4{\%}), 147 (37.8{\%}), and 81. None of the sleep parameters had the same mean among three clusters (P<.001). The 3 clusters represented 3 sleep phenotypes. The largest group (n=161) was a ``good sleeper'' phenotype characterized by a mean TST of 7.3, SE of 95.2, and low PLMI (2.1), PCR (1.3), and OOB (1.4). The second largest cluster was a ``moderate sleeper'' phenotype characterized by a mean TST of 7.4, SE of 92.4, low PLMI (3.9) and PCR (0.9), but relatively high OOB of 12.7. The third cluster was a ``poor sleeper'' phenotype characterized by TST of 6.6, SE of 91.2, and a high PLMI of 11.7. All pair-wise cluster means were different (P<.025), except for TST between good and moderate sleepers (P=.452). Conclusions: We identified 3 sleep phenotypes in a large cohort of chronic pain sufferers. The phenotypes reflected a progression from good to poor sleepers. The poorer sleepers were characterized by either a large amount of time out of bed during the night or a high rate of periodic leg movements. ", issn="2369-6893", doi="10.2196/iproc.6103", url="http://www.iproc.org/2016/1/e7/", url="https://doi.org/10.2196/iproc.6103" }