1. Abstract
POLITECNICO DI TORINO
MSc in Electronic Engineering (Microelectronics)
Master Degree Thesis
Analysis of Wearable Sensor Data for Monitoring
Rehabilitation Outcomes
Supervisor: Candidate:
Prof. Danilo Demarchi Giovanni Mascia
Wearable technology is a fast growing field, that have conquered a big share of the
market in the last few years. The rising interest in wearable devices has been driven
by the advances in micro sensors such as accelerometers and gyroscopes, as well
as by the intensive research in algorithms to exploit and manipulate the gathered
information. Nowadays, wearable sensors can be found in a broad range of fields,
from sports (e.g. in soccer many teams wear small devices to monitor everything
from speed, distance and hearth rate of each player) to health monitoring, including
cardiac monitoring, count breaths per minute and numbers of sleeping hours, just
to mention a few.
Stroke Longitudinal (SL) and Traumatic Brain Injury (TBI) survivors are af-
fected by severe impairments and functional limitations. In order to restore some
of their functional abilities, they integrate clinical treatments with rehabilitation
interventions. As traditional rehab have been only partially successful in achieving
motor recovery, other approaches such as intensive upper limb exercise, functional
electric simulation, robotic therapy, virtual reality and constrained induced move-
ment therapy have been recently investigated. Unfortunately, clinical outcomes from
standardized tests (i.e. Wolf Motor Function Test and Activity Daily Living Test)
using the FAS (Functional Ability Scale) are still unsatisfactory in a large percentage
of patients over time. Among all the possible reasons, it is believed that it might be
related to the way outcomes are measured.
2. Traditional measurements of rehabilitation outcomes require one (or more) clin-
icians to record and score quality of movements by visual inspection. At the Motion
Analysis Lab (Spaulding Rehabilitation Hospital, Dept. of Physical Medicine and
Rehabilitation, Harvard Medical School, USA), our goal was to try to predict such
clinical scores by using five wearable sensors (SHIMMER platform by ShimmerSens-
ing, Ireland) worn by patients (chest, upper arms, wrists) during each rehab session.
During my permanence in the US, besides that I developed a mock-up of an
iOS app for two commercial sensor for the training of patients with low-back pain
and I developed an algorithm to count steps from data coming from an accelerom-
eter worn by amputees. Given that, I mainly focused on the analysis of SL and
TBL accelerometer data, developing all the software to achieve that goal. For such
a purpose twenty-one subjects for SL and seventeen subjects for TBL had been
enrolled.
In particular, starting from the raw data, I preprocessed and segmented it in
trials relying on digital markers placed by means of a LabVIEWTM
program during
data collection. After that, I extracted up to 517 features (Rn
=⇒ R operation, with
n number of datapoints in trial), with the intent of capturing important informations
about signals.
(a) GUI to compare trials and investigate fea-
tures.
1
st
Principal Component
2nd
PrincipalComponent
Clinical Score 1
Clinical Score 2
Clinical Score 3
Clinical Score 4
Clinical Score 5
(b) Scatter plot of the first two PCA compo-
nents for SL, WMFT, task 5.
Figure 1
Features were chosen bearing in mind the scoring criteria adopted by clinician,
including smoothness, coordination, effort, duration etc. In order to ease that task,
I developed a Matlab®
GUI to investigate the presence of features that well sep-
arated trials according to their clinical score (Figure 1a). The effective separation
between classes was checked by scatter plotting the first two components of the
Principal Component Analysis (PCA), as shown in the example in Figure 1b. Due
to the pretty large number of features, there was the risk of having meaningless
3. or linearly dependent features that degraded the classification performance: feature
selection was adopted to prevent that. Finally, selected features were provided in
input to the Random Forests algorithm, consisting in weakly correlated trees created
by bagging (random sampling with replacement) the training set, which correct the
habit of single trees of overfitting the training data.
The whole algorithm performance was investigated by running a 10-Fold Cross-
Validation (10 iterations, taking each time 90% of the data at random as training
set and the remaining 10% as testing set) evaluating both the RMSE (Root-Mean-
Square Error) and the classification error.
For some tasks of the WMFT we got interesting results, both in terms of RMSE
and classification error. For instance, Figure 2 shows the box plot, the confusion
matrix and the classification error for stroke longitudinal, WMFT, task 5 (lift can).
In such a task, the total RMSE was equal to RMSE = 0.31 and the total classifica-
tion error 7.25%. Even though there are a few misclassifications, the distance from
the expected value is always limited (∼ 0.3) as it can be verified looking at Figure
2a. As yet, given the short period of time at my disposal, I managed to get similar
results for three out of eight tasks of the WMFT. Further analysis are necessary to
improve classification performances of such tasks. In the possible scenario of getting
similar results for all the tasks, such methods could be easily inserted in the clinical
or home setting, either as an integrative tool or as a stand-alone grading method.
In the last case it would be necessary to increase the dimension of the training set
and possibly test it with a Leave-One-Subject-Out Cross-Validation, if the goal is to
assess new patients’ trials relying on data of other subjects.
1
2
3
4
5
1 2 3 4 5
Actual Clinical Score
PredictedClinicalScore
(a) Box plot
Actual
1
2
3
4
5
Predicted
1 2 3 4 5
5 1 0 0 0
0 5 0 0 0
0 1 23 1 0
0 0 1 20 0
0 0 0 1 11
(b) Confusion matrix.
1 2 3 4 5
0
5
10
15
16.67 %
0.00 %
8.00 %
4.76 %
8.33 %
Clinical Score
ClassificationError[%]
(c) Classification error.
Figure 2: Prediction results for Stroke Longitudinal, WMFT, task 5.