如何找到与属性名称无关的频繁项集?

How to find frequent itemset irrespective of attribute name?

我有一个数据集(CSV 文件)可以使用 Apriori 算法查找频繁项集。

col1, col2, col3
bread, butter,?
coke, bread, butter

我正在为此目的使用 WEKA。输出格式如下:

...
Large Itemsets L(2):
col1=bread  col2= butter 1
col1=coke  col2= bread 1
col1=coke  col3= butter 1
col2= bread  col3= butter 1
...

但我想要的输出是:

bread, butter 2

基本上,上面的输出独立于它们所属的col。我怎样才能实现这种输出?

以不同的方式格式化您的数据。

Weka 期望 columns 是相同的产品,并且值是 t/f(对于 true,false)。然后你得到 milk=t -> butter=t.

类型的项集

请参阅 Weka 中包含的 .arff 示例。

我想我看到了一个使用您的输入格式的 ELKI 示例。