I work on a dataset with numeric values.The class labels has also numeric values.I made the 6 numeric class labels into one witch contain values like e.g happy_pleased. I want to insert the new .arff file into weka but i have a problem with the class @attribute as i declare it as nominal. Witch is the right type to declare the class label? I tried nominal but nothing happened


1 Answer 1


You need to list the set of nominal values for the class in the arff file, comma-separated and enclosed in curly brackets {}. Here's an example:


@ATTRIBUTE sepallength  REAL
@ATTRIBUTE sepalwidth   REAL
@ATTRIBUTE petallength  REAL
@ATTRIBUTE petalwidth   REAL
@ATTRIBUTE class    {Iris-setosa,Iris-versicolor,Iris-virginica}

In your case, Iris-setosa,Iris-versicolor,Iris-virginica would be replaced with happy_pleased,...

If this still doesn't work, you can tell WEKA which attribute is the class in the explorer by choosing the correct attribute in the drop-down list above the histogram in the bottom right corner.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.