The confidence level of each specific instance in WEKA?

六月ゝ 毕业季﹏ 提交于 2019-12-11 15:04:12

问题


I'm new to WEKA and machine learning in general.

I have a test set with about 6500 instances. I have a model that has already been trained with a training set. Once I run the test set through the saved model, is there a way I can extract the confidence level of each specific instance? By confidence level, I mean a numerical value that expresses the probability that the classifier has classified a specific instance correctly. I want this confidence number for each instance in the file. Is there a way to do that?


回答1:


Using the command line interface, use the -p argument (see here). The example shown in the reference:

java weka.classifiers.bayes.NaiveBayes -K -t soybean-train.arff -T soybean-test.arff -p 0

resulting with:

0 diaporthe-stem-canker 0.9999672587892333 diaporthe-stem-canker
1 diaporthe-stem-canker 0.9999992614503429 diaporthe-stem-canker
2 diaporthe-stem-canker 0.999998948559035 diaporthe-stem-canker

i.e. predicted class and confidence.



来源:https://stackoverflow.com/questions/15487247/the-confidence-level-of-each-specific-instance-in-weka

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!