通过提升或信心对规则进行排序是
> rules.sorted <- sort(rules, by="lift")
但是可以按两列或三列排序(即按升力,置信度和支持(按此顺序)排序)?在order()
中,我们可以使用逗号基于任意数量的列进行排序。如何在R中使用sort()
arules
包中使用它?
如果我试试这个,我会收到以下错误,
> rules.sorted <- sort(rules, by=c("lift","confidence","support"))
> Error in .subset2(x, i, exact = exact) : recursive indexing failed at level 2
修改 您可以在以下链接http://www.rdatamining.com/examples/association-rules
中找到该过程