Discovering User's Topics of Interest in Recommender Systems

Gabriel Moreira
Gabriel MoreiraMachine Learning Engineer at CI&T
Discovering Users’ Topics of Interest
in Recommender Systems
Gabriel Moreira - @gspmoreira
Gilmar Souza - @gilmarsouza
Track: Data Science
2016
Agenda
● Recommender Systems
● Topic Modeling
● Case: Smart Canvas - Corporative Collaboration
● Wrap up
Recommender Systems
An introduction
Life is too short!
Social recommendations
Recommendations by interaction
What should I
watch today?
What do you
like, my son?
"A lot of times, people don’t know what they want
until you show it to them."
Steve Jobs
"We are leaving the Information Age and entering the
Recommendation Age.".
Cris Anderson, "The long tail"
38% of sales
2/3 movie rentals
Recommendations are responsible for...
38% of top news
visualization
What else may I recommend?
What can a Recommender Systems do?
Prediction
Given an item, what is its relevance for
each user?
Recommendation
Given a user, produce an ordered list matching the
user needs
How it works
Content-Based Filtering
Similar content (e.g. actor)
Likes
Recommends
Advantages
● Does not depend upon other users
● May recommend new and unpopular items
● Recommendations can be easily explained
Drawbacks
● Overspecialization
● May not recommend to new users
May be difficult to extract attributes from audio,
movies or images
Content-Based Filtering
User-Based Collaborative Filtering
Similar interests
Likes
Recommends
Item-Based Collaborative Filtering
Likes Recommends
Who likes A also likes B
Likes
Likes
Collaborative Filtering
Advantages
● Works to any item kind (ignore attributes)
Drawbacks
● Cannot recommend items not already
rated/consumed
● Usually recommends more popular items
● Needs a minimum amount of users to match similar
users (cold start)
Hybrid Recommender Systems
Composite
Iterates by a chain of algorithm, aggregating
recommendations.
Weighted
Each algorithm has as a weight and the final
recommendations are defined by weighted averages.
Some approaches
UBCF Example (Java / Mahout)
// Loads user-item ratings
DataModel model = new FileDataModel(new File("input.csv"));
// Defines a similarity metric to compare users (Person's correlation coefficient)
UserSimilarity similarity = new PearsonCorrelationSimilarity(model);
// Threshold the minimum similarity to consider two users similar
UserNeighborhood neighborhood = new ThresholdUserNeighborhood(0.1, similarity,
model);
// Create a User-Based Collaborative Filtering recommender
UserBasedRecommender recommender = new GenericUserBasedRecommender
(model, neighborhood, similarity);
// Return the top 3 recommendations for userId=2
List recommendations = recommender.recommend(2, 3);
User,Item,Rating1,
15,4.0
1,16,5.0
1,17,1.0
1,18,5.0
2,10,1.0
2,11,2.0
2,15,5.0
2,16,4.5
2,17,1.0
2,18,5.0
3,11,2.5
input.csv
User-Based Collaborative Filtering example (Mahout)
1
2
3
4
5
6
Frameworks - Recommender Systems
Python
Python / ScalaJava
.NET
Java
Books
Topic Modeling
An introduction
Topic Modeling
A simple way to analyze topics of large text collections (corpus).
What is this data about?
What are the main topics?
Topic
A Cluster of words that generally occur together and are related.
Example 2D topics visualization with pyLDAviz (topics are the circles in the left, main terms of selected topic are shown in the right)
Topics evolution
Visualization of topics evolution during across time
Topic Modeling applications
● Detect trends in the market and customer challenges of a industry from media
and social networks.
● Marketing SEO: Optimization of search keywords to improve page ranking in
searchers
● Identify users preferences to recommend relevant content, products, jobs, …
● Documents are composed by many topics
● Topics are composed by many words (tokens)
Topic Modeling
Documents Topics Words (Tokens)
Observable Latent Observable
Unsupervised learning technique, which does not require too much effort on pre-
processing (usually just Text Vectorization). In general, the only parameter is the
number of topics (k).
Topics in a document
Topics example from NYT
Topic analysis (LDA) from 1.8 millions of New York Times articles
How it works
Text vectorization
Represent each document as a feature vector in the vector space, where each
position represents a word (token) and the contained value is its relevance in the
document.
● BoW (Bag of words)
● TF-IDF (Term Frequency - Inverse Document Frequency)
Document Term Matrix - Bag of Words
Text vectorization
TF-IDF example with scikit-learn
from sklearn.feature_extraction.text import TfidfVectorizer
vectorizer = TfidfVectorizer(max_df=0.5, max_features=1000,
min_df=2, stop_words='english')
tfidf_corpus = vectorizer.fit_transform(text_corpus)
face person guide lock cat dog sleep micro pool gym
0 1 2 3 4 5 6 7 8 9
D1 0.05 0.25
D2 0.02 0.32 0.45
...
...
tokens
documents
TF-IDF sparse matrix example
Text vectorization
“Did you ever wonder how great it would be if you could write your jmeter tests in ruby ? This projects aims to
do so. If you use it on your project just let me now. On the Architecture Academy you can read how jmeter can
be used to validate your Architecture. definition | architecture validation | academia de arquitetura”
Example
Tokens (unigrams and bigrams) Weight
jmeter 0.466
architecture 0.380
validate 0.243
validation 0.242
definition 0.239
write 0.225
academia arquitetura 0.218
academy 0.216
ruby 0.213
tests 0.209
Relevant keywords (TF-IDF)
Visualization of the average TF-IDF vectors of posts at Google+ for Work (CI&T)
Text vectorization
See the more details about this social and text analytics at http://bit.ly/python4ds_nb
Main techniques
● Latent Dirichlet Allocation (LDA) -> Probabilistic
● Latent Semantic Indexing / Analysis (LSI / LSA) -> Matrix Factorization
● Non-Negative Matrix Factorization (NMF) -> Matrix Factorization
Topic Modeling example (Python / gensim)
from gensim import corpora, models, similarities
documents = ["Human machine interface for lab abc computer applications",
"A survey of user opinion of computer system response time",
"The EPS user interface management system", ...]
stoplist = set('for a of the and to in'.split())
texts = [[word for word in document.lower().split() if word not in stoplist] for document in documents]
dictionary = corpora.Dictionary(texts)
corpus = [dictionary.doc2bow(text) for text in texts]
tfidf = models.TfidfModel(corpus)
corpus_tfidf = tfidf[corpus]
lsi = models.LsiModel(corpus_tfidf, id2word=dictionary, num_topics=2)
corpus_lsi = lsi[corpus_tfidf]
lsi.print_topics(2)
topic #0(1.594): 0.703*"trees" + 0.538*"graph" + 0.402*"minors" + 0.187*"survey" + ...
topic #1(1.476): 0.460*"system" + 0.373*"user" + 0.332*"eps" + 0.328*"interface" + 0.320*"response" + ...
Example of topic modeling using LSI technique
Example of the 2 topics discovered in the corpus
1
2
3
4
5
6
7
8
9
10
11
12
13
from pyspark.mllib.clustering import LDA, LDAModel
from pyspark.mllib.linalg import Vectors
# Load and parse the data
data = sc.textFile("data/mllib/sample_lda_data.txt")
parsedData = data.map(lambda line: Vectors.dense([float(x) for x in line.strip().split(' ')]))
# Index documents with unique IDs
corpus = parsedData.zipWithIndex().map(lambda x: [x[1], x[0]]).cache()
# Cluster the documents into three topics using LDA
ldaModel = LDA.train(corpus, k=3)
Topic Modeling example (PySpark MLLib LDA)
Sometimes simpler is better!
Scikit-learn topic models worked better for us than Spark MLlib LDA distributed
implementation because we have thousands of users with hundreds of posts,
and running scikit-learn on workers for each person was much quicker than
running distributed Spark LDA for each person.
1
2
3
4
5
6
7
8
9
Cosine similarity
Similarity metric between two vectors is cosine among the angle between them
from sklearn.metrics.pairwise import cosine_similarity
cosine_similarity(tfidf_matrix[0:1], tfidf_matrix)
Example with scikit-learn
Example of relevant keywords for a person and people with similar interests
People similarity
Frameworks - Topic Modeling
Python Java
Stanford Topic Modeling Toolbox (Excel plugin)
http://nlp.stanford.edu/software/tmt/tmt-0.4/
Python / Scala
Smart Canvas©
Corporate Collaboration
http://www.smartcanvas.com/
Powered by Recommender Systems and Topic Modeling techniques
Case
Content recommendations
Discover channel - Content recommendations with personalized explanations, based on user’s topics of
interest (discovered from their contributed content and reads)
Person topics of interest
User profile - Topics of interest of users are from the content that they contribute and are presented as
tags in their profile.
Searching people interested in topics / experts...
User discovered tags are searchable, allowing to find experts or people with specific interests.
Similar people
People recommendation - Recommends people with similar interests, explaining which topics are shared.
How it works
Collaboration Graph Model
Smart Canvas ©
Graph Model: Dashed lines and bold
labels are the relationships inferred by usage of RecSys
and Topic Modeling techniques
Architecture Overview
Jobs Pipeline
Content
Vectorization
People
Topic Modeling
Boards
Topic Modeling
Contents
Recommendation
Boards
Recommendation
Similar ContentGoogle
Cloud
Storage
Google
Cloud
Storage
pickles
pickles
pickles
loads
loads
loads
loads
loads
Stores topics and
recommendations in the graph
1
2
3
4
5
6
loads
content
loads
touchpoints
1. Groups all touchpoints (user interactions) by person
2. For each person
a. Selects contents user has interacted
b. Clusters contents TF-IDF vectors to model (e.g. LDA, NMF, Kmeans) person’ topics of interest
(varying the k from a range (1-5) and selecting the model whose clusters best describe
cohesive topics, penalizing large k)
c. Weights clusters relevance (to the user) by summing touchpoints strength (view, like,
bookmark, …) of each cluster, with a time decay on interaction age (older interactions are less
relevant to current person interest)
d. Returns highly relevant topics vectors for the person,labeled by its three top keywords
3. For each people topic
a. Calculate the cosine similarity (optionally applying Pivoted Unique Pivoted Normalization)
among the topic vector and content TF-IDF vectors
b. Recommends more similar contents to person user topics, which user has not yet
People Topic Modeling and Content
Recommendations algorithm
Bloom Filter
● A space-efficient Probabilistic Data Structure used to test whether an element is a
member of a set.
● False positive matches are possible, but false negatives are not.
● An empty Bloom filter is a bit array of m bits, all set to 0.
● Each inserted key is mapped to bits (which are all set to 1) by k different hash functions.
The set {x,y,z} was inserted in Bloom Filter. w is not in the
set, because it hashes to one bit equal to 0
Bloom Filter - Example Using cross_bloomfilter - Pure Python and Java compatible implementation
GitHub: http://bit.ly/cross_bf
Bloom Filter - Complexity Analysis
Ordered List
Space Complexity: O(n)
where n is the number of items in the set
Check for key presence
Time Complexity (binary search): O(log(n))
assuming an ordered list
Example: For a list of 100,000 string keys, with an average length of 18 characters
Key list size: 1,788,900 bytes
Bloom filter size: 137,919 bytes (false positive rate = 0.5%)
Bloom filter size: 18,043 bytes (false positive rate = 5%)
(and you can gzip it!)
Bloom Filter
Space Complexity: O(t * ln(p))
where t is the maximum number of items to be
inserted and p the accepted false positive rate
Check for key presence
Time Complexity: O(k)
where k is a constant representing the number of
hash functions to be applied to a string key
● Distributed Graph Database
● Elastic and linear scalability for a growing data and user base
● Support for ACID and eventual consistency
● Backended by Cassandra or HBase
● Support for global graph data analytics, reporting, and ETL through integration
with Spark, Hadoop, Giraph
● Support for geo and full text search (ElasticSearch, Lucene, Solr)
● Native integration with TinkerPop (Gremlin query language, Gremlin Server, ...)
TinkerPop
Gremlin traversals
g.V().has('CONTENT','id', 'Post:123')
.outE('IS SIMILAR TO')
.has('strength', gte(0.1)).as('e').inV().as('v')
.select('e','v')
.map{['id': it.get().v.values('id').next(),
'strength': it.get().e.values('strength').next()]}
.limit(10)
Querying similar contents
[{‘id’: ‘Post:456’, ‘strength’: 0.672},
{‘id’: ‘Post:789’, ‘strength’: 0.453},
{‘id’: ‘Post:333’, ‘strength’: 0.235},
...]
Example output:
Content Content
IS SIMILAR TO
1
2
3
4
5
6
7
Gremlin traversals
g.V().has('PERSON','id','Person:gabrielpm@ciandt.com')
.out('IS ABOUT').has('number', 1)
.inE('IS RECOMMENDED TO').filter{ it.get().value('strength') >= 0.1}
.order().by('strength',decr).as('tc').outV().as('c')
.select('tc','c')
.map{ ['contentId': it.get().c.value('id'),
'recommendationStrength': it.get().tc.value('strength') *
getTimeDecayFactor(it.get().c.value('updatedOn')) ] }
Querying recommended contents for a person
[{‘contentId’: ‘Post:456’, ‘strength’: 0.672},
{‘contentId’: ‘Post:789’, ‘strength’: 0.453},
{‘contentId’: ‘Post:333’, ‘strength’: 0.235},
...]
Example output:
Person Topic
IS ABOUT
Content
IS RECOMMENDED TO
1
2
3
4
5
6
7
8
Recommender
Systems Topic Modeling
Improvement of
user experience
for greater
engagement
Users’ interests
segmentation
Datasets
summarization
Personalized
recommendations
Wrap up
http://www.smartcanvas.com/
Thanks!
Gabriel Moreira - @gspmoreira
Gilmar Souza - @gilmarsouza
Discovering
Users’ Topics of Interest
in Recommender Systems
1 of 59

Recommended

Past present and future of Recommender Systems: an Industry Perspective by
Past present and future of Recommender Systems: an Industry PerspectivePast present and future of Recommender Systems: an Industry Perspective
Past present and future of Recommender Systems: an Industry PerspectiveXavier Amatriain
7.2K views20 slides
Boston ML - Architecting Recommender Systems by
Boston ML - Architecting Recommender SystemsBoston ML - Architecting Recommender Systems
Boston ML - Architecting Recommender SystemsJames Kirk
8.6K views63 slides
Neural Text Embeddings for Information Retrieval (WSDM 2017) by
Neural Text Embeddings for Information Retrieval (WSDM 2017)Neural Text Embeddings for Information Retrieval (WSDM 2017)
Neural Text Embeddings for Information Retrieval (WSDM 2017)Bhaskar Mitra
17.3K views126 slides
Deep Learning for Recommender Systems RecSys2017 Tutorial by
Deep Learning for Recommender Systems RecSys2017 Tutorial Deep Learning for Recommender Systems RecSys2017 Tutorial
Deep Learning for Recommender Systems RecSys2017 Tutorial Alexandros Karatzoglou
32.2K views80 slides
Recommender Systems (Machine Learning Summer School 2014 @ CMU) by
Recommender Systems (Machine Learning Summer School 2014 @ CMU)Recommender Systems (Machine Learning Summer School 2014 @ CMU)
Recommender Systems (Machine Learning Summer School 2014 @ CMU)Xavier Amatriain
184.6K views248 slides
Recommender system algorithm and architecture by
Recommender system algorithm and architectureRecommender system algorithm and architecture
Recommender system algorithm and architectureLiang Xiang
40.7K views39 slides

More Related Content

What's hot

Introduction to Transformers for NLP - Olga Petrova by
Introduction to Transformers for NLP - Olga PetrovaIntroduction to Transformers for NLP - Olga Petrova
Introduction to Transformers for NLP - Olga PetrovaAlexey Grigorev
399 views97 slides
Recommender system introduction by
Recommender system   introductionRecommender system   introduction
Recommender system introductionLiang Xiang
12.2K views39 slides
Use of data science in recommendation system by
Use of data science in  recommendation systemUse of data science in  recommendation system
Use of data science in recommendation systemAkashPatil334
412 views22 slides
Overview of recommender system by
Overview of recommender systemOverview of recommender system
Overview of recommender systemStanley Wang
6.9K views59 slides
Crafting Recommenders: the Shallow and the Deep of it! by
Crafting Recommenders: the Shallow and the Deep of it! Crafting Recommenders: the Shallow and the Deep of it!
Crafting Recommenders: the Shallow and the Deep of it! Sudeep Das, Ph.D.
1.8K views60 slides
Topic Models by
Topic ModelsTopic Models
Topic ModelsClaudia Wagner
19.5K views49 slides

What's hot(20)

Introduction to Transformers for NLP - Olga Petrova by Alexey Grigorev
Introduction to Transformers for NLP - Olga PetrovaIntroduction to Transformers for NLP - Olga Petrova
Introduction to Transformers for NLP - Olga Petrova
Alexey Grigorev399 views
Recommender system introduction by Liang Xiang
Recommender system   introductionRecommender system   introduction
Recommender system introduction
Liang Xiang12.2K views
Use of data science in recommendation system by AkashPatil334
Use of data science in  recommendation systemUse of data science in  recommendation system
Use of data science in recommendation system
AkashPatil334412 views
Overview of recommender system by Stanley Wang
Overview of recommender systemOverview of recommender system
Overview of recommender system
Stanley Wang6.9K views
Crafting Recommenders: the Shallow and the Deep of it! by Sudeep Das, Ph.D.
Crafting Recommenders: the Shallow and the Deep of it! Crafting Recommenders: the Shallow and the Deep of it!
Crafting Recommenders: the Shallow and the Deep of it!
Sudeep Das, Ph.D.1.8K views
How to build a recommender system? by blueace
How to build a recommender system?How to build a recommender system?
How to build a recommender system?
blueace25.6K views
Fine tune and deploy Hugging Face NLP models by OVHcloud
Fine tune and deploy Hugging Face NLP modelsFine tune and deploy Hugging Face NLP models
Fine tune and deploy Hugging Face NLP models
OVHcloud953 views
An introduction to Recommender Systems by David Zibriczky
An introduction to Recommender SystemsAn introduction to Recommender Systems
An introduction to Recommender Systems
David Zibriczky2.3K views
NLP using transformers by Arvind Devaraj
NLP using transformers NLP using transformers
NLP using transformers
Arvind Devaraj4.1K views
The continuous cold-start problem in e-commerce recommender systems by Melanie JI Mueller
The continuous cold-start problem in e-commerce recommender systemsThe continuous cold-start problem in e-commerce recommender systems
The continuous cold-start problem in e-commerce recommender systems
Melanie JI Mueller2.5K views
Knowledge Graph Embeddings for Recommender Systems by Enrico Palumbo
Knowledge Graph Embeddings for Recommender SystemsKnowledge Graph Embeddings for Recommender Systems
Knowledge Graph Embeddings for Recommender Systems
Enrico Palumbo916 views
GPT-2: Language Models are Unsupervised Multitask Learners by Young Seok Kim
GPT-2: Language Models are Unsupervised Multitask LearnersGPT-2: Language Models are Unsupervised Multitask Learners
GPT-2: Language Models are Unsupervised Multitask Learners
Young Seok Kim1.8K views
Introduction to Graph Neural Networks: Basics and Applications - Katsuhiko Is... by Preferred Networks
Introduction to Graph Neural Networks: Basics and Applications - Katsuhiko Is...Introduction to Graph Neural Networks: Basics and Applications - Katsuhiko Is...
Introduction to Graph Neural Networks: Basics and Applications - Katsuhiko Is...
Preferred Networks9.2K views
Leveraging Lucene/Solr as a Knowledge Graph and Intent Engine by Trey Grainger
Leveraging Lucene/Solr as a Knowledge Graph and Intent EngineLeveraging Lucene/Solr as a Knowledge Graph and Intent Engine
Leveraging Lucene/Solr as a Knowledge Graph and Intent Engine
Trey Grainger8K views

Viewers also liked

Python for Data Science - TDC 2015 by
Python for Data Science - TDC 2015Python for Data Science - TDC 2015
Python for Data Science - TDC 2015Gabriel Moreira
5.6K views69 slides
Python for Data Science - Python Brasil 11 (2015) by
Python for Data Science - Python Brasil 11 (2015)Python for Data Science - Python Brasil 11 (2015)
Python for Data Science - Python Brasil 11 (2015)Gabriel Moreira
15.7K views58 slides
Guia de aprendizaje 4 by
Guia de aprendizaje 4 Guia de aprendizaje 4
Guia de aprendizaje 4 Nasly Hernandez
119 views7 slides
4. measure impact of learning.final by
4. measure impact of learning.final4. measure impact of learning.final
4. measure impact of learning.finalTeaching Teachers Literacy
180 views8 slides
Manual de talleres by
Manual de talleresManual de talleres
Manual de talleresFermin Mamani Ph
1.2K views78 slides
Hadoop implementation for algorithms apriori, pcy, son by
Hadoop implementation for algorithms apriori, pcy, sonHadoop implementation for algorithms apriori, pcy, son
Hadoop implementation for algorithms apriori, pcy, sonChengeng Ma
5.5K views26 slides

Viewers also liked(20)

Python for Data Science - TDC 2015 by Gabriel Moreira
Python for Data Science - TDC 2015Python for Data Science - TDC 2015
Python for Data Science - TDC 2015
Gabriel Moreira5.6K views
Python for Data Science - Python Brasil 11 (2015) by Gabriel Moreira
Python for Data Science - Python Brasil 11 (2015)Python for Data Science - Python Brasil 11 (2015)
Python for Data Science - Python Brasil 11 (2015)
Gabriel Moreira15.7K views
Hadoop implementation for algorithms apriori, pcy, son by Chengeng Ma
Hadoop implementation for algorithms apriori, pcy, sonHadoop implementation for algorithms apriori, pcy, son
Hadoop implementation for algorithms apriori, pcy, son
Chengeng Ma5.5K views
Molnnet csp by Molnnet
Molnnet cspMolnnet csp
Molnnet csp
Molnnet149 views
Contaminación ambiental by AriannaRD
Contaminación ambientalContaminación ambiental
Contaminación ambiental
AriannaRD2.5K views
Capturing Data and Improving Outcomes for Humans and Machines Using the Inter... by Altoros
Capturing Data and Improving Outcomes for Humans and Machines Using the Inter...Capturing Data and Improving Outcomes for Humans and Machines Using the Inter...
Capturing Data and Improving Outcomes for Humans and Machines Using the Inter...
Altoros1.3K views
Retail: interaction and integration of new technologies. by Michael Mazzer
Retail: interaction and integration of new technologies.Retail: interaction and integration of new technologies.
Retail: interaction and integration of new technologies.
Michael Mazzer93 views
Who Lives in Our Garden? by Altoros
Who Lives in Our Garden?Who Lives in Our Garden?
Who Lives in Our Garden?
Altoros1.8K views
Kathleen Breitman at the Hyperledger Meetup by Altoros
Kathleen Breitman at the Hyperledger Meetup Kathleen Breitman at the Hyperledger Meetup
Kathleen Breitman at the Hyperledger Meetup
Altoros1.9K views
Image Recognition with TensorFlow by Altoros
Image Recognition with TensorFlowImage Recognition with TensorFlow
Image Recognition with TensorFlow
Altoros2K views
A Perfect Cloud Foundry Engineer by Altoros
A Perfect Cloud Foundry EngineerA Perfect Cloud Foundry Engineer
A Perfect Cloud Foundry Engineer
Altoros591 views
Banking on a Blockchain by Altoros
Banking on a BlockchainBanking on a Blockchain
Banking on a Blockchain
Altoros3.6K views
Introduction Machine Learning by MyLittleAdventure by mylittleadventure
Introduction Machine Learning by MyLittleAdventureIntroduction Machine Learning by MyLittleAdventure
Introduction Machine Learning by MyLittleAdventure
mylittleadventure767 views
Intro to the Distributed Version of TensorFlow by Altoros
Intro to the Distributed Version of TensorFlowIntro to the Distributed Version of TensorFlow
Intro to the Distributed Version of TensorFlow
Altoros4.3K views

Similar to Discovering User's Topics of Interest in Recommender Systems

Discovering User's Topics of Interest in Recommender Systems @ Meetup Machine... by
Discovering User's Topics of Interest in Recommender Systems @ Meetup Machine...Discovering User's Topics of Interest in Recommender Systems @ Meetup Machine...
Discovering User's Topics of Interest in Recommender Systems @ Meetup Machine...Gabriel Moreira
1.4K views59 slides
ClassifyingIssuesFromSRTextAzureML by
ClassifyingIssuesFromSRTextAzureMLClassifyingIssuesFromSRTextAzureML
ClassifyingIssuesFromSRTextAzureMLGeorge Simov
159 views26 slides
Sistemas de Recomendação sem Enrolação by
Sistemas de Recomendação sem Enrolação Sistemas de Recomendação sem Enrolação
Sistemas de Recomendação sem Enrolação Gabriel Moreira
584 views57 slides
Reflected Intelligence: Lucene/Solr as a self-learning data system by
Reflected Intelligence: Lucene/Solr as a self-learning data systemReflected Intelligence: Lucene/Solr as a self-learning data system
Reflected Intelligence: Lucene/Solr as a self-learning data systemTrey Grainger
6.1K views64 slides
The need for sophistication in modern search engine implementations by
The need for sophistication in modern search engine implementationsThe need for sophistication in modern search engine implementations
The need for sophistication in modern search engine implementationsBen DeMott
36 views46 slides
professional fuzzy type-ahead rummage around in xml type-ahead search techni... by
professional fuzzy type-ahead rummage around in xml  type-ahead search techni...professional fuzzy type-ahead rummage around in xml  type-ahead search techni...
professional fuzzy type-ahead rummage around in xml type-ahead search techni...Kumar Goud
289 views5 slides

Similar to Discovering User's Topics of Interest in Recommender Systems(20)

Discovering User's Topics of Interest in Recommender Systems @ Meetup Machine... by Gabriel Moreira
Discovering User's Topics of Interest in Recommender Systems @ Meetup Machine...Discovering User's Topics of Interest in Recommender Systems @ Meetup Machine...
Discovering User's Topics of Interest in Recommender Systems @ Meetup Machine...
Gabriel Moreira1.4K views
ClassifyingIssuesFromSRTextAzureML by George Simov
ClassifyingIssuesFromSRTextAzureMLClassifyingIssuesFromSRTextAzureML
ClassifyingIssuesFromSRTextAzureML
George Simov159 views
Sistemas de Recomendação sem Enrolação by Gabriel Moreira
Sistemas de Recomendação sem Enrolação Sistemas de Recomendação sem Enrolação
Sistemas de Recomendação sem Enrolação
Gabriel Moreira584 views
Reflected Intelligence: Lucene/Solr as a self-learning data system by Trey Grainger
Reflected Intelligence: Lucene/Solr as a self-learning data systemReflected Intelligence: Lucene/Solr as a self-learning data system
Reflected Intelligence: Lucene/Solr as a self-learning data system
Trey Grainger6.1K views
The need for sophistication in modern search engine implementations by Ben DeMott
The need for sophistication in modern search engine implementationsThe need for sophistication in modern search engine implementations
The need for sophistication in modern search engine implementations
Ben DeMott36 views
professional fuzzy type-ahead rummage around in xml type-ahead search techni... by Kumar Goud
professional fuzzy type-ahead rummage around in xml  type-ahead search techni...professional fuzzy type-ahead rummage around in xml  type-ahead search techni...
professional fuzzy type-ahead rummage around in xml type-ahead search techni...
Kumar Goud289 views
Reflected Intelligence - Lucene/Solr as a self-learning data system: Presente... by Lucidworks
Reflected Intelligence - Lucene/Solr as a self-learning data system: Presente...Reflected Intelligence - Lucene/Solr as a self-learning data system: Presente...
Reflected Intelligence - Lucene/Solr as a self-learning data system: Presente...
Lucidworks1.1K views
Cis 555 Week 4 Assignment 2 Automated Teller Machine (Atm)... by Karen Thompson
Cis 555 Week 4 Assignment 2 Automated Teller Machine (Atm)...Cis 555 Week 4 Assignment 2 Automated Teller Machine (Atm)...
Cis 555 Week 4 Assignment 2 Automated Teller Machine (Atm)...
Karen Thompson3 views
Orchestrating the Intelligent Web with Apache Mahout by aneeshabakharia
Orchestrating the Intelligent Web with Apache MahoutOrchestrating the Intelligent Web with Apache Mahout
Orchestrating the Intelligent Web with Apache Mahout
aneeshabakharia2.6K views
Map Reduce amrp presentation by renjan131
Map Reduce amrp presentationMap Reduce amrp presentation
Map Reduce amrp presentation
renjan131447 views
ML crash course by mikaelhuss
ML crash courseML crash course
ML crash course
mikaelhuss795 views
Social recommender system by Kapil Kumar
Social recommender systemSocial recommender system
Social recommender system
Kapil Kumar1.8K views
Haystack 2018 - Algorithmic Extraction of Keywords Concepts and Vocabularies by Max Irwin
Haystack 2018 - Algorithmic Extraction of Keywords Concepts and VocabulariesHaystack 2018 - Algorithmic Extraction of Keywords Concepts and Vocabularies
Haystack 2018 - Algorithmic Extraction of Keywords Concepts and Vocabularies
Max Irwin3.1K views

More from Gabriel Moreira

[Phd Thesis Defense] CHAMELEON: A Deep Learning Meta-Architecture for News Re... by
[Phd Thesis Defense] CHAMELEON: A Deep Learning Meta-Architecture for News Re...[Phd Thesis Defense] CHAMELEON: A Deep Learning Meta-Architecture for News Re...
[Phd Thesis Defense] CHAMELEON: A Deep Learning Meta-Architecture for News Re...Gabriel Moreira
1.2K views88 slides
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF... by
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...Gabriel Moreira
399 views59 slides
Deep Learning for Recommender Systems @ TDC SP 2019 by
Deep Learning for Recommender Systems @ TDC SP 2019Deep Learning for Recommender Systems @ TDC SP 2019
Deep Learning for Recommender Systems @ TDC SP 2019Gabriel Moreira
1.1K views55 slides
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF... by
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...Gabriel Moreira
1.3K views59 slides
Introduction to Data Science by
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data ScienceGabriel Moreira
721 views51 slides
Deep Recommender Systems - PAPIs.io LATAM 2018 by
Deep Recommender Systems - PAPIs.io LATAM 2018Deep Recommender Systems - PAPIs.io LATAM 2018
Deep Recommender Systems - PAPIs.io LATAM 2018Gabriel Moreira
665 views51 slides

More from Gabriel Moreira(19)

[Phd Thesis Defense] CHAMELEON: A Deep Learning Meta-Architecture for News Re... by Gabriel Moreira
[Phd Thesis Defense] CHAMELEON: A Deep Learning Meta-Architecture for News Re...[Phd Thesis Defense] CHAMELEON: A Deep Learning Meta-Architecture for News Re...
[Phd Thesis Defense] CHAMELEON: A Deep Learning Meta-Architecture for News Re...
Gabriel Moreira1.2K views
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF... by Gabriel Moreira
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
Gabriel Moreira399 views
Deep Learning for Recommender Systems @ TDC SP 2019 by Gabriel Moreira
Deep Learning for Recommender Systems @ TDC SP 2019Deep Learning for Recommender Systems @ TDC SP 2019
Deep Learning for Recommender Systems @ TDC SP 2019
Gabriel Moreira1.1K views
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF... by Gabriel Moreira
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
Gabriel Moreira1.3K views
Deep Recommender Systems - PAPIs.io LATAM 2018 by Gabriel Moreira
Deep Recommender Systems - PAPIs.io LATAM 2018Deep Recommender Systems - PAPIs.io LATAM 2018
Deep Recommender Systems - PAPIs.io LATAM 2018
Gabriel Moreira665 views
CI&T Tech Summit 2017 - Machine Learning para Sistemas de Recomendação by Gabriel Moreira
CI&T Tech Summit 2017 - Machine Learning para Sistemas de RecomendaçãoCI&T Tech Summit 2017 - Machine Learning para Sistemas de Recomendação
CI&T Tech Summit 2017 - Machine Learning para Sistemas de Recomendação
Gabriel Moreira499 views
Feature Engineering - Getting most out of data for predictive models - TDC 2017 by Gabriel Moreira
Feature Engineering - Getting most out of data for predictive models - TDC 2017Feature Engineering - Getting most out of data for predictive models - TDC 2017
Feature Engineering - Getting most out of data for predictive models - TDC 2017
Gabriel Moreira10.1K views
Feature Engineering - Getting most out of data for predictive models by Gabriel Moreira
Feature Engineering - Getting most out of data for predictive modelsFeature Engineering - Getting most out of data for predictive models
Feature Engineering - Getting most out of data for predictive models
Gabriel Moreira36.3K views
Using Neural Networks and 3D sensors data to model LIBRAS gestures recognitio... by Gabriel Moreira
Using Neural Networks and 3D sensors data to model LIBRAS gestures recognitio...Using Neural Networks and 3D sensors data to model LIBRAS gestures recognitio...
Using Neural Networks and 3D sensors data to model LIBRAS gestures recognitio...
Gabriel Moreira992 views
Developing GeoGames for Education with Kinect and Android for ArcGIS Runtime by Gabriel Moreira
Developing GeoGames for Education with Kinect and Android for ArcGIS RuntimeDeveloping GeoGames for Education with Kinect and Android for ArcGIS Runtime
Developing GeoGames for Education with Kinect and Android for ArcGIS Runtime
Gabriel Moreira1K views
Dojo Imagem de Android - 19/06/2012 by Gabriel Moreira
Dojo Imagem de Android - 19/06/2012Dojo Imagem de Android - 19/06/2012
Dojo Imagem de Android - 19/06/2012
Gabriel Moreira373 views
Agile Testing e outros amendoins by Gabriel Moreira
Agile Testing e outros amendoinsAgile Testing e outros amendoins
Agile Testing e outros amendoins
Gabriel Moreira596 views
EARLY-FIX: Um Framework para Predição de Manutenção Corretiva de Software uti... by Gabriel Moreira
EARLY-FIX: Um Framework para Predição de Manutenção Corretiva de Software uti...EARLY-FIX: Um Framework para Predição de Manutenção Corretiva de Software uti...
EARLY-FIX: Um Framework para Predição de Manutenção Corretiva de Software uti...
Gabriel Moreira2.1K views
Continuous Inspection - An effective approch towards Software Quality Product... by Gabriel Moreira
Continuous Inspection - An effective approch towards Software Quality Product...Continuous Inspection - An effective approch towards Software Quality Product...
Continuous Inspection - An effective approch towards Software Quality Product...
Gabriel Moreira1K views
An Investigation Of EXtreme Programming Practices by Gabriel Moreira
An Investigation Of EXtreme Programming PracticesAn Investigation Of EXtreme Programming Practices
An Investigation Of EXtreme Programming Practices
Gabriel Moreira731 views
METACOM – Uma análise de correlação entre métricas de produto e propensão à m... by Gabriel Moreira
METACOM – Uma análise de correlação entre métricas de produto e propensão à m...METACOM – Uma análise de correlação entre métricas de produto e propensão à m...
METACOM – Uma análise de correlação entre métricas de produto e propensão à m...
Gabriel Moreira899 views
Software Product Measurement and Analysis in a Continuous Integration Environ... by Gabriel Moreira
Software Product Measurement and Analysis in a Continuous Integration Environ...Software Product Measurement and Analysis in a Continuous Integration Environ...
Software Product Measurement and Analysis in a Continuous Integration Environ...
Gabriel Moreira3.1K views

Recently uploaded

Evolving the Network Automation Journey from Python to Platforms by
Evolving the Network Automation Journey from Python to PlatformsEvolving the Network Automation Journey from Python to Platforms
Evolving the Network Automation Journey from Python to PlatformsNetwork Automation Forum
13 views21 slides
Info Session November 2023.pdf by
Info Session November 2023.pdfInfo Session November 2023.pdf
Info Session November 2023.pdfAleksandraKoprivica4
12 views15 slides
Special_edition_innovator_2023.pdf by
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdfWillDavies22
17 views6 slides
Network Source of Truth and Infrastructure as Code revisited by
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisitedNetwork Automation Forum
26 views45 slides
Design Driven Network Assurance by
Design Driven Network AssuranceDesign Driven Network Assurance
Design Driven Network AssuranceNetwork Automation Forum
15 views42 slides
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveNetwork Automation Forum
31 views35 slides

Recently uploaded(20)

Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2217 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana16 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10248 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab19 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn22 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman33 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely21 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson85 views

Discovering User's Topics of Interest in Recommender Systems

  • 1. Discovering Users’ Topics of Interest in Recommender Systems Gabriel Moreira - @gspmoreira Gilmar Souza - @gilmarsouza Track: Data Science 2016
  • 2. Agenda ● Recommender Systems ● Topic Modeling ● Case: Smart Canvas - Corporative Collaboration ● Wrap up
  • 4. Life is too short!
  • 6. Recommendations by interaction What should I watch today? What do you like, my son?
  • 7. "A lot of times, people don’t know what they want until you show it to them." Steve Jobs "We are leaving the Information Age and entering the Recommendation Age.". Cris Anderson, "The long tail"
  • 8. 38% of sales 2/3 movie rentals Recommendations are responsible for... 38% of top news visualization
  • 9. What else may I recommend?
  • 10. What can a Recommender Systems do? Prediction Given an item, what is its relevance for each user? Recommendation Given a user, produce an ordered list matching the user needs
  • 12. Content-Based Filtering Similar content (e.g. actor) Likes Recommends
  • 13. Advantages ● Does not depend upon other users ● May recommend new and unpopular items ● Recommendations can be easily explained Drawbacks ● Overspecialization ● May not recommend to new users May be difficult to extract attributes from audio, movies or images Content-Based Filtering
  • 14. User-Based Collaborative Filtering Similar interests Likes Recommends
  • 15. Item-Based Collaborative Filtering Likes Recommends Who likes A also likes B Likes Likes
  • 16. Collaborative Filtering Advantages ● Works to any item kind (ignore attributes) Drawbacks ● Cannot recommend items not already rated/consumed ● Usually recommends more popular items ● Needs a minimum amount of users to match similar users (cold start)
  • 17. Hybrid Recommender Systems Composite Iterates by a chain of algorithm, aggregating recommendations. Weighted Each algorithm has as a weight and the final recommendations are defined by weighted averages. Some approaches
  • 18. UBCF Example (Java / Mahout) // Loads user-item ratings DataModel model = new FileDataModel(new File("input.csv")); // Defines a similarity metric to compare users (Person's correlation coefficient) UserSimilarity similarity = new PearsonCorrelationSimilarity(model); // Threshold the minimum similarity to consider two users similar UserNeighborhood neighborhood = new ThresholdUserNeighborhood(0.1, similarity, model); // Create a User-Based Collaborative Filtering recommender UserBasedRecommender recommender = new GenericUserBasedRecommender (model, neighborhood, similarity); // Return the top 3 recommendations for userId=2 List recommendations = recommender.recommend(2, 3); User,Item,Rating1, 15,4.0 1,16,5.0 1,17,1.0 1,18,5.0 2,10,1.0 2,11,2.0 2,15,5.0 2,16,4.5 2,17,1.0 2,18,5.0 3,11,2.5 input.csv User-Based Collaborative Filtering example (Mahout) 1 2 3 4 5 6
  • 19. Frameworks - Recommender Systems Python Python / ScalaJava .NET Java
  • 20. Books
  • 22. Topic Modeling A simple way to analyze topics of large text collections (corpus). What is this data about? What are the main topics?
  • 23. Topic A Cluster of words that generally occur together and are related. Example 2D topics visualization with pyLDAviz (topics are the circles in the left, main terms of selected topic are shown in the right)
  • 24. Topics evolution Visualization of topics evolution during across time
  • 25. Topic Modeling applications ● Detect trends in the market and customer challenges of a industry from media and social networks. ● Marketing SEO: Optimization of search keywords to improve page ranking in searchers ● Identify users preferences to recommend relevant content, products, jobs, …
  • 26. ● Documents are composed by many topics ● Topics are composed by many words (tokens) Topic Modeling Documents Topics Words (Tokens) Observable Latent Observable Unsupervised learning technique, which does not require too much effort on pre- processing (usually just Text Vectorization). In general, the only parameter is the number of topics (k).
  • 27. Topics in a document
  • 28. Topics example from NYT Topic analysis (LDA) from 1.8 millions of New York Times articles
  • 30. Text vectorization Represent each document as a feature vector in the vector space, where each position represents a word (token) and the contained value is its relevance in the document. ● BoW (Bag of words) ● TF-IDF (Term Frequency - Inverse Document Frequency) Document Term Matrix - Bag of Words
  • 32. TF-IDF example with scikit-learn from sklearn.feature_extraction.text import TfidfVectorizer vectorizer = TfidfVectorizer(max_df=0.5, max_features=1000, min_df=2, stop_words='english') tfidf_corpus = vectorizer.fit_transform(text_corpus) face person guide lock cat dog sleep micro pool gym 0 1 2 3 4 5 6 7 8 9 D1 0.05 0.25 D2 0.02 0.32 0.45 ... ... tokens documents TF-IDF sparse matrix example
  • 33. Text vectorization “Did you ever wonder how great it would be if you could write your jmeter tests in ruby ? This projects aims to do so. If you use it on your project just let me now. On the Architecture Academy you can read how jmeter can be used to validate your Architecture. definition | architecture validation | academia de arquitetura” Example Tokens (unigrams and bigrams) Weight jmeter 0.466 architecture 0.380 validate 0.243 validation 0.242 definition 0.239 write 0.225 academia arquitetura 0.218 academy 0.216 ruby 0.213 tests 0.209 Relevant keywords (TF-IDF)
  • 34. Visualization of the average TF-IDF vectors of posts at Google+ for Work (CI&T) Text vectorization See the more details about this social and text analytics at http://bit.ly/python4ds_nb
  • 35. Main techniques ● Latent Dirichlet Allocation (LDA) -> Probabilistic ● Latent Semantic Indexing / Analysis (LSI / LSA) -> Matrix Factorization ● Non-Negative Matrix Factorization (NMF) -> Matrix Factorization
  • 36. Topic Modeling example (Python / gensim) from gensim import corpora, models, similarities documents = ["Human machine interface for lab abc computer applications", "A survey of user opinion of computer system response time", "The EPS user interface management system", ...] stoplist = set('for a of the and to in'.split()) texts = [[word for word in document.lower().split() if word not in stoplist] for document in documents] dictionary = corpora.Dictionary(texts) corpus = [dictionary.doc2bow(text) for text in texts] tfidf = models.TfidfModel(corpus) corpus_tfidf = tfidf[corpus] lsi = models.LsiModel(corpus_tfidf, id2word=dictionary, num_topics=2) corpus_lsi = lsi[corpus_tfidf] lsi.print_topics(2) topic #0(1.594): 0.703*"trees" + 0.538*"graph" + 0.402*"minors" + 0.187*"survey" + ... topic #1(1.476): 0.460*"system" + 0.373*"user" + 0.332*"eps" + 0.328*"interface" + 0.320*"response" + ... Example of topic modeling using LSI technique Example of the 2 topics discovered in the corpus 1 2 3 4 5 6 7 8 9 10 11 12 13
  • 37. from pyspark.mllib.clustering import LDA, LDAModel from pyspark.mllib.linalg import Vectors # Load and parse the data data = sc.textFile("data/mllib/sample_lda_data.txt") parsedData = data.map(lambda line: Vectors.dense([float(x) for x in line.strip().split(' ')])) # Index documents with unique IDs corpus = parsedData.zipWithIndex().map(lambda x: [x[1], x[0]]).cache() # Cluster the documents into three topics using LDA ldaModel = LDA.train(corpus, k=3) Topic Modeling example (PySpark MLLib LDA) Sometimes simpler is better! Scikit-learn topic models worked better for us than Spark MLlib LDA distributed implementation because we have thousands of users with hundreds of posts, and running scikit-learn on workers for each person was much quicker than running distributed Spark LDA for each person. 1 2 3 4 5 6 7 8 9
  • 38. Cosine similarity Similarity metric between two vectors is cosine among the angle between them from sklearn.metrics.pairwise import cosine_similarity cosine_similarity(tfidf_matrix[0:1], tfidf_matrix) Example with scikit-learn
  • 39. Example of relevant keywords for a person and people with similar interests People similarity
  • 40. Frameworks - Topic Modeling Python Java Stanford Topic Modeling Toolbox (Excel plugin) http://nlp.stanford.edu/software/tmt/tmt-0.4/ Python / Scala
  • 41. Smart Canvas© Corporate Collaboration http://www.smartcanvas.com/ Powered by Recommender Systems and Topic Modeling techniques Case
  • 42. Content recommendations Discover channel - Content recommendations with personalized explanations, based on user’s topics of interest (discovered from their contributed content and reads)
  • 43. Person topics of interest User profile - Topics of interest of users are from the content that they contribute and are presented as tags in their profile.
  • 44. Searching people interested in topics / experts... User discovered tags are searchable, allowing to find experts or people with specific interests.
  • 45. Similar people People recommendation - Recommends people with similar interests, explaining which topics are shared.
  • 47. Collaboration Graph Model Smart Canvas © Graph Model: Dashed lines and bold labels are the relationships inferred by usage of RecSys and Topic Modeling techniques
  • 49. Jobs Pipeline Content Vectorization People Topic Modeling Boards Topic Modeling Contents Recommendation Boards Recommendation Similar ContentGoogle Cloud Storage Google Cloud Storage pickles pickles pickles loads loads loads loads loads Stores topics and recommendations in the graph 1 2 3 4 5 6 loads content loads touchpoints
  • 50. 1. Groups all touchpoints (user interactions) by person 2. For each person a. Selects contents user has interacted b. Clusters contents TF-IDF vectors to model (e.g. LDA, NMF, Kmeans) person’ topics of interest (varying the k from a range (1-5) and selecting the model whose clusters best describe cohesive topics, penalizing large k) c. Weights clusters relevance (to the user) by summing touchpoints strength (view, like, bookmark, …) of each cluster, with a time decay on interaction age (older interactions are less relevant to current person interest) d. Returns highly relevant topics vectors for the person,labeled by its three top keywords 3. For each people topic a. Calculate the cosine similarity (optionally applying Pivoted Unique Pivoted Normalization) among the topic vector and content TF-IDF vectors b. Recommends more similar contents to person user topics, which user has not yet People Topic Modeling and Content Recommendations algorithm
  • 51. Bloom Filter ● A space-efficient Probabilistic Data Structure used to test whether an element is a member of a set. ● False positive matches are possible, but false negatives are not. ● An empty Bloom filter is a bit array of m bits, all set to 0. ● Each inserted key is mapped to bits (which are all set to 1) by k different hash functions. The set {x,y,z} was inserted in Bloom Filter. w is not in the set, because it hashes to one bit equal to 0
  • 52. Bloom Filter - Example Using cross_bloomfilter - Pure Python and Java compatible implementation GitHub: http://bit.ly/cross_bf
  • 53. Bloom Filter - Complexity Analysis Ordered List Space Complexity: O(n) where n is the number of items in the set Check for key presence Time Complexity (binary search): O(log(n)) assuming an ordered list Example: For a list of 100,000 string keys, with an average length of 18 characters Key list size: 1,788,900 bytes Bloom filter size: 137,919 bytes (false positive rate = 0.5%) Bloom filter size: 18,043 bytes (false positive rate = 5%) (and you can gzip it!) Bloom Filter Space Complexity: O(t * ln(p)) where t is the maximum number of items to be inserted and p the accepted false positive rate Check for key presence Time Complexity: O(k) where k is a constant representing the number of hash functions to be applied to a string key
  • 54. ● Distributed Graph Database ● Elastic and linear scalability for a growing data and user base ● Support for ACID and eventual consistency ● Backended by Cassandra or HBase ● Support for global graph data analytics, reporting, and ETL through integration with Spark, Hadoop, Giraph ● Support for geo and full text search (ElasticSearch, Lucene, Solr) ● Native integration with TinkerPop (Gremlin query language, Gremlin Server, ...) TinkerPop
  • 55. Gremlin traversals g.V().has('CONTENT','id', 'Post:123') .outE('IS SIMILAR TO') .has('strength', gte(0.1)).as('e').inV().as('v') .select('e','v') .map{['id': it.get().v.values('id').next(), 'strength': it.get().e.values('strength').next()]} .limit(10) Querying similar contents [{‘id’: ‘Post:456’, ‘strength’: 0.672}, {‘id’: ‘Post:789’, ‘strength’: 0.453}, {‘id’: ‘Post:333’, ‘strength’: 0.235}, ...] Example output: Content Content IS SIMILAR TO 1 2 3 4 5 6 7
  • 56. Gremlin traversals g.V().has('PERSON','id','Person:gabrielpm@ciandt.com') .out('IS ABOUT').has('number', 1) .inE('IS RECOMMENDED TO').filter{ it.get().value('strength') >= 0.1} .order().by('strength',decr).as('tc').outV().as('c') .select('tc','c') .map{ ['contentId': it.get().c.value('id'), 'recommendationStrength': it.get().tc.value('strength') * getTimeDecayFactor(it.get().c.value('updatedOn')) ] } Querying recommended contents for a person [{‘contentId’: ‘Post:456’, ‘strength’: 0.672}, {‘contentId’: ‘Post:789’, ‘strength’: 0.453}, {‘contentId’: ‘Post:333’, ‘strength’: 0.235}, ...] Example output: Person Topic IS ABOUT Content IS RECOMMENDED TO 1 2 3 4 5 6 7 8
  • 57. Recommender Systems Topic Modeling Improvement of user experience for greater engagement Users’ interests segmentation Datasets summarization Personalized recommendations Wrap up
  • 59. Thanks! Gabriel Moreira - @gspmoreira Gilmar Souza - @gilmarsouza Discovering Users’ Topics of Interest in Recommender Systems