Real-World Classification of Pain States in Multiple Sclerosis Patients using Wearable Sensor Data and Ensemble Machine Learning
Related Experiment Video
Updated: Oct 31, 2026

Multi-Modal Signals for Analyzing Pain Responses to Thermal and Electrical Stimuli
Published on: April 5, 2019
Serena Moscato1,2, Silvia Orlandi1,3, Stefania Pozzi4
1Department of Electrical, Electronic, and Information Engineering "Guglielmo Marconi" - DEI, University of Bologna, Bologna, Italy.
Introduction:
Pain assessment remains challenging due to its subjective nature and reliance on self-reports. These challenges are particularly relevant for multiple sclerosis (MS) patients, for whom pain is among the most common and fluctuating symptoms, occurring in multiple forms. Wearable sensors combined with machine learning (ML) offer the potential for continuous and more objective pain monitoring by leveraging physiological signals in real-world contexts.
Methods:
We monitored 18 MS patients over 48 h using the Empatica E4 wristband to collect photoplethysmography, electrodermal activity, skin temperature, and accelerometer data. Physiological features were extracted from 5-, 10-, and 15-min time windows preceding hourly self-reported pain assessment during waking hours. Univariate associations with pain states were evaluated using linear mixed effects models, correcting for multiple comparisons. For classification purposes, feature selection was performed via recursive feature elimination, and 5 ML algorithms were trained and tested with leave-one-subject-out cross-validation. Model performance was evaluated using the F1 score and the sensitivity-specificity balance.
Results:
For univariate analysis, after correction, only 2 out of 43 features showed significant differences between pain and no-pain states. For the classification task, models based on 5-min windows generally performed the best. The highest F1 score (0.78) was achieved by a Support Vector Machine using 2 features from 5-min windows, while XGBoost achieved the best sensitivity-specificity balance (0.69/0.68) with 2 features from 15-min windows.
Conclusion:
Wearable physiological signals may contain information relevant to pain-state classification in people with MS. However, these results should be considered preliminary, requiring validation in larger, independent cohorts to establish the robustness and generalizability of the proposed approach.