POI recommender systems for location-based social network services, such as Foursquare or Yelp, have gained tremendous popularity in the past few years. Much work has been dedicated into improving recommendation services in such systems by integrating different features that are assumed to have an impact on people's preferences for POIs, such as time and geolocation. Yet, little attention has been paid to the impact of weather on the users' final decision to visit a recommended POI. In this paper we contribute to this area of research by presenting the first results of a study that aims to recommend POIs based on weather data. To this end, we extend the state-of-the-art Rank-GeoFM POI recommender algorithm with additional weather-related features, such as temperature, cloud cover, humidity and precipitation intensity. We show that using weather data not only significantly increases the recommendation accuracy in comparison to the original algorithm, but also outperforms its time-based variant. Furthermore, we present the magnitude of impact of each feature on the recommendation quality, showing the need to study the weather context in more detail in the light of POI recommendation systems.
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Understanding the Impact of Weather for POI Recommendations
1. S C I E N C E P A S S I O N T E C H N O L O G Y
http://know-center.tugraz.at/
Understanding the Impact of Weather for
POI Recommendations
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Le-
andro Marinho, Know-Center@Graz University of Technology
September 15, 2016
2. 2
Understanding the Impact of Weather for POI Recommendations,
Content
1. Motivation
2. Dataset
3. Empirical Analysis
4. Weather Aware POI Recommender (WPOI)
5. Conclusions & Future Work
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
3. 3
Motivation
Motivation
Geolocation services on portable devices
Location-based social networks (LBSN)
Yelp
Foursquare
Vast amount of check-in data
Comments on places
Recommendations on places
Ratings on places
Use data to assist users
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
4. 4
Motivation
Context aware recommender systems (CARS)
concentrated on
Social context
Geographical context
Time context
No research on the impact of weather
Pool not popular at rainy conditions
Ice cream shop not popular at cold temperatures
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
5. 5
Motivation
Problem Statement
Definition
Given a user u, the user’s check-in history Lu
, i.e., the
POIs that the user has visited in the past, and the current
weather context c the aim is to predict the POIs
ˆLu
= {l1, . . . , l|L|} that the user will likely visit in the future
that are not in Lu
.
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
6. 6
Motivation
Research Questions
RQ1 Are the users’ mobility patterns influenced by
weather?
RQ2 How can weather context information be
incorporated into existent recommender systems?
RQ3 To what extent can weather information be used
to increase recommender accuracy?
RQ4 Which weather feature provides the highest
impact on the recommender accuracy?
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
7. 7
Dataset
Dataset
Foursquare Check-in Dataset from Dingqi Yang [3][4]
Worldwide check-ins from April 2012 to September
2013
Filtered by U.S. cities
∼3,000,000 Check-ins
∼500,000 Venues
∼50,000 Users
60 Cities
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
8. 8
Dataset
Dataset
Weather Data from forecast.io weather API [1]
One API call per <venue, city, time> triple
∼27,000 API calls
Eight weather attributes
Visibility, Precipitation intensity, Humidity, Cloud cover,
Pressure, Windspeed, Temperature, Moonphase
Outdated category information needed recrawling
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
10. 10
Empirical Analysis
Weather Distributions
Temperature
30 20 10 0 10 20 30 40 50
Temperature
0.000
0.005
0.010
0.015
0.020
0.025
0.030
0.035
0.040
0.045
Checkin probability
σ = 9.36 µ = 16.69 Data
Normal distributed
Moonphase
0.0 0.2 0.4 0.6 0.8 1.0
Moonphase
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
Checkin probability
σ = 0.29 µ = 0.53 Data
Uniform distributed
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
11. 11
Empirical Analysis
Correlation between weather features
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
12. 12
Empirical Analysis
Impact on Travel Distance
Cloud Cover
100
101
102
Distance(log(KM))
106
105
104
103
102
101
Probability (log)
Low Cloud cover
High Cloud cover
Pressure
100
101
102
Distance(log(KM))
106
105
104
103
102
101
Probability (log)
Low Pressure
High Pressure
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
13. 13
Empirical Analysis
Impact on Category Popularity
Ice Cream Shop
30 20 10 0 10 20 30 40 50
Temperature
0.02
0.01
0.00
0.01
0.02
0.03
0.04
0.05
0.06
0.07
Checkin probability
Ski Area
20 10 0 10 20 30 40
Temperature
0.02
0.00
0.02
0.04
0.06
0.08
0.10
0.12
Checkin probability
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
14. 14
Empirical Analysis
User Mobility Patterns
Mobility pattern of a
“frosty” user
20 10 0 10 20 30 40
Temperature
0.02
0.00
0.02
0.04
0.06
0.08
0.10
Checkin probability
Mobility pattern of a
“heated” user
20 10 0 10 20 30 40
Temperature
0.02
0.00
0.02
0.04
0.06
0.08
0.10
Checkin probability
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
15. 15
Empirical Analysis
Seasonal Impact on Categories
All Categories
National ParkSki Area
Austrian Restaurant
Hawaiian RestaurantHotel Pool
Zoo
Ice Cream Shop
Baseball Stadium
Mexican Restaurant
Gym
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7Checkin probability Winter
Spring
Summer
Autumn
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
16. 16
Empirical Analysis
Regional Weather Variability
Honolulu
Oakland
Phoenix
San Diego
Miami
Los Angeles
San Jose
Tampa
El Paso
Seattle
Portland
Memphis
New Orleans
Sacramento
Nashville
San Antonio
Dallas
Charlotte
Atlanta
Jacksonville
Raleigh
Tallahassee
Houston
Kansas City
St. Louis
Denver
Richmond
Norfolk
Baltimore
Austin
Washington D.C.
Indianapolis
Pittsburgh
Salt Lake City
Cleveland
Rochester
Chicago
Oklahoma City
Cincinnati
Detroit
Buffalo
Philadelphia
Columbus
Columbia
Milwaukee
Chester
New York
Lansing
Boston
Harrisburg
Saint Paul
Hartford
Des Moines
Providence
Newark
Trenton
Minneapolis
Brooklyn
Madison
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9Standard deviation
Total variability normed over all weather features
South cities
North cities
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
17. 17
Weather Aware POI Recommender (WPOI)
Weather Aware POI Recommender (WPOI)
Many basic recommender algorithms available
Most Popular (MP)
KNN-Algorithms (User, Item)
Matrix Factorization (MF)
Enrich existing recommender system with weather
context
Test recommender accuracy in four cities
representing variety of climate (cardinal directions)
Minneapolis
Boston
Miami
Honolulu
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
18. 18
Weather Aware POI Recommender (WPOI)
Rank-GeoFM by Li et al. (2015) [2]
Based on MF
Context aware (Geo and Time)
Easy to extend
High accuracy
Based on iterative learning of latent model
parameters (weights)
Learns model parameters with stochastic gradient
descent (SGD)
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
19. 19
Weather Aware POI Recommender (WPOI)
yult = u(1)
u · l(1)
l
user preference score
+ t(1)
t · l(2)
l
time preference score
+
+ u(2)
u ·
l∗∈Nk (l)
wll∗ l(1)
l∗
geographical influence score
+ l(3)
l ·
t∗∈T
mtt∗ t(1)
t∗
temporal influence score
U(1,2)
, L(1,...,3)
, T(1)
→ latent model parameters to learn
wll is the probability that l is visited given that l∗ has
been visited in terms of geographical position and mtt
is the probability that the popularity of a POI in time
slot t is influenced by those in time slot t∗.
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
20. 20
Weather Aware POI Recommender (WPOI)
Replace time with weather feature
Start algorithm for each weather feature separately
Measure accuracy and compare with RankGeoFM
and base algorithms
yulc = u(1)
u · l(1)
l
user preference score
+ f(1)
c · l(2)
l
weather preference score
+
+ u(2)
u ·
l∗∈Nk (l)
wll∗ l(1)
l∗
geographical influence score
+ l(3)
l ·
c∗∈FC
wicc∗ f(1)
c∗
weather influence score
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
21. 21
Weather Aware POI Recommender (WPOI)
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
22. 22
Weather Aware POI Recommender (WPOI)
Algorithm 1: WPOI
Input: check-in data D, hyperparameters that steer context influence and learning rate
1 Init: Initialize Θ with N (0, 0.01); Shuffle D
2 repeat
3 for (u, l, c) ∈ D do
4 Compute yulc and n = 0
5 repeat
6 Sample a POI l and feature class c , Compute yul c and set n++
7 until (u,l’,c’) ranked inccorrectly || everything ranked correct
8 if (u,l’,c’) ranked inccorrectly then
9 update latent model parameters Θ
10 according to the gradient of the error function.
11 end
12 end
13 until convergence
14 return Θ = {L(1)
, L(2)
, L(3)
, U(1)
, U(2)
, F(1)
}
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
25. 25
Conclusions & Future Work
Conclusions
Empirical Analysis
Weather features have little impact on travel distance
Seasonality has an impact on category popularity
Category popularity is dependent on the region
Higher weather variability in the north
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
26. 26
Conclusions & Future Work
WPOI
Weather context more useful than time
WPOI better in regions closer to tropical zone
Precipitation intensity and visibility improve accuracy
best
Weather context is indeed a useful contextual
information in POI recommender systems
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
27. 27
Conclusions & Future Work
Future Work
Only one weather feature at a time
Incorporate travel distance probabilities under
different weather conditions
Incorporate user sensitivity to weather conditions
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
28. 28
Conclusions & Future Work
Questions?
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
29. 29
Conclusions & Future Work
References I
[1] FORECAST.IO.
forecast.io weather api, 2015.
[2] LI, X., CONG, G., LI, X.-L., PHAM, T.-A. N., AND KRISHNASWAMY, S.
Rank-geofm: A ranking based geographical factorization method for point of
interest recommendation.
In Proceedings of the 38th International ACM SIGIR Conference on
Research and Development in Information Retrieval (New York, NY, USA,
2015), SIGIR ’15, ACM, pp. 433–442.
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
30. 30
Conclusions & Future Work
References II
[3] YANG, D., ZHANG, D., CHEN, L., AND QU, B.
Nationtelescope: Monitoring and visualizing large-scale collective behavior
in lbsns.
Journal of Network and Computer Applications 55 (2015), 170–180.
[4] YANG, D., ZHANG, D., AND QU, B.
Participatory cultural mapping based on collective behavior in location
based social networks.
ACM Transactions on Intelligent Systems and Technology (2015).
in press.
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
31. 31
Conclusions & Future Work
Weather feature Properties Range in dataset
Precipitation intensity Precipitation inten-
sity measured in
milimeters of liquid
water/hour.
0mm/h − 34, 29mm/h
Temperature Temperature mea-
sured in degree
Celsius
−24, 48◦
− 46, 58◦
Wind speed Wind speed
measured in me-
ters/second
0m/s − 19, 13m/s
Cloud cover Value between 0 and
1 displaying the per-
centage of the sky
covered by clouds.
0 − 1
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
32. 32
Conclusions & Future Work
Humidity Value between 0 and 1
representing the “Per-
centage relative humidity”
is defined as the partial
pressure of water vapor in
air divided by the vapor
pressure of water at the
given temperature.”
0, 02φ − 1, 00φ
Pressure Atmospheric pressure
measured in hectopas-
cals.
957, 11hPa − 1046, 05hPa
Visibility Value representing the av-
erage visibility in kilome-
ters capped at 16,09
0km − 16, 09km
Moonphase Value from 0 to 1 rep-
resenting the range be-
tween new moon and full
moon
0 − 1
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
33. 33
Conclusions & Future Work
Correlations
Humidity Temperature -0.99 Relative humidity repre-
sents the saturation of
moisture in the air and
cold air does not need that
much moisture to be satu-
rated.
Windspeed Temperature 0.93 Foehn-effect, Windchill
factor not included
Humidity Windspeed -0.93 See positive correlation
between windspeed and
temperature and nega-
tive between humidity and
temperature.
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
34. 34
Conclusions & Future Work
Correlations
Temperature Visibility 0.77 At colder temperatures
saturation is reached ear-
lier and therefore fog oc-
curs more often that blurs
visibility.
Humidity Visibility -0.77 High humidity blurs visibil-
ity
Cloud cover Visibility -0.67 Clouds cover the sun →
visibility is low
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
35. 35
Conclusions & Future Work
0
20
40
60
80
100
120
140
Category
0.51
0.52
0.53
0.54
0.55
0.56Moonphase
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
36. 36
Conclusions & Future Work
Algorithm 2: WPOI
Input: check-in data D, geographical influence matrix W, weather influence matrix WI, hyperparameters
, C, α, β and learning rate γg and γw
Output: parameters of the model Θ = {L(1)
, L(2)
, L(3)
, U(1)
, U(2)
, F(1)
}
1 init: Initialize Θ with N (0, 0.01); Shuffle D
2 repeat
3 for (u, l, c) ∈ D do
4 Compute yulc and n = 0
5 repeat
6 Sample a POI l and feature class c , Compute yul c and set n++
7 until I(xulc > xul c )I(yulc < yul c + ) = 1 or n > |L|
8 if I(xulc > xul c )I(yulc < yul c + ) = 1 then
9 η = E |L|
n
δull
10 g = c∗∈FCf
wic c∗ f
(1)
c∗ − c+∈FCf
wicc+ f
(1)
c+
11 f
(1)
c ← f
(1)
c − γw η(l
(2)
l
− l
(2)
l
)
12 l
(3)
l
← l
(3)
l
− γw ηg
13 l
(2)
l
← l
(2)
l
− γw ηfc
14 l
(2)
l
← l
(2)
l
+ γw ηfc
15 end
16 end
17 Project updated factors to accomplish constraints
18 until convergence
19 return Θ = {L(1)
, L(2)
, L(3)
, U(1)
, U(2)
, F(1)
}
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
37. 37
Conclusions & Future Work
Symbol Description
U set of users u1, u2, ..., u|U|
L set of POIs l1, l2, ..., l|L|
FCf set of classes for feature f
F set of weather feature classes f1, f2, ..., f|FCf |
Θ latent model parameters containing the learned weights
{L(1)
, L(2)
, L(3)
, U(1)
, U(2)
, F(1)
} for locations, users and weather
features
Xul |U|x|L| matrix containing the check-ins of users at POIs
Xulc |U|x|L|x|FCf | matrix containing the check-ins of users at POIs at
a specific feature class c
D1 user-POI pairs: (u, l)|xul > 0
D2 user-POI-feature class triples: (u, l, c)|xulc > 0
d(l, l ) geo distance between the latitude and longitude of l and l
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
38. 38
Conclusions & Future Work
W geographical probability matrix of size |L|x|L| where wll
contains the probability of l being visited after l has been
visited according to their geographical distance. wll =
(0.5 + d(l, l ))−
1)
WI probability that a weather feature class c is influenced by
feature class c . wicc = u∈U l∈L xulc xulc
√
u∈U l∈L x2
ulc u∈U l∈L x2
ulc
Nk (l) set of k nearest neighbors of POI l
yul the recommendation score of user u and POI l
yulc the recommendation score of user u, POI l and weather
feature class c
I(·) indicator function returning I(a) = 1 when a is true and 0
otherwise
margin to soften ranking incompatibility
Incomp(yulc, ) a function that counts the number of locations l ∈ L that
should be ranked lower than l at the current weather context
c and user u but are ranked higher by the model.
γw learning rate for updates on weather latent parameters.
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
39. 39
Conclusions & Future Work
γg learning rate for updates on latent parameters from base ap-
proach.
E(·) a function that turns the rating incompatibility Incomp(yulc, )
into a loss. E(r) = r
i=1
1
i
O objective function to minimize during the iterative learning.
O = (u,l,c)∈D2 E(Incomp(yulc, ))
s(a) sigmoid function s(a) = 1
1+exp(−a)
δucll function to approximate the indicator function with a continu-
ous sigmoid function. δucll = s(yul c + − yulc)(1 − s(yul c +
− yulc))
|L|
n
if the nth
location l was ranked incorrect by the model the ex-
pactation is that overall |L|
n
locations are ranked incorrect.
∂E
∂Θ
calculation of stochastic gradient =
E |L|
n
δucll
∂(yucl
+ −yucl )
∂Θ
Θ ← Θ − ∂E
∂Θ
SGD based optimization of the latent model parameters
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
40. 40
Conclusions & Future Work
Dataset Statistics
City #Users #Venues #Check-ins Sparsity
Minneapolis 436 797 37,737 89.1%
Boston 637 1141 42,956 94.3%
Miami 410 796 29,222 91.0%
Honolulu 173 410 16,042 77.4%
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016
41. 41
Conclusions & Future Work
Formulas
SEx =
SD
√
n
(1)
Christoph Trattner, Alex Oberegger, Lukas Eberhard, Denis Parra, Leandro Marinho, Know-Center
September 15, 2016