I tried using the apriori algorithm in the arules library for association rules mining in R. There's two thing I'd like to ask:

  1. Why are the lhs and rhs of the rules in intervals? For example U get something like this lhs : Variable1[0,4] - rhs : Variable2[0,3]

  2. How can I subset the rules extracted for a certain variable? Say I want rules for Variable 1. How can I subset the result to get rules containing that variable only?

  1. I do not recall lhs or rhs having intervals. Can you share an example?
  2. You can use the "appearance" parameter when calling apriori. You can find an example in the documentation of APappearance-class of arules or at http://r-statistics.co/Association-Mining-With-R.html under section "How to Find Rules Related To Given Item/s"
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.