Reading Data (Association Rules)

This is my first post. I've been playing with Knime for a few days and I think it is a wonderful product. Thanks to the authors.

My question is with regards to Association Rules.

I have been able to read a binary matrix, transform it with the Bitvector Generator and produce the association rules with the ARLearner.

Where I have failed is when I try to read a "transaction, item" file of the following form:

tid, item
1, banana
1, pear
2, banana
2,water
2,soda
3,soda
3,banana

I read the data ok, but when I try to convert it using the bitvector gen I'm lost. I've selected the column "item" as String column to be parsed, selected "bit" representation but when I run the learner I get no output. Any help will be appreciated.

Hi earmijo,

for this kind of input format it is indeed a bit more tricky to create the bitvectors. But, of course, it is possible.

1) read in the data
2) take the Pivoting node and configure it to have pivot column the "item" column and the group column the "tid" column.
3) take the output as the input for the BitvectorGenerator. Choose "numeric input" and threshold = 1 (these are the standard settings, so you don't have to change anything)
4) with the example you gave this will lead to to the resulting bitvectors:

tid, bitvector
1: 1100
2: 1011
3: 1001

Hope that helped.

Regards,

Fabian

Thanks a lot for your suggestion, Fabian. It works perfectly.

Ernesto

Hello, I tryed to do the same. But my Pivot node is getting me a `No aggregation columns selected`.

Any tips?