WEKA: how to get the score from classifyInstance?

后端 未结 4 540
悲哀的现实
悲哀的现实 2020-12-19 17:11

I\'m using a FilteredClassifier.classifyInstance() to classify my instances in weka.

I have 2 classes (true and false) and I have many positives, so I actually need

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-19 17:38

    distributionForInstance(Instance anInstance) is the method you need. It gives you a Double array showing the confidence for each of your classes. I am using Weka 3.6. and it works well for me. If you always get the same values, your classifier is not trained well and not discriminative at all. In that case, you should always get the same class predicted. Did you balance your training set?

提交回复
热议问题