Naive Bayes Collaborative Filtering ICS 77 B Max
Naive Bayes Collaborative Filtering ICS 77 B Max Welling
We want to compute the probability that: - Item 5 will be rated 1, given that - Item 1 was rated 1 and - Item 2 was rated 3 and - Item 3 was rated 3, …. - Item 5 will be rated 2 given that - Item 1 was rated 1 and - Item 2 was rated 3, …
To compute these probabilities we first ask: “how frequently did other users rate R 1 = 1 & R 5 = 1 ? We see that User 2 and User 4 both rated R 1 = 1 & R 5 = 1. That’s 100% ! Question: What is the probability that R 1 = 2 | R 5 = 4 ? In the end we will have computed all P(R 1=x 1|R 5=y), P(R 2=x 2|R 5=y), P(R 3=x 3|R 5=y), P(R 4=x 4|R 5=y)
We can also compute: P(R 5 = 1), P(R 5 = 2), P(R 5 = 3), P(R 5 = 4), P(R 5 = 5). Question: Compute probability that: P(R 5 = 1).
In the end we thus have: P(Ri=xi|R 5 = y) for i=1, 2, 3, 4 P(R 5 = y) How do we combine this: Bayes rule! P(y|x) P(x) = P(x|y) P(y) P(y|x) = P(x|y) P(y) / P(x)
P(y|x) P(x) = P(x|y) P(y) P(y|x) = P(x|y) P(y) / P(x) We will also use that we assume the rating for different items to be conditionally independent: P(R 1=x 1, R 2=x 2, R 3=x 3, R 4=x 4|R 5=y) = P(R 1=x 1|R 5=y) P(R 2=x 2|R 5=y) P(R 3=x 3|R 5=y) P(R 4=x 4|R 5=y)
Combining: P(R 5=y|R 1=1, R 2=3, R 3=3, R 4=2) = P(R 1=x 1|R 5=y) P(R 2=x 2|R 5=y) P(R 3=x 3|R 5=y) P(R 4=x 4|R 5=y) P(R 5=y) / constant Try all values of y and pick the one which has largest probability.
- Slides: 7