[R] how to change number of itemes appeare in right-hand-side of the rule with apriori in R(arules)?
omranian at uni-potsdam.de
omranian at uni-potsdam.de
Thu Feb 18 11:27:00 CET 2010
Hi All,
I use arules library, and try to create an association rules for this
transaction file:
a,c,f,3,4,5
b,e,1,2,4
a,c,e,f,1,3,4,5
d,5
b,c,e,f,1,2,3,4
a,c,e,f,1,3,4,5
b,c,e,f,1,3,4
b,e,1,2,4
a,c,e,f,1,3,4,5
a,b,c,e,f,1,3,4
a,c,d,f,3,4,5
I want to get the rule such:
{c,e,f}=> {3,4,5}
I used this command:
ar=apriori(tr, parameter=list(support=.4, confidence=0.8, maxlen=11),
appearance
=list(lhs=c("a","b","c","d","e","f"),rhs=c("1","2","3","4","5")))
and I just get the rule such:
{c,e,f} => {3}
{c,e,f} => {4}
and the number of items appear in the right hand side of the rules is
always 1.
but I want to see more than 1 item in the right hand side of the rules
such left hand size.in the left hand side I can see 1, 2 or 5 item but
in the rhs just one. I need to have more than 1 item in rhs.
thanks a lot
Nooshin
More information about the R-help
mailing list