1. Learn
  2. /
  3. Courses
  4. /
  5. Market Basket Analysis in R

Exercise

Picking the right movie parameters

You are still wondering how to decide which parameters to add in the apriori() function. In particular, you need to decide the thresholds to use for the minimum support, confidence or eventually lift measures. The parameters added to the apriori() function will have an impact on the set of movie rules we obtain. To help in deciding which parameters are most appropriate to obtain the set of movie rules, let's create a plot of the number of rules. In this exercise, you will create a plot to decide on the most appropriate combination of parameters to be used in the apriori() function.

Instructions 1/3

undefined XP
  • 1
    • Calculate the number of extracted rules with minimum support 40%.
  • 2
    • Plot the number of rules as a function of confidence for rules_sup04.
  • 3
    • Likewise, rules_sup03 is created with min support 30%. Plot the number of rules as a function of the confidence level.