Search code examples
machine-learningweka

How to compress class values in WEKA explorer


Hello I am new to WEKA and am using weka 3.6.10.

Sorry if the answer to this question is something obvious.

I have a dataset containing 10 attributes and one decision class. Decision class is composed of values {1,2,3,4}, is there a way to change configuration so that the values would be considered as {1} and {2,3,4}(binary) rather than each of the values separately without modifying the other attributes? I had a look at the WEKA filter but did not find anything useful.

Thanks guys


Solution

  • Use an Unsupervised Attribute filter, e.g. the NumericToBinary filter. In the topmost field of the configuration dialog, enter the posistion of the "Decision class" attribute. If it is in the 8th column, enter 8.

    The filter will create "dummy variable" columns for each unique value of this attribute. If there are 4 unique values, after applying this filter your dataset will have 4 additional columns. Remove 3 of them.