ItemfrequencyPlot - 显示底部频率项集的规则包
ItemfrequencyPlot - Arules package to show bottom frequency itemsets
我想查看交易数据中频率最低的项目,如何查看?
代码:
a_list <- list(
c("a","b","c"),
c("a","b"),
c("a","b","d"),
c("c","e"),
c("a","b","d","e")
)
trans <- as(a_list, "transactions")
itemFrequencyPlot(trans)
PS:我正在将它集成到一个闪亮的平台上。
您可以使用 itemFrequency()
然后排序或过滤您喜欢的频率并用 barplot()
绘制它们。
R> barplot(sort(itemFrequency(trans), decreasing=TRUE))
我想查看交易数据中频率最低的项目,如何查看?
代码:
a_list <- list(
c("a","b","c"),
c("a","b"),
c("a","b","d"),
c("c","e"),
c("a","b","d","e")
)
trans <- as(a_list, "transactions")
itemFrequencyPlot(trans)
PS:我正在将它集成到一个闪亮的平台上。
您可以使用 itemFrequency()
然后排序或过滤您喜欢的频率并用 barplot()
绘制它们。
R> barplot(sort(itemFrequency(trans), decreasing=TRUE))