association rule learner

I am new to KNIME , I am trying to run association rule learner , I loaded all the data from CSV file with file reader and connected to BitVector , the output column vector is  ? , there for I cannot run the association rule learner

Any idea what I am doing wrong

Hi,

can you give some more information about the data and the settings of the BitVector node.

Thanks,

Tobias

Thank you for your response,

Data , is CSV file , see structure below,

COL1      COL2      COL3      COL4

citrus fruit           semi-finished bread       margarine           ready soups

tropical fruit       yogurt   coffee 

whole milk                                        

pip fruit                yogurt   cream cheese    meat spreads

 

 I am loading the data with file reader, it shows as one column when the values are separated with comma

Create bit vector parameters, multiple string column, pattern:*.*

The vector results show 0 when executing

Association rule learner with the default parameters

Thank you for your response,

Data , is CSV file , see structure below,

COL1      COL2      COL3      COL4

citrus fruit           semi-finished bread       margarine           ready soups

tropical fruit       yogurt   coffee 

whole milk                                        

pip fruit                yogurt   cream cheese    meat spreads

 

 I am loading the data with file reader, it shows as one column when the values are separated with comma

Create bit vector parameters, multiple string column, pattern:*.*

The vector results show 0 when executing

Association rule learner with the default parameters

Hi,

the string column option of the create bit vector node is to create a bit vector from data that looks like the following

Item1 Item2 Item3
t f t
f f t

Where Item1 and Item3 belong to the first transaction.

Your data can be treated as a collection within KNIME which the association rule nodes can also handle so you do not need to convert the collection into a bit vector but you can.

Please find attached a demo workflow that demonstrates how to convert your data into a bit vector or collection column in order to find association rules. It also shows how to convert string columns into a bit vector.

Bye,

Tobias

Thank You!!

In regards to my last question, once I have the association rules results what is the best way to export to a table

I used XLS writer and Table writer and could not export the antecedent field

Hi,

the antecedent field is a collection field which is not supported by the csv or Excel writer nodes. You first have to reformat it in order to write the result. I have adapted the previous workflow to demonstrate three different ways to adapt the collection in order to write it to csv or Excel.

Bye,

Tobias