This chapter will show you two popular approaches to evaluate recommendations. They are both based on the cross-validation framework described in the previous section.
The first approach is to evaluate the ratings estimated by the algorithm. The other approach is to evaluate the recommendations directly. There is a subsection for each approach.
In order to recommend items to new users, collaborative filtering estimates the ratings of items that are not yet purchased. Then, it recommends the top-rated items. At the moment, let's forget about the last step. We can evaluate the model by comparing the estimated ratings with the real ones.
First, let's prepare the data for validation, as shown in the previous section. Since the k-fold is the most accurate approach, we will use it here:
n_fold <- 4 items_to_keep <- 15 rating_threshold <- 3 eval_sets <- evaluationScheme(data = ratings_movies, method = "cross-validation", k = n_fold...