Search code examples
machine-learningruntime-errorclassificationweka

WEKA's "Class has to be nominal if cost matrix given" error


I am trying to classify a data with 51 features with the command

DecisionTable -X 1 -S "weka.attributeSelection.GreedyStepwise -T -1.79 -N -1 -num-slots 1"

but I am getting the error

enter image description here

What does this error mean about nominal class for cost matrix?


Solution

  • As mentioned by knb, you can solve this problem by changing the non-nominal values to Nominal. You can use Multifilter to have many filters.

    • You can find the Remove filter in the Multifilter under Filters > Unsupervised > Attribute > Remove.

    • You can find the NumericToNomial Filters > Unsupervised > Attribute > NumericToNomial

    Example showing Multifilter with Remove Filter and NumericToNomial

    enter image description here

    enter image description here

    enter image description here