O'Reilly logo

Building Recommendation Engines by Suresh Kumar Gorakala

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building an item-based recommender model

As with UBCF, we use the same Jester5k dataset for the item-based recommender system. In this section, we do not explore the data as we have already done so in the previous section. We first remove the user data of those who have rated all the items and also those records who have rated more than 80 as follows:

library(recommenderlab) 
data("Jester5k") 
model_data = Jester5k[rowCounts(Jester5k) < 80] 
model_data 
[1] 3261  100 

Now let's see how the average ratings are distributed for each user:

boxplot(rowMeans(model_data)) 
Building an item-based recommender model

The following code snippet calculates the average ratings given by each user and identifies ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required