PDA

View Full Version : Change the attribute order with Weka



francy_faraone
10-25-2007, 06:58 AM
I don' t know how to change the order of the attributes listed in the Preprocess tab of Weka, because I want to change the class. I tried the filter Reorder, but I haven't understood how it works.

Thank you.

Maria Francesca.

Mark
10-25-2007, 08:15 PM
You don't need to change the order of the attributes in the Preprocess panel of the Explorer if all you want to do is use an attribute other than the last one as the class. In the Preprocess panel there is a drop-down box labeled "Class" in the lower right-hand corner (just above the histogram display). You can use this to set the class for the purposes of pre-processing (filters, visualization etc.). The Classifier panel has its own drop-down box for selecting the class attribute.

Cheers,
Mark.

francy_faraone
10-26-2007, 06:48 AM
I need to change the order of the attributes because I use the Experimenter (in the GUI chooser), where I cannot change the class attribute as you told me.
This is the reason for which I want to change the attribute order in the Preprocess tab of the Explorer, so that I can have the right class to put in the Experimenter.

Thanks a lot for your replay.

Mark
10-28-2007, 08:03 PM
OK, I understand. The Reorder filter is easy to use. In the attributeIndices text box, specify the order of the attributes for the new data set. Eg, for the iris data (has 5 attributes), the following places the first attribute at the end:

-R 2-last,1

NOTE: the range string must not contain any spaces (you will see a popup dialog in the Explorer if it has problems parsing your range string).

Cheers,
Mark.