Association Rule Mining
We then set rhs=c("Survived=No", "Survived=Yes") in appearance to make sure that only "Survived=No" and "Survived=Yes" will appear in the rhs of rules.
This page shows an example of association rule mining with R. It demonstrates association rule mining, pruning redundant rules and visualizing association rules.
The Titanic Dataset
The Titanic dataset is used in this example, which can be downloaded as "titanic.raw.rdata" at the Data page.
Pruning Redundant Rules
In the above result, rule 2 provides no extra knowledge in addition to rule 1, since rules 1 tells us that all 2nd-class children survived. Generally speaking, when a rule (such as rule 2) is a super rule of another rule (such as rule 1) and the former has the same or a lower lift, the former rule (rule 2) is considered to be redundant. Below we prune redundant rules.
Visualizing Association Rules
Package arulesViz supports visualization of association rules with scatter plot, balloon plot, graph, parallel coordinates plot, etc.