Reputation: 1
I am trying to run apriori on my data set but get no rules. Here is what I see.
> rules <- apriori(mydata, parameter = list(supp=.01))
Apriori
Parameter specification:
confidence minval smax arem aval originalSupport support minlen maxlen target ext
0.8 0.1 1 none FALSE TRUE 0.01 1 10 rules FALSE
Algorithmic control:
filter tree heap memopt load sort verbose
0.1 TRUE TRUE FALSE TRUE 2 TRUE
Absolute minimum support count: 700
set item appearances ...[0 item(s)] done [0.00s].
set transactions ...[1335 item(s), 70000 transaction(s)] done [0.01s].
sorting and recoding items ... [11 item(s)] done [0.00s].
creating transaction tree ... done [0.00s].
checking subsets of size 1 done [0.00s].
writing ... [0 rule(s)] done [0.00s].
creating S4 object ... done [0.00s].
> inspect(rules)
Thank you in advance.
Upvotes: 0
Views: 2143
Reputation: 1466
the reason you have no rules is because of the data and not the code. What I mean with this is that the parameters you asked for (support =0.1) and the default parameter you left (confidence = 0.8) are too high for the data you have.
This is probably because your data is too heterogeneous. The solution would be to reduce the parameters. Probably it would work with something like:
rules <- apriori(mydata,parameter(list=(support=0.001,confidence=0.3)
Hope it helped!
Upvotes: 2