Search code examples
machine-learningweka

Weka Experimenter 'Class attribute is not nominal' but data is processed from Explorer


Good Evening,

I am working on a supervised classification task. I have a big arff file full of data in the format, "text", class. There are only two classes, E and I.

I can load this data into Weka Explorer, apply the StringToWordVector with TF-IDF on it, then using LibSVM classify it and get results. But I need to use 5x2 Cross-Validation and get the Area under the ROC Curve. So I save that processed data, open up Weka Experimenter, load it in, set it to 2 folds, 5 iterations, and then set the algorithm to libSVM.

When I go to the RUN tab and press start I get the following error:

18:31:18: Started

18:31:18: Class attribute is not nominal!

18:31:18: Interrupted

18:31:18: There was 1 error

I don't know why this is happening, what exactly the error is, or how to fix it. I google this error and it is not leading me to any solutions. I am not sure where I should go from here to fix this.

I can go back to Explorer, reload in that processed file, and classify it without any issues but I need to do it in Experimenter.


Solution

  • If your class attribute is numeric (like 0,1) change it to a nominal form like true, false.