Perform the following steps to analyze the association rules:
- First, you need to load the Groceries dataset:
- You can then examine the summary of the Groceries dataset:
- Next, you can use itemFrequencyPlot to examine the relative item frequency of itemsets:
> itemFrequencyPlot(Groceries, support = 0.1, cex.names=0.8, topN=5)
- Use apriori to discover rules with support over 0.001 and confidence over 0.5:
> rules = apriori(Groceries, parameter = list(supp = 0.001, conf = 0.5, target= "rules")) > summary(rules) Output ...