[R] how to change number of itemes appeare in right-hand-side of the rule with apriori in R(arules)?

Michael Hahsler michael at hahsler.net
Thu Feb 18 15:53:17 CET 2010


arules currently only implements mining algorithms that produce rules 
with one item in the right-hand-side (RHS) (apriori, ruleInduction). If 
you need rules with more than one items then you can mine frequent 
itemsets (with eclat or apriori). Then you take each itemset, e.g., {1, 
2, 3} and you can create the rules {1} -> {2, 3}, {2} -> {1, 3}, etc. 
You can calculate the the confidence of the rules by support(itemset) / 
This is not very efficient since the number of possible rules to check 
will be very high. That is why most algorithms only mine rules with one 
item in the RHS.

Hope that helps,

   Michael Hahsler
   email: michael at hahsler.net
   web: http://michael.hahsler.net

More information about the R-help mailing list