This document discusses using data science and machine learning techniques to analyze mobile health sensor data in order to better understand user behaviors and improve health outcomes. It describes how sensors in mobile devices can capture small, momentary behaviors and behaviors can be clustered and visualized using techniques like k-means clustering. Accelerometer data from the Emotion Sense app is analyzed as a case study, with results showing differences in activity patterns between weekdays and weekends. The document concludes that mobile sensors allow unprecedented observation of behaviors that could enable just-in-time interventions to change behaviors.
16. Accelerometer Data
● 109,054,559 samples collected in f irst 12(ish)
months of public deployment from 14,810 users
● What 'emergent' behaviours exist in this data?
How does it characterise the users?
● How do these behaviours relate to external data
we have collected from the same users (i.e.,
mood)?
17.
18. Accelerometer Samples Matrix
● Extract features from accelerometer samples
● Each sample has 3 axes (x, y, z)
● Each axis is a time series of data
● Various features can be extracted:
– Statistical
– Temporal
– Signal
19. from sklearn.cluster import KMeans
c = KMeans(init='k-means++', n_clusters=4)
c.fit(data)
result = method.labels_
23. Visualising by heat map (python)
plt.figure()
fig, ax = plt.subplots()
ax.set_xticks(np.arange(data.shape[1])+0.5, minor=False)
ax.set_xticklabels([i for i in xrange(0, 24)], minor=False)
ax.xaxis.set_tick_params(width=0)
ax.xaxis.tick_bottom()
ax.set_yticks([])
ax.set_yticklabels([])
plt.xlabel('Time of Day')
plt.title(p_title)
plt.grid(False)
ax.pcolormesh(data, cmap=plt.cm.hot)
savefig(filename+'.pdf')
24.
25. Conclusions
● Tools
– Android, R, Python (multiprocessing), MongoDB
– https://github.com/nlathia/research-util
– https://github.com/xsenselabs
● What's haven't I talked about?
– Supervised learning (“what are you doing now?”)
– Other sensors
● Next Gen:
– Levels of behaviour that were never possible to
observe before; scale without wearables
– Potential to catch people “in the moment”
– Time to redesign behavioural interventions?