1

I used arules package and generated a set of rules which have class values as consequent. My ultimate goal is to predict the class labels of unknown data using these rules.

Now I am trying to adopt these rules to generate a decision tree as predict method in arules doesnt suit for this scinario. How can I adopt a set of rules generated by association rules to create a decision tree and predict?

I am following the example in http://www.rdatamining.com/examples/association-rules

Desired output is to predict the class label i.e either Survived = yes or no for a given unseen record using rules generated from following code

 rules <- apriori(titanic.raw,
 + parameter = list(minlen=2,              supp=0.005, conf=0.8),
 + appearance =             list(rhs=c("Survived=No",             "Survived=Yes"),
 + default="lhs"),
 + control = list(verbose=F))
  rules.sorted <- sort(rules, by="lift")
SaikiHanee
  • 849
  • 5
  • 13
  • 22
  • When asking a question you should provide some form of [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample data and desired output so that possible solutions can be tested and verified. – MrFlick Aug 03 '16 at 03:51
  • Hi MrFlick. Please see the updates – SaikiHanee Aug 03 '16 at 04:16

0 Answers0