I have a CSV file where all comlumns contains numerical values except for the quality
column which contains nominal values. I want to use FP Growth Weka algorithm on the dataset. For that I need to binarize my data. In Weka I choose in the Preprocess tab: Choose->Unsupervised->attribute->NumericToBinary with attributeIndices covering all columns except for the last on (which has nominal values).
After the operation when I select the attribute in Weka's preprocess window I see that each variable indeed was converted to 0
or 1
label but 0
has 0 records count while 1
has all the records:
When I binarize the quality
variable which has nominal values:
Preprocess->Choose->unsupervised->NominalToBinary (with attributeIndex only for the quality
column) nothing happens at all.
As a result I can't use FP Growth of course. How should I binarize the data correctly to be able to use FP Growth?
These are some example rows of my data:
The original dataset can be found here.
EDIT 1: I guess because the numeric values greater than 0 but less than 1 Weka uses floor function when binarizing data that's why all values appear under 1
. So I discretized the numeric attributes and then binarized them using NominalToBinary
filter. In addition I changed my dataset from having 3 possible values for quality
to only have 0
or 1
values possible (manually binarized it). Still the FP Growth is not available in Weka. This is an excerpt from .arff output after binarization.
EDIT 2:
I managed to get FP Growth become active by selecting NumericToBinary
filter with ignoreClass=True, and selecting class: None next to Visualize All button. However I still have all attributes have all values under 1
label. I tried manually converting all decimal values to integers (because I thought in this cases Weka will not be using floor function on decimal values) but this didn't help at all.