CommencerCommencer gratuitement

Extracting movie rules

Now that you have a better idea which thresholds to be used in the apriori() function, you are ready to extract association mining rules from the transactional dataset movie_subset. Extracting the set of movie rules will enable us to provide recommendations to users when it comes to movies. For instance, given that you have already watched a set of movies, which movie could you watch next? To answer this, we could make use of the bundle of movies watched by all other users and use Market Basket Analysis to this purpose. Moreover, some movie rules can be redundant, you should therefore extract the set of non-redundant movie rules in order to get valuable information and insights about the movies watched by users.

Cet exercice fait partie du cours

Market Basket Analysis in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Extract rules with the apriori
rules_movies = apriori(movie_trx,
                          parameter = list(___ = ___,
                                           conf = ___,
                                           minlen = 2, 
                                           target = "___"))

# Summary of extracted rules
___(___)
Modifier et exécuter le code