Finding out wrongly classified instances when using WEKA

别来无恙 提交于 2019-12-09 06:07:55

问题


I am using GUI version of WEKA and I am classifying using the Naive Bayes. Can anyone please let me know how to find out which instances are misclassified.


回答1:


  1. Go to classify tab in Weka explorer
  2. Click more options...
  3. Check output predictions
  4. Click OK

Hope that helps.




回答2:


I faced this very same problem earlier and I tackle it just fine now. What I do, is the following:

  1. Make one String attribute that assigns each instance a unique ID. I have assigned the names of the documents to each of my instances.
  2. Generate the WEKA supported .arff file.
  3. Whenever you have to run a classifier on this .arff data, you will notice that you have to exclude the Instance ID attribute. If you don't do this, Weka will pop-up an error saying that the classifier cannot process String attributes. Instead of excluding, run filter StringToNominal on the InstanceID.
  4. Now, as said by @Rushdi, click "More Options" on the classify tab.
  5. Check Output predictions on the "Classifier Evaluation Options" pop-up.
  6. Enter the Attribute number of the Instance ID in the "Output additional attributes" box.
  7. Run the classifier on the whole data, excluding the Instance ID attribute. (Most classifiers have this as an option called "StartSet" in "Ranker" for example which I use along with SMO classifier.)
  8. If you've done everything properly so far, you will see all the instances listed along with their real and predicted output values and also the Instance ID which can tell you exactly which documents were incorrectly classified.

Hope this helps someone. Good Luck!




回答3:


In your output there should be a incorrectly classified section with a number and percentage, that should be it. The red box in this image is what you're looking for. Edit: Original image source here




回答4:


This works for me:

  1. Decompile the official weka.jar
  2. Search into the library the classification that you want to test for know how it works and determinate what instances are misclassified.


来源:https://stackoverflow.com/questions/10646536/finding-out-wrongly-classified-instances-when-using-weka

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