R中的arules增加maxlen
问题描述:
library(arules)
rules <- apriori(Imp7)
inspect(rules)
rules <- apriori(Imp7,parameter = list(minlen=2, supp=0.005, conf=0.8), appearance = list(rhs=c("Status.b=D", "Status.b=G"), default="lhs"), control = list(verbose=F))
rules.sorted <- sort(rules, by="lift")
inspect(rules.sorted)
这是我试图运行的代码。我在R中是一个初学者。当我尝试运行rules <- apriori(Imp7)
时,代码行显示我:Mining stopped (maxlen reached). Only patterns up to a length of 10 returned!
有没有方法可以更改最大值len?R中的arules增加maxlen
它有21列105行数据。
任何帮助表示赞赏!
答
阅读?“AP参数级”关于选项。
rules <- apriori(Imp7, parameter = list(maxlen=20))