SlideShare a Scribd company logo
Predicting your Next Stop-Over
from Location-Based Social
Network Data with Recurrent Neural
Networks
RecTour workshop 2017
RecSys 2017, Como, Italy
Enrico Palumbo, ISMB, Italy, Turin
Giuseppe Rizzo, ISMB, Italy, Turin
Raphaёl Troncy, EURECOM, France, Sophia Antipolis
Elena Baralis, Politecnico di Torino, Italy, Turin
Location-Based Social Network Data
● Allow users to check-in in a venue
and share information about
their whereabouts
● Venues are categorized
according to consistent
taxonomies
● User profiles allow to group
users according to demographic
information
Next-POI prediction problem
● Predict where a user will go next
depending on past check-ins and
profile
● Modeling sequential
information: where is a user
likely to go after an Art Museum
and a Sushi Restaurant?
● Modeling user profile
information (e.g. Vegetarian
Restaurant and Steakhouse do not
go together)
?
Next-POI category prediction
Frédéric, French
man in his 40’s, is
going to visit Tate
Modern in London
this afternoon
Then, he can be
interested in
Taking a
beer in an
Irish Pub,
first
Then, having
a dinner in an
Italian
Restaurant
And, lately,
attending an
event in a
Jazz Club
path, ie sequence, of categories
of Points of Interest that Frédéric
can be interested to go after
having seen the Tate Modern
gallery
Data Collection and Enrichment
1.5M check-ins from 235.6K Swarmapp users worldwide in a week via Twitter API
Collect venue category, user gender and language with Foursquare API
Data cleansing and path extraction
● At least 10 check-ins: prefiltering, select active users who are likely to
generate paths
● Bot removal: if more than twice two check-ins in a minute, it is a bot
(p~1 on a sample of 50 examples)
● Segmentation: split a stream of checkins for a user (c1
, τ1
), …, (cn
, τn
)
when the temporal interval is more than 8 hours: τi+1
- τi
> 8. ‘Isolated’
check-ins, τi+1
- τi
> 8, τi
- τi-1
> 8, are removed from the data.
● Example: (Art_Museum, 8), (Café, 10), (French_Restaurant, 12),
(Rock_Club, 22), (Cocktail_Bar, 23)
τi+1
- τi
= 10h
Stats
Users Check-ins
Collection 235.6 K 1.5 M
At least 10 check-ins 19.5 K 400 K
Without Bots 12.4 K 184 K
Segmentation 12 K 123 K
29.5K paths, with a max length of 50 and an avg length of 4.2
Path: Cafeteria, Vegetarian Restaurant, Café, Shopping Mall, Smoothie
Shop, Spa, Wine Bar, Opera House, EOP
Recurrent Neural Networks
● Model sequences
● Output layer: ot
= fo
(xt
, ht
)
● Hidden layer: ht
= fh
(xt
, ht-1
)
● No Markov assumption of fixed
memory window
● Very popular in NLP, language
modeling, speech processing,
semantic image analysis
ot0
ot1
ot2
xt0
xt1
xt2
ht2
ht1
ht0
RNN application: next character prediction
● Train the network to
predict the next character
in a sentence
● Feed one character at the
time into the network
● ‘hello’: ‘h’-> ‘e’, ‘e’ -> ‘l’, ‘l’
-> ‘o’
● Use the trained model to
generate new text
ot0
ot1
ot2
xt0
xt1
xt2
ht2
ht1
ht0
h
e
e
l
l
o
Next POI category prediction
Café, Art Museum, Monument, Italian Restaurant, Irish Pub, Night
Club, EOP
Chinese Restaurant, Pub, Wine Bar, Karaoke Bar, Rock Club, EOP
Beach, Gym, Cocktail Bar, EOP
Cafeteria, Vegetarian Restaurant, Café, Shopping Mall, Smoothie
Shop, Spa, Wine Bar, Opera House, EOP
Input Target
Architecture
Art_Museum Park Sushi_Restaurant EOP
Cafeteria Art_Museum Park Sushi_Restaurant
GRU
o0
o1
o2
o3
x1
x2
x3
Dropout Dropout Dropout Dropout
Target
encoding encodingencodingencoding
GRU GRU GRU
Input layer
Hidden layer(s)
Output layer
Softmax Softmax SoftmaxSoftmax
h0 h1
h2
h3
x0
One-hot encoding
● Encoding: a strategy to turn
categories c into vectors x
● One-hot encoding:
○ assign to each category c
a unique index α = α (c).
○ xi
(c) = 1 if i == α else 0
○ |xi
(c)| = |C| where c ∈ C
● Simple and intuitive
0 0 0 1 0 0
c = Art Museum
α (Art Museum) = 4
α = 4
Shortcomings
● Independence: all
categories are considered
as orthogonal and
equidistant
● Size: the size of the input
vector depends on the
size of the ‘vocabulary’,
i.e. the set of categories
0 0 0 1 0 0
0 0 1 0 0 0
0 1 0 0 0 0
Art Museum
Café
History Museum
node2vec
● Feature learning from
networks
● Adaptation of word2vec
on graph structures
using random walks
● Maps nodes in a graph
into an euclidean space
preserving the graph
structure
node2vec workflow
node1, node3, node2,
node1, node5 ...
node2, node3, node1,
node2, node5, node4 …
node3, node1, node2,
node1, node3 …
node4, node3, node4,
node1, node5 ...
Random
Walk Word2vec
Graph Text file with ‘sentences’ Node embeddings
node2vec on Foursquare taxonomy
● Foursquare taxonomy is a
graph that models
dependencies among venue
categories
● Using node2vec we obtain
category vectors that models
dependencies
http://projector.tensorflow.org/?config=https://gist.githubusercontent.
com/enricopal/9a2683de61f5fb16c4f59ae295e3fef7/raw/159df72f47e88
1d0f314096fcc8ea561fb7132b9/projector_config.json
Arts & Entertainment
Museum
Art
Museum
History
Museum
Music Venue
Jazz
Club
Piano
Bar
Rock
Club
GRU units
● Hidden layer with Gated
Recurrent Units (GRU)
● ht+1
= GRU( xt
, ht
)
● Able to effectively model
long-term dependencies
● Recently they have proven to
be easier to train w.r.t. to
Long Short-Term Memory
Networks (LSTM)
img source:
http://www.wildml.com/2015/10/recurrent-neural-network-tutorial
-part-4-implementing-a-grulstm-rnn-with-python-and-theano/
Dropout
● Regularization by randomly
switching off neurons at
training time
● Prevent neurons from
co-adapting and overfitting
● Can be seen as an ensemble
of slightly different networks
● k = 0.2
0 0 1 0 0
Softmax
● Output layer has
length equal to |C|
● Turn activation values
into a probability
distribution over the
categories
0.3 0.2 0.3 0.8 0.50.1
0.15
α
0.14 0.12 0.15 0.25 0.19
Output
Softmax
Loss function
● Cross entropy between
the model probability
distribution and the
observed distribution
● One-hot encoding for
target vectors
● Target -> α
● L = - log (softmax(oα
))
Target
Art Museum
0 0 0 1 0 0
L = -log (0.15)
0.3 0.2 0.3 0.8 0.50.1
0.15 0.14 0.12 0.15 0.25 0.19
Output
Softmax
Evaluation
● Train, validation and test set split
● Accuracy weights error in the same way (e.g. predicting ‘Art Museum’ when
the true category is ‘History Museum’ counts the same as predicting
‘Karaoke Bar’)
● Perplexity (ppl): borrowed from neural language modeling, measures how
much the model is ‘surprised’ in observing the test set, the lower the
better: ppl = 2L
= 2H(p,q)
where p is the model distribution and q is the
category distribution in the test set
● A random uniform model has ppl = |C|
● ppl can be interpreted as the number of categories among which a random
uniform model would have to choose
Hyper parameters optimization
Grid-search of hyper-parameters and perplexity on the validation set, top 5 configurations
rank n_hidden l_r epochs n_layers ppl
1 64 10-4
5 3 71.333
2 64 10-4
5 2 71.609
3 64 10-4
2 3 71.630
4 128 10-4
2 2 71.645
5 128 10-4
5 2 72.048
range [64, 128] [10-4
, 5*10-4
, 10-3
] [1, 2, 5] [2, 3] -
Results
RNN with node2vec encoding, one-hot encoding vs bigram and random model.
System ppl
RNN-node2vec 75.271
RNN-one-hot 76.472
bigram 125.361
random 741
As if we were to choose
randomly among ~75
categories
Bigram model,
1-st order
transition
probabilities
estimated,
Laplace
add-one
smoothing This is exactly the
number of categories |C|
in the training data
User clustering results
● Paths depend on user
preferences
● Not enough data to learn a
personalized model
● Groups of users according to
user profile (no cold start)
● Gender, language extracted
from Twitter and Foursquare
Gender Language Paths ppl
M All 18718 75.478
F All 8741 73.024
All En 8955 71.343
All Ar 439 100.772
F En 2636 74.999
M En 5771 69.481
F Th 234 83.601
M Th 524 94.132
All All 29465 75.271
Correlation with training set size
● Perplexity vs
number of paths
in the user cluster
training set
● Spearmann
correlation = -0.48
● p value = 0.02
Conclusions
● Novel approach to next POI prediction passing through POI
categories
● Recurrent Neural Network to model sequences of POI
categories for next POI prediction
● Category encoding with node2vec vs one-hot encoding
● Perplexity as an evaluation metric
● User clustering based on demographics
● Will be integrated with entity2rec and user context to provide
next POI instance from the POI category
Thank you!
● Enrico Palumbo, Data Scientist, ISMB, PhD Student, Eurecom - PoliTo
● Mail: palumbo@ismb.it, enrico.palumbo@eurecom.fr
● Personal page: www.enricopal.github.io
● Slides: http://www.slideshare.net/EnricoPalumbo2
● Github: www.github.com/enricopal, www.github.com/MultimediaSemantics
● Twitter: https://twitter.com/enricopalumbo91
Turin, Italy, www.ismb.it Sophia Antipolis, France, www.eurecom.fr Turin, Italy, www.polito.it

More Related Content

Similar to Path recommender rec tour

Paris data-geeks-2013-03-28
Paris data-geeks-2013-03-28Paris data-geeks-2013-03-28
Paris data-geeks-2013-03-28
Ted Dunning
 
Multimodal Learning Analytics
Multimodal Learning AnalyticsMultimodal Learning Analytics
Multimodal Learning Analytics
Xavier Ochoa
 
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...
PyData
 
Chapter1.ppt
Chapter1.pptChapter1.ppt
Chapter1.ppt
PravinPrajapati53
 
computer logic and digital design chapter 1
computer logic and digital design chapter 1computer logic and digital design chapter 1
computer logic and digital design chapter 1
tendaisigauke3
 
Protein Secondary Structure Prediction using Deep Learning methods
Protein Secondary Structure Prediction using Deep Learning methodsProtein Secondary Structure Prediction using Deep Learning methods
Protein Secondary Structure Prediction using Deep Learning methods
Chrysoula Kosma
 
PixelCNN, Wavenet, Normalizing Flows - Santiago Pascual - UPC Barcelona 2018
PixelCNN, Wavenet, Normalizing Flows - Santiago Pascual - UPC Barcelona 2018PixelCNN, Wavenet, Normalizing Flows - Santiago Pascual - UPC Barcelona 2018
PixelCNN, Wavenet, Normalizing Flows - Santiago Pascual - UPC Barcelona 2018
Universitat Politècnica de Catalunya
 
An Introduction to Quantum Programming Languages
An Introduction to Quantum Programming LanguagesAn Introduction to Quantum Programming Languages
An Introduction to Quantum Programming Languages
David Yonge-Mallo
 
Cycle’s topological optimizations and the iterative decoding problem on gener...
Cycle’s topological optimizations and the iterative decoding problem on gener...Cycle’s topological optimizations and the iterative decoding problem on gener...
Cycle’s topological optimizations and the iterative decoding problem on gener...
Usatyuk Vasiliy
 
Onnc intro
Onnc introOnnc intro
Onnc intro
Luba Tang
 
Artificial Intelligence, Machine Learning and Deep Learning
Artificial Intelligence, Machine Learning and Deep LearningArtificial Intelligence, Machine Learning and Deep Learning
Artificial Intelligence, Machine Learning and Deep Learning
Sujit Pal
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRU
ananth
 
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
Victor Asanza
 
The Perceptron - Xavier Giro-i-Nieto - UPC Barcelona 2018
The Perceptron - Xavier Giro-i-Nieto - UPC Barcelona 2018The Perceptron - Xavier Giro-i-Nieto - UPC Barcelona 2018
The Perceptron - Xavier Giro-i-Nieto - UPC Barcelona 2018
Universitat Politècnica de Catalunya
 
Bringing Algebraic Semantics to Mahout
Bringing Algebraic Semantics to MahoutBringing Algebraic Semantics to Mahout
Bringing Algebraic Semantics to Mahoutsscdotopen
 
microprocessor
microprocessormicroprocessor
microprocessor
Rana Mukherji
 
Unsupervised Learning: Clustering
Unsupervised Learning: Clustering Unsupervised Learning: Clustering
Unsupervised Learning: Clustering
Experfy
 
Cycle’s topological optimizations and the iterative decoding problem on gener...
Cycle’s topological optimizations and the iterative decoding problem on gener...Cycle’s topological optimizations and the iterative decoding problem on gener...
Cycle’s topological optimizations and the iterative decoding problem on gener...
Usatyuk Vasiliy
 

Similar to Path recommender rec tour (20)

Paris data-geeks-2013-03-28
Paris data-geeks-2013-03-28Paris data-geeks-2013-03-28
Paris data-geeks-2013-03-28
 
Multimodal Learning Analytics
Multimodal Learning AnalyticsMultimodal Learning Analytics
Multimodal Learning Analytics
 
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...
 
Chapter1.ppt
Chapter1.pptChapter1.ppt
Chapter1.ppt
 
computer logic and digital design chapter 1
computer logic and digital design chapter 1computer logic and digital design chapter 1
computer logic and digital design chapter 1
 
Protein Secondary Structure Prediction using Deep Learning methods
Protein Secondary Structure Prediction using Deep Learning methodsProtein Secondary Structure Prediction using Deep Learning methods
Protein Secondary Structure Prediction using Deep Learning methods
 
PixelCNN, Wavenet, Normalizing Flows - Santiago Pascual - UPC Barcelona 2018
PixelCNN, Wavenet, Normalizing Flows - Santiago Pascual - UPC Barcelona 2018PixelCNN, Wavenet, Normalizing Flows - Santiago Pascual - UPC Barcelona 2018
PixelCNN, Wavenet, Normalizing Flows - Santiago Pascual - UPC Barcelona 2018
 
An Introduction to Quantum Programming Languages
An Introduction to Quantum Programming LanguagesAn Introduction to Quantum Programming Languages
An Introduction to Quantum Programming Languages
 
Cycle’s topological optimizations and the iterative decoding problem on gener...
Cycle’s topological optimizations and the iterative decoding problem on gener...Cycle’s topological optimizations and the iterative decoding problem on gener...
Cycle’s topological optimizations and the iterative decoding problem on gener...
 
Dsp manual print
Dsp manual printDsp manual print
Dsp manual print
 
Onnc intro
Onnc introOnnc intro
Onnc intro
 
Artificial Intelligence, Machine Learning and Deep Learning
Artificial Intelligence, Machine Learning and Deep LearningArtificial Intelligence, Machine Learning and Deep Learning
Artificial Intelligence, Machine Learning and Deep Learning
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRU
 
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
 
The Perceptron - Xavier Giro-i-Nieto - UPC Barcelona 2018
The Perceptron - Xavier Giro-i-Nieto - UPC Barcelona 2018The Perceptron - Xavier Giro-i-Nieto - UPC Barcelona 2018
The Perceptron - Xavier Giro-i-Nieto - UPC Barcelona 2018
 
Bringing Algebraic Semantics to Mahout
Bringing Algebraic Semantics to MahoutBringing Algebraic Semantics to Mahout
Bringing Algebraic Semantics to Mahout
 
CSMR10a.ppt
CSMR10a.pptCSMR10a.ppt
CSMR10a.ppt
 
microprocessor
microprocessormicroprocessor
microprocessor
 
Unsupervised Learning: Clustering
Unsupervised Learning: Clustering Unsupervised Learning: Clustering
Unsupervised Learning: Clustering
 
Cycle’s topological optimizations and the iterative decoding problem on gener...
Cycle’s topological optimizations and the iterative decoding problem on gener...Cycle’s topological optimizations and the iterative decoding problem on gener...
Cycle’s topological optimizations and the iterative decoding problem on gener...
 

More from Enrico Palumbo

Knowledge Graph Embeddings for Recommender Systems
Knowledge Graph Embeddings for Recommender SystemsKnowledge Graph Embeddings for Recommender Systems
Knowledge Graph Embeddings for Recommender Systems
Enrico Palumbo
 
Tinderbook
Tinderbook  Tinderbook
Tinderbook
Enrico Palumbo
 
An Empirical Comparison of Knowledge Graph Embeddings for Item Recommendation
An Empirical Comparison of Knowledge Graph Embeddings for Item RecommendationAn Empirical Comparison of Knowledge Graph Embeddings for Item Recommendation
An Empirical Comparison of Knowledge Graph Embeddings for Item Recommendation
Enrico Palumbo
 
Entity2rec recsys
Entity2rec recsysEntity2rec recsys
Entity2rec recsys
Enrico Palumbo
 
Innovation Diffusion: a (Big) Data-driven approach to the study of the geogra...
Innovation Diffusion: a (Big) Data-driven approach to the study of the geogra...Innovation Diffusion: a (Big) Data-driven approach to the study of the geogra...
Innovation Diffusion: a (Big) Data-driven approach to the study of the geogra...
Enrico Palumbo
 
An ensemble approach to financial entity matching
An ensemble approach to financial entity matchingAn ensemble approach to financial entity matching
An ensemble approach to financial entity matching
Enrico Palumbo
 

More from Enrico Palumbo (6)

Knowledge Graph Embeddings for Recommender Systems
Knowledge Graph Embeddings for Recommender SystemsKnowledge Graph Embeddings for Recommender Systems
Knowledge Graph Embeddings for Recommender Systems
 
Tinderbook
Tinderbook  Tinderbook
Tinderbook
 
An Empirical Comparison of Knowledge Graph Embeddings for Item Recommendation
An Empirical Comparison of Knowledge Graph Embeddings for Item RecommendationAn Empirical Comparison of Knowledge Graph Embeddings for Item Recommendation
An Empirical Comparison of Knowledge Graph Embeddings for Item Recommendation
 
Entity2rec recsys
Entity2rec recsysEntity2rec recsys
Entity2rec recsys
 
Innovation Diffusion: a (Big) Data-driven approach to the study of the geogra...
Innovation Diffusion: a (Big) Data-driven approach to the study of the geogra...Innovation Diffusion: a (Big) Data-driven approach to the study of the geogra...
Innovation Diffusion: a (Big) Data-driven approach to the study of the geogra...
 
An ensemble approach to financial entity matching
An ensemble approach to financial entity matchingAn ensemble approach to financial entity matching
An ensemble approach to financial entity matching
 

Recently uploaded

一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 

Recently uploaded (20)

一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 

Path recommender rec tour

  • 1. Predicting your Next Stop-Over from Location-Based Social Network Data with Recurrent Neural Networks RecTour workshop 2017 RecSys 2017, Como, Italy Enrico Palumbo, ISMB, Italy, Turin Giuseppe Rizzo, ISMB, Italy, Turin Raphaёl Troncy, EURECOM, France, Sophia Antipolis Elena Baralis, Politecnico di Torino, Italy, Turin
  • 2. Location-Based Social Network Data ● Allow users to check-in in a venue and share information about their whereabouts ● Venues are categorized according to consistent taxonomies ● User profiles allow to group users according to demographic information
  • 3. Next-POI prediction problem ● Predict where a user will go next depending on past check-ins and profile ● Modeling sequential information: where is a user likely to go after an Art Museum and a Sushi Restaurant? ● Modeling user profile information (e.g. Vegetarian Restaurant and Steakhouse do not go together) ?
  • 4. Next-POI category prediction Frédéric, French man in his 40’s, is going to visit Tate Modern in London this afternoon Then, he can be interested in Taking a beer in an Irish Pub, first Then, having a dinner in an Italian Restaurant And, lately, attending an event in a Jazz Club path, ie sequence, of categories of Points of Interest that Frédéric can be interested to go after having seen the Tate Modern gallery
  • 5. Data Collection and Enrichment 1.5M check-ins from 235.6K Swarmapp users worldwide in a week via Twitter API Collect venue category, user gender and language with Foursquare API
  • 6. Data cleansing and path extraction ● At least 10 check-ins: prefiltering, select active users who are likely to generate paths ● Bot removal: if more than twice two check-ins in a minute, it is a bot (p~1 on a sample of 50 examples) ● Segmentation: split a stream of checkins for a user (c1 , τ1 ), …, (cn , τn ) when the temporal interval is more than 8 hours: τi+1 - τi > 8. ‘Isolated’ check-ins, τi+1 - τi > 8, τi - τi-1 > 8, are removed from the data. ● Example: (Art_Museum, 8), (Café, 10), (French_Restaurant, 12), (Rock_Club, 22), (Cocktail_Bar, 23) τi+1 - τi = 10h
  • 7. Stats Users Check-ins Collection 235.6 K 1.5 M At least 10 check-ins 19.5 K 400 K Without Bots 12.4 K 184 K Segmentation 12 K 123 K 29.5K paths, with a max length of 50 and an avg length of 4.2 Path: Cafeteria, Vegetarian Restaurant, Café, Shopping Mall, Smoothie Shop, Spa, Wine Bar, Opera House, EOP
  • 8. Recurrent Neural Networks ● Model sequences ● Output layer: ot = fo (xt , ht ) ● Hidden layer: ht = fh (xt , ht-1 ) ● No Markov assumption of fixed memory window ● Very popular in NLP, language modeling, speech processing, semantic image analysis ot0 ot1 ot2 xt0 xt1 xt2 ht2 ht1 ht0
  • 9. RNN application: next character prediction ● Train the network to predict the next character in a sentence ● Feed one character at the time into the network ● ‘hello’: ‘h’-> ‘e’, ‘e’ -> ‘l’, ‘l’ -> ‘o’ ● Use the trained model to generate new text ot0 ot1 ot2 xt0 xt1 xt2 ht2 ht1 ht0 h e e l l o
  • 10. Next POI category prediction Café, Art Museum, Monument, Italian Restaurant, Irish Pub, Night Club, EOP Chinese Restaurant, Pub, Wine Bar, Karaoke Bar, Rock Club, EOP Beach, Gym, Cocktail Bar, EOP Cafeteria, Vegetarian Restaurant, Café, Shopping Mall, Smoothie Shop, Spa, Wine Bar, Opera House, EOP Input Target
  • 11. Architecture Art_Museum Park Sushi_Restaurant EOP Cafeteria Art_Museum Park Sushi_Restaurant GRU o0 o1 o2 o3 x1 x2 x3 Dropout Dropout Dropout Dropout Target encoding encodingencodingencoding GRU GRU GRU Input layer Hidden layer(s) Output layer Softmax Softmax SoftmaxSoftmax h0 h1 h2 h3 x0
  • 12. One-hot encoding ● Encoding: a strategy to turn categories c into vectors x ● One-hot encoding: ○ assign to each category c a unique index α = α (c). ○ xi (c) = 1 if i == α else 0 ○ |xi (c)| = |C| where c ∈ C ● Simple and intuitive 0 0 0 1 0 0 c = Art Museum α (Art Museum) = 4 α = 4
  • 13. Shortcomings ● Independence: all categories are considered as orthogonal and equidistant ● Size: the size of the input vector depends on the size of the ‘vocabulary’, i.e. the set of categories 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 Art Museum Café History Museum
  • 14. node2vec ● Feature learning from networks ● Adaptation of word2vec on graph structures using random walks ● Maps nodes in a graph into an euclidean space preserving the graph structure
  • 15. node2vec workflow node1, node3, node2, node1, node5 ... node2, node3, node1, node2, node5, node4 … node3, node1, node2, node1, node3 … node4, node3, node4, node1, node5 ... Random Walk Word2vec Graph Text file with ‘sentences’ Node embeddings
  • 16. node2vec on Foursquare taxonomy ● Foursquare taxonomy is a graph that models dependencies among venue categories ● Using node2vec we obtain category vectors that models dependencies http://projector.tensorflow.org/?config=https://gist.githubusercontent. com/enricopal/9a2683de61f5fb16c4f59ae295e3fef7/raw/159df72f47e88 1d0f314096fcc8ea561fb7132b9/projector_config.json Arts & Entertainment Museum Art Museum History Museum Music Venue Jazz Club Piano Bar Rock Club
  • 17. GRU units ● Hidden layer with Gated Recurrent Units (GRU) ● ht+1 = GRU( xt , ht ) ● Able to effectively model long-term dependencies ● Recently they have proven to be easier to train w.r.t. to Long Short-Term Memory Networks (LSTM) img source: http://www.wildml.com/2015/10/recurrent-neural-network-tutorial -part-4-implementing-a-grulstm-rnn-with-python-and-theano/
  • 18. Dropout ● Regularization by randomly switching off neurons at training time ● Prevent neurons from co-adapting and overfitting ● Can be seen as an ensemble of slightly different networks ● k = 0.2 0 0 1 0 0
  • 19. Softmax ● Output layer has length equal to |C| ● Turn activation values into a probability distribution over the categories 0.3 0.2 0.3 0.8 0.50.1 0.15 α 0.14 0.12 0.15 0.25 0.19 Output Softmax
  • 20. Loss function ● Cross entropy between the model probability distribution and the observed distribution ● One-hot encoding for target vectors ● Target -> α ● L = - log (softmax(oα )) Target Art Museum 0 0 0 1 0 0 L = -log (0.15) 0.3 0.2 0.3 0.8 0.50.1 0.15 0.14 0.12 0.15 0.25 0.19 Output Softmax
  • 21. Evaluation ● Train, validation and test set split ● Accuracy weights error in the same way (e.g. predicting ‘Art Museum’ when the true category is ‘History Museum’ counts the same as predicting ‘Karaoke Bar’) ● Perplexity (ppl): borrowed from neural language modeling, measures how much the model is ‘surprised’ in observing the test set, the lower the better: ppl = 2L = 2H(p,q) where p is the model distribution and q is the category distribution in the test set ● A random uniform model has ppl = |C| ● ppl can be interpreted as the number of categories among which a random uniform model would have to choose
  • 22. Hyper parameters optimization Grid-search of hyper-parameters and perplexity on the validation set, top 5 configurations rank n_hidden l_r epochs n_layers ppl 1 64 10-4 5 3 71.333 2 64 10-4 5 2 71.609 3 64 10-4 2 3 71.630 4 128 10-4 2 2 71.645 5 128 10-4 5 2 72.048 range [64, 128] [10-4 , 5*10-4 , 10-3 ] [1, 2, 5] [2, 3] -
  • 23. Results RNN with node2vec encoding, one-hot encoding vs bigram and random model. System ppl RNN-node2vec 75.271 RNN-one-hot 76.472 bigram 125.361 random 741 As if we were to choose randomly among ~75 categories Bigram model, 1-st order transition probabilities estimated, Laplace add-one smoothing This is exactly the number of categories |C| in the training data
  • 24. User clustering results ● Paths depend on user preferences ● Not enough data to learn a personalized model ● Groups of users according to user profile (no cold start) ● Gender, language extracted from Twitter and Foursquare Gender Language Paths ppl M All 18718 75.478 F All 8741 73.024 All En 8955 71.343 All Ar 439 100.772 F En 2636 74.999 M En 5771 69.481 F Th 234 83.601 M Th 524 94.132 All All 29465 75.271
  • 25. Correlation with training set size ● Perplexity vs number of paths in the user cluster training set ● Spearmann correlation = -0.48 ● p value = 0.02
  • 26. Conclusions ● Novel approach to next POI prediction passing through POI categories ● Recurrent Neural Network to model sequences of POI categories for next POI prediction ● Category encoding with node2vec vs one-hot encoding ● Perplexity as an evaluation metric ● User clustering based on demographics ● Will be integrated with entity2rec and user context to provide next POI instance from the POI category
  • 27. Thank you! ● Enrico Palumbo, Data Scientist, ISMB, PhD Student, Eurecom - PoliTo ● Mail: palumbo@ismb.it, enrico.palumbo@eurecom.fr ● Personal page: www.enricopal.github.io ● Slides: http://www.slideshare.net/EnricoPalumbo2 ● Github: www.github.com/enricopal, www.github.com/MultimediaSemantics ● Twitter: https://twitter.com/enricopalumbo91 Turin, Italy, www.ismb.it Sophia Antipolis, France, www.eurecom.fr Turin, Italy, www.polito.it