In the previous two sections, we built recommendation models based on item or user preferences with the data displaying the rating for each purchase. However, in some real-world scenarios, the following two things can take place:
- We know the items that have been purchased but not their ratings
- For each user, we don't know which items were purchased but we know which items were liked
In these contexts, we can build a user-item matrix whose values would be 1 if the user purchased (or liked) the item and 0 otherwise. In our case, starting from ratings_movies, we can build a rating_movies_viewed matrix whose values will be 1 if the user viewed the movie and 0 otherwise.
Perform the following steps ...