weka.core.UnassignedClassException: Class index is negative (not set)!

tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Weka in Java "Class index is negative" error

    Stack Overflow | 9 months ago | Kerim Caner Tümkaya
    weka.core.UnassignedClassException: Class index is negative (not set)!

    Root Cause Analysis

    1. weka.core.UnassignedClassException

      Class index is negative (not set)!

      at weka.core.Instances.numClasses()
    2. weka-dev
      Evaluation.<init>
      1. weka.core.Instances.numClasses(Instances.java:915)
      2. weka.classifiers.evaluation.Evaluation.<init>(Evaluation.java:461)
      3. weka.classifiers.evaluation.Evaluation.<init>(Evaluation.java:441)
      4. weka.classifiers.Evaluation.<init>(Evaluation.java:211)
      4 frames
    3. weka1
      Weka1.main
      1. weka1.Weka1.classify(Weka1.java:84)
      2. weka1.Weka1.main(Weka1.java:193)
      2 frames