0

I am using Weka for my project. I have two datasets:

  1. train.arff -> 20 attributes and 1 class
  2. test.arff -> 20 attributes and the class is labeled as "?"

I trained the model by percentage split and save the model into NaiveBayes.model. Then I load the model, select the Supplied test set, checked Output Predictions and re-evaluate the model based on current test set.

The result shows:

=== Predictions on test set ===

inst#,    actual, predicted, error, probability distribution

=== Summary ===

Total Number of Instances                0     

=== Detailed Accuracy By Class ===

               TP Rate   FP Rate   Precision   Recall  F-Measure   ROC Area  Class
                 0         0          0         0         0          ?        6.0
                 0         0          0         0         0          ?        5.0
                 0         0          0         0         0          ?        7.0
                 0         0          0         0         0          ?        4.0
                 0         0          0         0         0          ?        2.0
                 0         0          0         0         0          ?        1.0
                 0         0          0         0         0          ?        3.0
                 0         0          0         0         0          ?        NA
Weighted Avg.  NaN       NaN        NaN       NaN       NaN        NaN    

But actually, I have 2000 records in test.arff.

Can anyone help with this? Thank you!

Wei Xu
  • 1,629
  • 2
  • 19
  • 31
  • 1
    If you are using the gui, in the classify tab I would select "More options" and enable "Output predictions". This might give you some insight if it is actually predicting the test instances. I suspect it is, but is not reporting results because it does not know if its prediction is correct or not (because of the question marks) – Walter Dec 27 '14 at 12:55
  • possible duplicate of [Weka ignoring unlabeled data](http://stackoverflow.com/questions/16432121/weka-ignoring-unlabeled-data) – Sentry Dec 27 '14 at 15:27

1 Answers1

0

Like Walter already pointed out, Weka needs to know the actual class to tell you how good it is. If you want to reevaluate your model, the class labels in the test set must not be set to unknown.

See this question and answer, it should help you. If not, tell us why and we try to figure it out.

Weka ignoring unlabeled data

Community
  • 1
  • 1
Sentry
  • 4,102
  • 2
  • 30
  • 38