问题
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:
- Go to classify tab in Weka explorer
- Click more options...
- Check output predictions
- 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:
- Make one String attribute that assigns each instance a unique ID. I have assigned the names of the documents to each of my instances.
- Generate the WEKA supported .arff file.
- 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.
- Now, as said by @Rushdi, click "More Options" on the classify tab.
- Check Output predictions on the "Classifier Evaluation Options" pop-up.
- Enter the Attribute number of the Instance ID in the "Output additional attributes" box.
- 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.)
- 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:
- Decompile the official weka.jar
- 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