User-based collaborative filtering
In the previous section, the algorithm was based on items and the steps to identify recommendations were as follows:
- Identify which items are similar in terms of having been purchased by the same people
- Recommend to a new user the items that are similar to its purchases
In this section, we will use the opposite approach. First, given a new user, we will identify its similar users. Then, we will recommend the top-rated items purchased by similar users. This approach is called user-based collaborative filtering. For each new user, these are the steps:
- Measure how similar each user is to the new one. Like IBCF, popular similarity measures are correlation and cosine.
- Identify the most similar users. The options are:
Get Building a Recommendation System with R now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.