Re: about the ECLAT algorithm
Date: March 27, 2014 08:59AM
Let's say that you have a set of three transactions:
Transaction 1 : 1 2 4
Transaction 2: 1 4
Transaction 3: 1 2 5
Eclat will transform the database in a vertical database:
Item 1 : transaction1, transaction 2 transaction 3
item 2: transaction 1 transaction 3
item 4 transaction 1 transaction 2
item 5: transaction 3
If you want to combine single items to generate an itemset of size 2, then you need to perform the intersection of the tid sets.
For example, if you have 1-itemsets {item 1} and {item 2} and you want to calculate the tid set of the 2-itemset {item1, item 2}, then:
the intersection of
transaction1, transaction 2 transaction 3
and
transaction 1 transaction 3
is
transaction 1 transaction 3
Thus, the tid set of the 2-itemset {item1, item 2} is { transaction 1 transaction 3}
For the second question, if you want to print the tidsets with my source code if you are using the version of Eclat to save to file, then you would modify the method save() in the file AlgoEclat.Java
and you would replace
writer.write(node.getItemset().toString() + " #SUP: " + node.getTidset().size());
by this:
writer.write(node.getItemset().toString() + " #SUP: " + node.getTidset().size() + " #TIDSET" + node.getTidset());