Building a Recommendation Engine Sophie Watson sophie@redhat
Transcript of Building a Recommendation Engine Sophie Watson sophie@redhat
Building a Recommendation EngineSophie Watson [email protected]
Outline
Collaborative Filtering
Collaborative Filtering
Collaborative Filtering
A: 5★ B: 3★ C: 3★
A: 5★ B: 5★ C: 3★
A: 5★ B: ??? C: 3★
Collaborative Filtering
A: 5★ B: 3★ C: 3★
A: 5★ B: 5★ C: 3★
A: 5★ B: 4★ C: 3★
Alternating Least Squares
Alternating Least Squares
DISCLAIMER: I’M IGNORING THE OVERFITTING TERM IN MSE COMPUTATION
Alternating Least Squares
Implicit Data
User, Product (Artist) , # Plays
1 3 1
Implicit Data
User, Product (Artist) , # Plays
1 3 1
1 2 0
Implicit Data
User, Product (Artist) , # Plays
1 3 1
1 2 0
1 1 100
Implicit Alternating Least Squares
Implicit Alternating Least Squares
The aim:
preference
Implicit Alternating Least Squares
The aim:
preference
user, item
Implicit Alternating Least Squares
The recorded data: preference
recording
Implicit Alternating Least Squares
The recorded data: preference
recording
Implicit Alternating Least Squares
Confidence preference
recording
Implicit Alternating Least Squares
Confidence preference
recording
tuning parameter
Implicit Alternating Least Squares
Minimisation preference
recording
user factor vector item factor vector
What does Spark offer?
predictormodeller
Spark cluster
Data● Lastfm dataset● Widely used in recommendation engine research● 17 million recordings / 360K users / 200K artists
Building a model
Making Predictions
Training and Validation
R
60%
40%
train the model
validate the model
Rank and Lambda
lambda
Root M
ean Squared Error
Rank Lambda
Root M
ean Squared Error
Root M
ean Squared Error
Iterations
< 0.0001
Iterations
Root M
ean Squared Error
Microservices
predictormodeller
cachestore
datastore
frontend
modelstore
Spark cluster
radanalytics.io
@sophwats