Question

I've trained a model that distinguishes between two classes A and B. At prediction time, I want to access the prediction score. The problem is that I always get a perfect score of 1, which I find strange.

The command line:

java weka.classifiers.meta.FilteredClassifier -T test.arff -l model -p 0

The first lines of the output:

=== Predictions on test data ===

inst#     actual  predicted error prediction
    1      1:A        2:B     +      1 
    2      1:A        1:A            1 
    3      2:B        1:A     +      1 
    4      2:B        2:B            1 
    5      2:B        2:B            1 
    6      1:A        1:A            1 
    7      1:A        1:A            1 
    8      1:A        1:A            1 
    9      2:B        2:B            1 
   10      1:A        1:A            1 
Was it helpful?

Solution

To have the model print out the "correct" prediction values, I had to add the option -M during training.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top