Defining and Predicting Pain Volatility in Users of the Manage My Pain App: Analysis Using Data Mining and Machine Learning Methods

Background Measuring and predicting pain volatility (fluctuation or variability in pain scores over time) can help improve pain management. Perceptions of pain and its consequent disabling effects are often heightened under the conditions of greater uncertainty and unpredictability associated with pain volatility. Objective This study aimed to use data mining and machine learning methods to (1) define a new measure of pain volatility and (2) predict future pain volatility levels from users of the pain management app, Manage My Pain, based on demographic, clinical, and app use features. Methods Pain volatility was defined as the mean of absolute changes between 2 consecutive self-reported pain severity scores within the observation periods. The k-means clustering algorithm was applied to users’ pain volatility scores at the first and sixth month of app use to establish a threshold discriminating low from high volatility classes. Subsequently, we extracted 130 demographic, clinical, and app usage features from the first month of app use to predict these 2 volatility classes at the sixth month of app use. Prediction models were developed using 4 methods: (1) logistic regression with ridge estimators; (2) logistic regression with Least Absolute Shrinkage and Selection Operator; (3) Random Forests; and (4) Support Vector Machines. Overall prediction accuracy and accuracy for both classes were calculated to compare the performance of the prediction models. Training and testing were conducted using 5-fold cross validation. A class imbalance issue was addressed using a random subsampling of the training dataset. Users with at least five pain records in both the predictor and outcome periods (N=782 users) are included in the analysis. Results k-means clustering algorithm was applied to pain volatility scores to establish a threshold of 1.6 to differentiate between low and high volatility classes. After validating the threshold using random subsamples, 2 classes were created: low volatility (n=611) and high volatility (n=171). In this class-imbalanced dataset, all 4 prediction models achieved 78.1% (611/782) to 79.0% (618/782) in overall accuracy. However, all models have a prediction accuracy of less than 18.7% (32/171) for the high volatility class. After addressing the class imbalance issue using random subsampling, results improved across all models for the high volatility class to greater than 59.6% (102/171). The prediction model based on Random Forests performs the best as it consistently achieves approximately 70% accuracy for both classes across 3 random subsamples. Conclusions We propose a novel method for measuring pain volatility. Cluster analysis was applied to divide users into subsets of low and high volatility classes. These classes were then predicted at the sixth month of app use with an acceptable degree of accuracy using machine learning methods based on the features extracted from demographic, clinical, and app use information from the first month.

[1]  K. Davis,et al.  Multivariate machine learning distinguishes cross-network dynamic functional connectivity patterns in state and trait neuropathic pain , 2018, Pain.

[2]  K. Davis,et al.  Abnormal Low-Frequency Oscillations Reflect Trait-Like Pain Ratings in Chronic Pain Patients Revealed through a Machine Learning Approach , 2018, The Journal of Neuroscience.

[3]  Quazi Abidur Rahman,et al.  Predicting users’ future pain experience based on the engagement with manage my pain, an mHealth app , 2018 .

[4]  F. Cosío Atrial Flutter, Typical and Atypical: A Review. , 2017, Arrhythmia & electrophysiology review.

[5]  P. Goffaux,et al.  Unpredictable pain timings lead to greater pain when people are highly intolerant of uncertainty , 2017, Scandinavian journal of pain.

[6]  W. Ling,et al.  Volatility and change in chronic pain severity predict outcomes of treatment for prescription opioid addiction , 2017, Addiction.

[7]  Quazi Abidur Rahman,et al.  Patterns of User Engagement With the Mobile App, Manage My Pain: Results of a Data Mining Investigation , 2017, JMIR mHealth and uHealth.

[8]  Hyuk-Jae Chang,et al.  Use of Machine Learning Classifiers and Sensor Data to Detect Neurological Deficit in Stroke Patients , 2017, Journal of medical Internet research.

[9]  Joon Lee,et al.  Patient-Specific Predictive Modeling Using Random Forests: An Observational Study for the Critically Ill , 2017, JMIR medical informatics.

[10]  M. Choinière,et al.  Predicting treatment outcomes of pain patients attending tertiary multidisciplinary pain treatment centers: A pain trajectory approach , 2017, Canadian journal of pain = Revue canadienne de la douleur.

[11]  R. Califf,et al.  Real-World Evidence - What Is It and What Can It Tell Us? , 2016, The New England journal of medicine.

[12]  N. Rickard,et al.  Development of a Mobile Phone App to Support Self-Monitoring of Emotional Well-Being: A Mental Health Digital Innovation , 2016, JMIR mental health.

[13]  Elroy J. Aguiar,et al.  eHealth technologies to support nutrition and physical activity behaviors in diabetes self-management , 2016, Diabetes, metabolic syndrome and obesity : targets and therapy.

[14]  Barbara Rubino,et al.  Assessing the Use of Mobile Health Technology by Patients: An Observational Study in Primary Care Clinics , 2016, JMIR mHealth and uHealth.

[15]  Jennifer N Stinson,et al.  Construct validity and reliability of a real-time multidimensional smartphone app to assess pain in children and adolescents with cancer , 2015, Pain.

[16]  P. Ritvo,et al.  Health Coaching Reduces HbA1c in Type 2 Diabetic Patients From a Lower-Socioeconomic Status Community: A Randomized Controlled Trial , 2015, Journal of medical Internet research.

[17]  W. Ling,et al.  Pain volatility and prescription opioid addiction treatment outcomes in patients with chronic pain. , 2015, Experimental and clinical psychopharmacology.

[18]  Hagit Shatkay,et al.  Utilizing ECG-Based Heartbeat Classification for Hypertrophic Cardiomyopathy Identification , 2015, IEEE Transactions on NanoBioscience.

[19]  Gert R. G. Lanckriet,et al.  A random forest classifier for the prediction of energy expenditure and type of physical activity from wrist and hip accelerometers , 2014, Physiological measurement.

[20]  Saul Greenberg,et al.  Variability in infant acute pain responding meaningfully obscured by averaging pain responses , 2013, PAIN®.

[21]  Trevor Hastie,et al.  Regularization Paths for Generalized Linear Models via Coordinate Descent. , 2010, Journal of statistical software.

[22]  Andreas Christmann,et al.  Support vector machines , 2008, Data Mining and Knowledge Discovery Handbook.

[23]  R. Portenoy Development and testing of a neuropathic pain screening questionnaire: ID Pain , 2006, Current medical research and opinion.

[24]  Leo Breiman,et al.  Random Forests , 2001, Machine Learning.

[25]  Corinna Cortes,et al.  Support-Vector Networks , 1995, Machine Learning.

[26]  A. M. Harvey Classification of Chronic Pain—Descriptions of Chronic Pain Syndromes and Definitions of Pain Terms , 1995 .

[27]  H. Merskey,et al.  Classification of chronic pain. Descriptions of chronic pain syndromes and definitions of pain terms. Prepared by the International Association for the Study of Pain, Subcommittee on Taxonomy. , 1994, Pain. Supplement.

[28]  S. Cessie,et al.  Ridge Estimators in Logistic Regression , 1992 .

[29]  Peter J. Rousseeuw,et al.  Finding Groups in Data: An Introduction to Cluster Analysis , 1990 .

[30]  Christina Cheng,et al.  Evaluating mobile phone applications for health behaviour change: A systematic review , 2018, Journal of telemedicine and telecare.

[31]  Jon O Ebbert,et al.  Why patients visit their doctors: assessing the most prevalent conditions in a defined American population. , 2013, Mayo Clinic proceedings.

[32]  R. Tibshirani Regression Shrinkage and Selection via the Lasso , 1996 .