data science in #mhealth
TRANSCRIPT
![Page 1: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/1.jpg)
Data Science in #mHealth
@neal_lathia@Cambridge_Uni@emotionsense
![Page 2: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/2.jpg)
Many data science applications deal with some kind of behaviour.
![Page 3: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/3.jpg)
Data science: making sense from & putting big data sets of small behaviours to use.(e.g., ratings � #recsys)
![Page 4: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/4.jpg)
Many health settings relate to one or more of our behaviours.
![Page 5: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/5.jpg)
Improving health: changing our small, momentary, cumulative behaviours.(e.g., one cigarette � smoking cessation)
![Page 6: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/6.jpg)
How can we capture our small, momentary, cumulative behaviours?
![Page 7: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/7.jpg)
AccelerometerMicrophoneCameraGPSCompassGyroscopeWi-FiBluetoothProximityNFCLight
![Page 8: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/8.jpg)
![Page 9: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/9.jpg)
![Page 10: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/10.jpg)
![Page 11: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/11.jpg)
For the user, Emotion Sense is about psychological wellbeing, ref lection, momentary assessment, and contextual feedback.
![Page 12: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/12.jpg)
What can we learn from the data?This talk: unsupervised Learning + viz, R + python
![Page 13: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/13.jpg)
angry anxious lonely
relaxedenthusiasticcalm
@EmotionSense has multiple assessments for mood and life satisfaction
![Page 14: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/14.jpg)
AccelerometerMicrophoneLocationWi-FiCall LogsSMS Logs
* all anonymised, pre-processed
![Page 15: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/15.jpg)
Happiness Metric:Many moments of positive feelings, high satisfaction with life
![Page 16: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/16.jpg)
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)?
![Page 17: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/17.jpg)
![Page 18: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/18.jpg)
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
![Page 19: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/19.jpg)
from sklearn.cluster import KMeans
c = KMeans(init='k-means++', n_clusters=4)
c.fit(data)
result = method.labels_
![Page 20: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/20.jpg)
plot(X, Y, col=grey(.5), type="l", axes=F, xlab="Time of Day", ylab=ylab, main=title, ylim=c(0,1))
axis(1, labels=seq(from=0,to=24,by=1), at=seq(from=0,to=24,by=1))
axis(2)
box()
grid()
f <- rep(1/4, 4)
y_lag <- filter(Y, f, sides=2)
lines(X, y_lag, col="red", lwd=2)
![Page 21: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/21.jpg)
Week day, k = 2
Visualising CentroidsExample (Non-f inal) Result
Week end, k = 2
![Page 22: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/22.jpg)
Visualising by heat mapExample (Non-f inal) Result
Week day
Week end
![Page 23: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/23.jpg)
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')
![Page 24: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/24.jpg)
![Page 25: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/25.jpg)
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?
![Page 26: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/26.jpg)
Conclusions
![Page 27: Data Science in #mHealth](https://reader036.vdocument.in/reader036/viewer/2022081401/559f59861a28abb15d8b45d4/html5/thumbnails/27.jpg)
Data Science in #mHealth
@neal_lathia@Cambridge_Uni@emotionsense