Slide 1

Slide 1 text

Data Science in #mHealth @neal_lathia @Cambridge_Uni @emotionsense

Slide 2

Slide 2 text

Many data science applications deal with some kind of behaviour.

Slide 3

Slide 3 text

Data science: making sense from & putting big data sets of small behaviours to use. (e.g., ratings #recsys)

Slide 4

Slide 4 text

Many health settings relate to one or more of our behaviours.

Slide 5

Slide 5 text

Improving health: changing our small, momentary, cumulative behaviours. (e.g., one cigarette smoking cessation)

Slide 6

Slide 6 text

How can we capture our small, momentary, cumulative behaviours?

Slide 7

Slide 7 text

Accelerometer Microphone Camera GPS Compass Gyroscope Wi-Fi Bluetooth Proximity NFC Light

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

For the user, Emotion Sense is about psychological wellbeing, ref l ection, momentary assessment, and contextual feedback.

Slide 12

Slide 12 text

What can we learn from the data? This talk: unsupervised Learning + viz, R + python

Slide 13

Slide 13 text

angry anxious lonely relaxed enthusiastic calm @EmotionSense has multiple assessments for mood and life satisfaction

Slide 14

Slide 14 text

Accelerometer Microphone Location Wi-Fi Call Logs SMS Logs * all anonymised, pre- processed

Slide 15

Slide 15 text

Happiness Metric: Many moments of positive feelings, high satisfaction with life

Slide 16

Slide 16 text

Accelerometer Data ● 109,054,559 samples collected in f i rst 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)?

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

from sklearn.cluster import KMeans c = KMeans(init='k-means++', n_clusters=4) c.fit(data) result = method.labels_

Slide 20

Slide 20 text

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)

Slide 21

Slide 21 text

Week day, k = 2 Visualising Centroids Example (Non-f i nal) Result Week end, k = 2

Slide 22

Slide 22 text

Visualising by heat map Example (Non-f i nal) Result Week day Week end

Slide 23

Slide 23 text

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')

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

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?

Slide 26

Slide 26 text

Conclusions

Slide 27

Slide 27 text

Data Science in #mHealth @neal_lathia @Cambridge_Uni @emotionsense