Data Input in Apriori Node (for rule association)

Hi working in a web usage mining proyect, and i have a problem with the data input in the Apriori node..well, i have transactions of this kind:

obs: the numbers represents a code of a web page (example : products/mouse ->12)

Session 1: 12 14 16
Session 2: 12 16 23 45

So, i would like to know how i can represents this numbers in a correct data input for

Apriori Node, because i need extract associations rules from this data...


please help mee =)

Hi acuevas,

The Weka Apriori node can handle only non-numeric columns. In seems that your trying to input integer values. Within the dialog the node should complain about "incompatible column types". The solution is pretty easy, you can use the Number To String node and convert all integer columns into strings before you apply the Weka Apriori node.

Regards, Thomas

thanks for your answer Tomas; I did that and it works but with a little data because when I use a huge number of transactions (total=79.300) I  have this message error in the Apriori node : Aprirori cannot handle string attributes!! so now I don´t what its the problem now.... if you can help me please :) im desesperated with this proyect..


Regards! and thanks again!

Hi acuevas,

I am not sure, I understand the problem: when increasing the number of rows you get an error that the Apriori node can't handle string attributes, is this correct? Can you please check again, if all columns have the same type... Can you shortly sketch how the table structure looks like?

Thanks, Thomas

Hi Tomas, look i have this transactional format for Apriori:

tran  cod
1      12
1      12
2      18
2      19
2      234
...     ...

there are like 65.000 transactions where each has related  diferents codes ( 1 <code < 2600). When I read de file.csv there is no problems with this (I use "Number to String" to transform the number attributtes in string attributes), but when Im going to use the Apriori Node, this fail and send me this error messagge:

Col0: Apriori:cannot handle string attributes,
Col1: Aprirori: cannot handle string class!

And i have tried to work with numeric attributes but when I do this, Apriori Node send another error:

Col0: Apriori:cannot handle numeric attributes,
Col1: Aprirori: cannot handle numeric class!

So I really confused!!! I don´t know what can I do,, please help me :(





Hi, I am facing the same problem of not accepting neither number nor strings with Weka Apriori. Any help will be appreciated.


Have you tried do that with Association Rule Learner node in KNIME?, it is pretty easy. All you need is a base with just two columns, one with de number of transaction and other with the product, just acuevas shows. To obtain the basket you have to use a Group by node and then connect Association Rule Learner node.

hopefully will result.


Hi Gabriel_Cornejo, I am also trying to use apriori algorithm in Knime so I have just seen that Association Rule Learner node but how do you configure for apriori or FP-growth?

I set up some working examples of Rule Induction nodes with some descriptions and links to additional resources (at the end of the first link). Maybe you explore them.

If you have a specific dataset that you would want to discuss maybe it is best to open a new thread and describe what you are looking for.