April 2017
Beginner to intermediate
358 pages
9h 30m
English
The goal of this chapter is to produce rules of the following form: if a person recommends this set of movies, they will also recommend this movie. We will also discuss extensions where a person who recommends a set of movies, is likely to recommend another particular movie.
To do this, we first need to determine if a person recommends a movie. We can do this by creating a new feature Favorable, which is True if the person gave a favorable review to a movie:
all_ratings["Favorable"] = all_ratings["Rating"] > 3
We can see the new feature by viewing the dataset:
all_ratings[10:15]
| UserID | MovieID | Rating | Datetime | Favorable | |
| 10 | 62 | 257 | 2 | 1997-11-12 22:07:14 | False |
| 11 | 286 | 1014 ... |
Read now
Unlock full access