Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Boolean attributes in Weka

Is it possible to implement boolean attributes in WEKA?

I want to implement a market basket analysis and for this I need a table such

Product_A Prod_B
Yes       No
No        Yes
Yes       Yes

and so on.

For No, or false, I can use ?, that stands for a null value in WEKA:

Product_A Prod_B
Yes       ?
?         Yes
Yes       Yes

But now I get freq. itemsets and rules like:

Product_A=Yes, Prod_B=Yes

But I only want to have

Product_A, Prod_B.

Do you know what I mean?

I found a guide about creating ARFF-Files but there aren't any boolean-datatypes.. But it would be useful to have such datatypes, or am I thinking wrong?

like image 399
mrbela Avatar asked Sep 17 '13 17:09

mrbela


1 Answers

Just use a numeric attributes with 0 and 1 for false and true. ML algorithms generally don't care about booleans, and will treat them as numbers anyway.

like image 71
Fred Foo Avatar answered Oct 09 '22 05:10

Fred Foo