Graph Association Rules

DESCRIPTION:

Creates a plot of a set of association rules on the current graphics device.

This function requires the bigdata library section to be loaded.

USAGE:

bd.assoc.rules.graph(rules, column="lift",
                     column.min=NULL, column.max=NULL)

REQUIRED ARGUMENTS:

rules
A data.frame or bdFrame giving a set of rules, as produced by . This must contain either a "rule" column, or individual item columns ( "con1", "ant1", etc.), so the consequent and antecedent items can be extracted for each rule.

OPTIONAL ARGUMENTS:

column
The name of the column within rules containing a numerical value to be plotted for each rule.
column.min
If given, only rules whose column value is equal or greater than column.min are plotted.
column.max
If given, only rules whose column value is equal or less than column.max are plotted.

VALUE:

a NULL value is returned.

SIDE EFFECTS:

A plot of the association rules in rules is produced on the current graphics device.

This plot processes the association rules, collecting a list of all items that appear as consequents in any rules, and a list of all items that appear as antecedents in any rules. Each of these lists is sorted alphabetically and displayed in the graph, with consequent items displayed in a vertical list along the left side, and the antecedent items displayed in a list along the bottom side. Then, for each rule, a symbol is displayed at the intersection of the rule's consequent item and each of its antecedent items. The symbol is an unfilled diamond, whose size is proportional to the column value for the rule. Because the diamond is not filled, multiple diamonds may be plotted in the same location, and still be visible, if they represent rules with different column values.

If there are too many rules, the graph may be too crowded. In this case, the column.min and column.max values can be used to only process rules with column values in the specified range.

This plot can be used to get a rough sense of which consequent and antecedent items appear most often in the rules with high column values. Since information from multiple rules may be plotted over each other, it is not possible to read individual rules from this graph. To view individual rules, examine the rules data directly.

SEE ALSO:

.

EXAMPLES:

bd.assoc.rules.graph(
  bd.assoc.rules(
      data.frame(aa=c("A","A","B","B","B"),
                 bb=c("C","C","C","C","D"),
                 stringsAsFactors=F),
      input.format="item.list")
  )