Getting ready
To make a recommender system using collaborative filtering, we need to modify our data. As an illustration, we will use the movie dataset taken from https://grouplens.org/datasets/movielens/. The data consists of two .dat files: movies.dat and ratings.dat. The movies.dat file contains three columns: MovieID, Title, and Genre for 3,883 movies. The ratings.dat file contains four columns: UserID, MovieID, Rating, and Time. We need to merge these two data files such that we are able to build an array, where, for each user, we have a rating for all the 3,883 movies. The problem is that users normally do not rate all movies, so we have non-zero (normalized) ratings only for some movies. The rest is made zero and hence will not contribute ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access