Can Social Media tell us something about our lives?
Vasileios Lampos
Computer Science Department University of Sheffield March, 2013
- V. Lampos
bill@lampos.net Can Social Media tell us something about our lives? 1/43
1/43
Can Social Media tell us something about our lives? Vasileios - - PowerPoint PPT Presentation
Can Social Media tell us something about our lives? Vasileios Lampos Computer Science Department University of Sheffield March, 2013 1 / 43 V. Lampos bill@lampos.net Can Social Media tell us something about our lives? 1/43 Outline
bill@lampos.net Can Social Media tell us something about our lives? 1/43
1/43
bill@lampos.net Can Social Media tell us something about our lives? 2/43
2/43
(Debatin et al., 2009)
bill@lampos.net Can Social Media tell us something about our lives? 3/43
3/43
bill@lampos.net Can Social Media tell us something about our lives? 4/43
4/43
bill@lampos.net Can Social Media tell us something about our lives? 5/43
5/43
Figure 1 : Some biased and anonymised examples of tweets (limit of 140 characters/tweet, # denotes a topic)
(a) (user will remain anonymous) (b) they live around us (c) citizen journalism (d) flu attitude
bill@lampos.net Can Social Media tell us something about our lives? 6/43
6/43
processing, new technologies (e.g., Map-Reduce) (Preotiuc et al., 2012)
bill@lampos.net Can Social Media tell us something about our lives? 7/43
7/43
bill@lampos.net Can Social Media tell us something about our lives? 8/43
8/43
) (
) (u
M
) (u
) (u
S
State of the World
Figure 2 : Nowcasting the magnitude of an event (ε) emerging in the real world from Web information
bill@lampos.net Can Social Media tell us something about our lives? 9/43
9/43
5 10 15 20 25 30 2 4 6 8 10 12 14 16
Days Rainfall rate (mm) − Bristol Actual Inferred
Figure 3 : Inferred rainfall rates for Bristol, UK (October, 2009)
bill@lampos.net Can Social Media tell us something about our lives? 10/43
10/43
|P(u)|
bill@lampos.net Can Social Media tell us something about our lives? 11/43
11/43
T
bill@lampos.net Can Social Media tell us something about our lives? 12/43
12/43
w
ℓ2
w w w
ℓ2 + λw
(Tibshirani, 1996)
(Efron et al., 2004)
bill@lampos.net Can Social Media tell us something about our lives? 13/43
13/43
(Zhao and Yu, 2006)
(Bach, 2008)
bill@lampos.net Can Social Media tell us something about our lives? 14/43
14/43
bill@lampos.net Can Social Media tell us something about our lives? 15/43
15/43
(Manning, Raghavan and Schütze, 2008)
L(w w w) ≤ L(ˆ w w w) + Q, with Q ∼ min W 2
1
N + p N , W 2
1
N + W1 √ N
w w w) and ˆ w w wℓ1 ≤ W1
(Bartlett, Mendelson and Neeman, 2011)
bill@lampos.net Can Social Media tell us something about our lives? 16/43
16/43
Figure 4 : Events co-occurring (correlated) with the inference target may affect feature selection, especially when the sample size is small.
180 200 220 240 260 280 300 320 340 50 100 150 200 250 300
Day Number (2009) Event Score
Flu (England & Wales) Hypothetical Event I Hypothetical Event II
(Lampos, 2012a)
bill@lampos.net Can Social Media tell us something about our lives? 17/43
17/43
Table 1 : Top 1-grams correlated with flu rates in England/Wales (06–12/2009)
1-gram Event
latitud Latitude Festival 0.9367 flu Flu epidemic 0.9344 swine
harri Harry Potter Movie 0.9112 slytherin
potter
benicassim Benicàssim Festival 0.8966 graduat Graduation (?) 0.8965 dumbledor Harry Potter Movie 0.8870 hogwart
quarantin Flu epidemic 0.8822 gryffindor Harry Potter Movie 0.8813 ravenclaw
princ
swineflu Flu epidemic 0.8633 ginni Harry Potter Movie 0.8620 weaslei
hermion
draco
(Lampos, 2012a)
bill@lampos.net Can Social Media tell us something about our lives? 18/43
18/43
∗ refer to (Lampos, 2012a)
bill@lampos.net Can Social Media tell us something about our lives? 19/43
19/43
Figure 5 : Font size is proportional to the weight of each feature; flipped n-grams are negatively weighted. All words are stemmed (Porter, 1980).
(Lampos and Cristianini, 2012)
bill@lampos.net Can Social Media tell us something about our lives? 20/43
20/43
Figure 6 : Font size is proportional to the weight of each feature; flipped n-grams are negatively weighted. All words are stemmed (Porter, 1980).
(Lampos and Cristianini, 2012)
bill@lampos.net Can Social Media tell us something about our lives? 21/43
21/43
5 10 15 20 25 30 20 40 60 80 100 120
Days Flu Rate − C.England & Wales Actual Inferred
(a) Central England/Wales (flu)
5 10 15 20 25 30 20 40 60 80 100 120
Days Flu Rate − S.England Actual Inferred
(b) South England (flu)
5 10 15 20 25 30 2 4 6 8 10 12 14 16
Days Rainfall rate (mm) − Bristol Actual Inferred
(c) Bristol (rain)
Figure 7 : Examples of flu and rainfall rates inferences from Twitter content
(Lampos and Cristianini, 2012)
bill@lampos.net Can Social Media tell us something about our lives? 22/43
22/43
Table 2 : RMSE for flu rates inference (5-fold cross validation), 50m tweets, 21/06/2009–19/04/2010 Method 1-grams 2-grams Hybrid Baseline∗ 12.44±2.37 13.81±3.29 11.62±1.58 Bolasso 11.14±2.35 12.64±2.57 10.57±2.2 CART ensemble∗∗ 9.63±5.21 13.13±4.72 9.4±4.21 Table 3 : RMSE (in mm) for rainfall rates inference (6-fold cross validation), 8.5m tweets, 01/07/2009–30/06/2010 Method 1-grams 2-grams Hybrid Baseline∗ 2.91±0.6 3.1±0.57 4.39±2.99 Bolasso 2.73±0.65 2.95±0.55 2.60±0.68 CART ensemble∗∗ 2.71±0.69 2.72±0.72 2.64±0.63
∗ As implemented in (Ginsberg et al., 2009) ∗∗ Classification and Regression Tree (Breiman et al., 1984) & (Sutton, 2005)
bill@lampos.net Can Social Media tell us something about our lives? 23/43
23/43
Figure 8 : Flu Detector uses the content of Twitter to nowcast flu rates in several UK regions
(Lampos, De Bie and Cristianini, 2010)
bill@lampos.net Can Social Media tell us something about our lives? 24/43
24/43
bill@lampos.net Can Social Media tell us something about our lives? 25/43
25/43
Table 4 : Mood terms from WordNet Affect
Fear Sadness Joy Anger afraid depressed admire angry fearful discouraged cheerful despise frighten disheartened enjoy enviously horrible dysphoria enthousiastic harassed panic gloomy exciting irritate ... ... ... ... (92 terms) (115 terms) (224 terms) (146 terms)
n
i
i
d
bill@lampos.net Can Social Media tell us something about our lives? 26/43
26/43
Figure 9 : Daily time series (actual & their 14-point moving average) for the mood of Joy based on Twitter content geo-located in the UK , e d by st is.
ied d ying location s,
Jul 09 Jan 10 Jul 10 Jan 11 Jul 11 Jan 12 −2 2 4 6 8 10 933 Day Time Series for Joy in Twitter Content Date Normalised Emotional Valence
* RIOTS * CUTS * XMAS * XMAS * XMAS * roy.wed. * halloween * halloween * halloween * valentine * valentine * easter * easter
raw joy signal 14−day smoothed joy
(Lansdall, Lampos and Cristianini, 2012a&b)
bill@lampos.net Can Social Media tell us something about our lives? 27/43
27/43
Figure 10 : Daily time series (actual & their 14-point moving average) for the mood of Anger based on Twitter content geo-located in the UK
Jul 09 Jan 10 Jul 10 Jan 11 Jul 11 Jan 12 −4 −3 −2 −1 1 2 3 4 5 933 Day Time Series for Anger in Twitter Content Date Normalised Emotional Valence
* RIOTS * CUTS * XMAS * XMAS * XMAS * roy.wed. * halloween * halloween * halloween * valentine * valentine * easter * easter
raw anger signal 14−day smoothed anger
(Lansdall, Lampos and Cristianini, 2012a&b)
bill@lampos.net Can Social Media tell us something about our lives? 28/43
28/43
i
i+1→i+50
i−50→i−1
Jan 10 Jul 10 Jan 11 Jul 11 Jan 12 −1 −0.5 0.5 1 1.5 Date Difference in mean Anger Fear Date of Budget Cuts Date of Riots
Figure 11 : Change point detection using a 100-day moving window
(Lansdall, Lampos and Cristianini, 2012a)
bill@lampos.net Can Social Media tell us something about our lives? 29/43
29/43
Figure 12 :
Projections of 4-dimensional mood score signals (joy, sadness, anger and fear) on their top-2 principal components (PCA) – Twitter content from 2011
−1.5 −1 −0.5 0.5 1 −0.5 −0.4 −0.3 −0.2 −0.1 0.1 0.2 0.3 0.4 Saturday Sunday Monday Tuesday Wednesday Thursday Friday 1st Principal Component 2nd Principal Component Days of the Week
(a) Days of the week (2011)
−8 −6 −4 −2 2 4 6 8 −2 2 4 6 8 10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 5253 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 8687 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 1st Principal Component 2nd Principal Component Days in 2011
(b) Days of the year (2011) Cluster I New Year (1), Valentine’s (45), Christmas Eve (358), New Year’s Eve (365) Cluster II O.B. Laden’s death (122), Winehouse’s death + Breivik (204), UK riots (221) (Lampos, 2012a)
bill@lampos.net Can Social Media tell us something about our lives? 30/43
30/43
Figure 13 : Mood of the Nation uses the content of Twitter to nowcast mood rates in several UK regions
(Lampos, 2012a)
bill@lampos.net Can Social Media tell us something about our lives? 31/43
31/43
|D|
n
i
i
i
f
(td,u) i
: normalised frequency of a mood term i during time interval u in day d∈D
bill@lampos.net Can Social Media tell us something about our lives? 32/43
32/43
Fear Score
3 6 9 12 15 18 21 24
0.1 Winter Summer 3 6 9 12 15 18 21 24
0.1 Aggregated Data
Sadness Score
3 6 9 12 15 18 21 24
0.1 3 6 9 12 15 18 21 24
0.1
Joy Score
3 6 9 12 15 18 21 24
0.1 3 6 9 12 15 18 21 24
0.1
Hourly Intervals Anger Score
3 6 9 12 15 18 21 24
0.05
Hourly Intervals
3 6 9 12 15 18 21 24
0.05
Figure 14 : Circadian (24-hour) mood patterns based on UK Twitter content
bill@lampos.net Can Social Media tell us something about our lives? 33/43
33/43
Figure 15 : Autocorrelation of circadian mood patterns based on hourly lags revealing daily and weekly periodicities
1 12 24 36 48 60 72 84 96 108 120 132 144 156 168 0.2 0.4
Autocorr.
(a) Fear
1 12 24 36 48 60 72 84 96 108 120 132 144 156 168 0.1 0.2 0.3 0.4
Autocorr.
(b) Sadness
1 12 24 36 48 60 72 84 96 108 120 132 144 156 168 −0.2 0.2 0.4
Autocorr.
(c) Joy
1 12 24 36 48 60 72 84 96 108 120 132 144 156 168 0.1 0.2 0.3
Autocorr.
(d) Anger ... further analysis on those patterns (in collab. with domain experts) under submission
bill@lampos.net Can Social Media tell us something about our lives? 34/43
34/43
bill@lampos.net Can Social Media tell us something about our lives? 35/43
35/43
bill@lampos.net Can Social Media tell us something about our lives? 36/43
36/43
→ model political opinion + financial indicators jointly
bill@lampos.net Can Social Media tell us something about our lives? 37/43
37/43
(plus multi-task learning)
Figure 16 :
50 voting intention polls (YouGov) and their respective inferred values for the Conservative (RMSE: 1.78 1.78 1.78%), Labour (1.59 1.59 1.59%) and Liberal Democrat (1.05 1.05 1.05%) parties (Nov. 2011 to Feb. 2012)
5 10 15 20 25 30 35 40 45 5 10 15 20 25 30 35 40
Voting Intention % Time
CON LAB LIB
(a) Voting intention polls
5 10 15 20 25 30 35 40 45 5 10 15 20 25 30 35 40
Voting Intention % Time
CON LAB LIB
(b) Voting intention inferences
bill@lampos.net Can Social Media tell us something about our lives? 38/43
38/43
bill@lampos.net Can Social Media tell us something about our lives? 39/43
39/43
bill@lampos.net Can Social Media tell us something about our lives? 40/43
40/43
bill@lampos.net Can Social Media tell us something about our lives? 41/43
41/43
http://www.lampos.net/research/presentations-and-posters
bill@lampos.net Can Social Media tell us something about our lives? 42/43
42/43
1.
and Unintended Consequences. Journal of Computer-Mediated Communication 15, pp. 83–108, 2009. 2.
Time Analysis of Social Media Text. Proceedings of ICWSM ’12, pp. 38–42, 2012. 3.
3(4), n. 72, 2012. 4.
B, 58(1), pp. 267–288, 1996. 5.
407–499, 2004. 6. C.D. Manning, P. Raghavan and H. Schütze. Introduction to Information Retrieval. Cambridge University Press,
7. P.L. Bartlett, S. Mendelson and J. Neeman. L1-regularized linear regression: persistence and oracle inequalities. Probability Theory and Related Fields, pp. 1–32, 2011. 8. M.F. Porter. An algorithm for suffix stripping. Program 14(3), pp. 130–137, 1980. 9.
10.
PKDD ’10, pp. 599–602, 2010. 11.
Proceedings of WWW ’12, pp. 1221–1226, 2012.(a) 12.
26–28, 2012.(b) 13.
Learning Methods. PhD Thesis, University of Bristol, p. 243, 2012.(a) 14.
CoRR, 2012.(b)
bill@lampos.net Can Social Media tell us something about our lives? 43/43
43/43