BigData BigData - 1 year ago 121
R Question

Association rules mining in R - 1 item on the right-hand-side?

I have been trying to use R programming to generate association rules from my transaction data set and it only produces rules with 1 item on the right-hand-side of the rules.


{A,B,C,D}->{E} or

{A,B,C,E}->{D} and so on...

Does it mean people are not interested in rules that have more than 1 item on the RHS e.g. {A,B,C}->{D,E} ? Why?

Otherwise this would be a big flaw of R for association rules mining since a lot of rules will be missed?

Any answer would be appreciated. Thanks!!

Answer Source

First, the documentation ?arules::apriori tells you that apriori

[c]alls the C implementation of the Apriori algorithm by Christian Borgelt for mining frequent itemsets, rules or hyperedges.

Note: Apriori only creates rules with one item in the RHS (Consequent)!

Then, Christian Borgelt's website tells you:

I have been asked many times about this restriction [...], so I finally decided to write down the explanation as part of this documentation. [...] Let me first emphasize that allowing multiple items in the consequents of association rules generally leads to a (much) larger number of rules. [...] Here the following considerations come into play: in the first place, if x → y,z is an association rule, then the two simpler rules x → y and x → z must also be association rules. [...] If your goal is, say, to suggest other products to a customer that already placed the item x into its shopping cart, these two simpler rules may be perfectly sufficient to suggest both the items y and z. You do not need a rule x → y,z for that. [...]

There are some additional notes, which you might want to read.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download