Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Monday, March 11, 2019 at 4:00 PM to 4:30 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?


Citing this Article

Right click to copy or hit: ctrl+c (cmd+c on mac)

Published on 12.12.16 in Vol 2, No 1 (2016): December

This paper is in the following e-collection/theme issue:


    Sleep Phenotypes in Chronic Pain Sufferers: Application of Machine Learning to a Large Database

    NeuroMetrix Inc., Waltham, MA, United States

    Corresponding Author:

    Xuan Kong, PhD

    NeuroMetrix Inc.

    1000 Winter Street

    Waltham, MA, 02451

    United States

    Phone: 1 781 314 2722

    Fax:1 781 890 1556



    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.

    iproc 2016;2(1):e7



    This poster was presented at the Connected Health Symposium 2016, October 20-21, Boston, MA, United States. The poster is displayed as an image in Figure 1 and as a PDF in Multimedia Appendix 1.

    Figure 1. Poster.
    View this figure

    Multimedia Appendix 1


    PDF File (Adobe PDF File), 226KB

    Edited by T Hale; submitted 05.06.16; peer-reviewed by CHS Scientific Program Committee; accepted 02.08.16; published 12.12.16

    ©Xuan Kong, Thomas C Ferree, Shai N Gozani. Originally published in Iproceedings (, 12.12.2016.

    This is an open-access article distributed under the terms of the Creative Commons Attribution License (, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in Iproceedings, is properly cited. The complete bibliographic information, a link to the original publication on, as well as this copyright and license information must be included.