Last chance! 50% off unlimited learning
Sale ends in
This method generates top-n recommendations based on a model that has been trained before.
recommend(model, topN = 3)
the trained model of any algorithm.
number of items to be recommended per user, class numeric
.
Returns a list with suggested items for each user.
# NOT RUN {
myratings <- matrix(sample(c(0:5), size = 200, replace = TRUE,
prob = c(.6,.08,.08,.08,.08,.08)), nrow = 20, byrow = TRUE)
myratings <- defineData(myratings)
r <- rrecsys(myratings, alg = "FunkSVD", k = 2)
rec <- recommend(r)
# }
Run the code above in your browser using DataLab