WEKA - filtering out classes in a MultiClassClassifer

人盡茶涼 提交于 2019-12-12 03:29:59

问题


I have trained a MultiClassClassifier (tested, working) and saved it somewhere on my hard drive. Now I want to make predictions for a new sample I got. I load my application and my classifier auto loads with it. I have narrowed down the search to five 5 possible classes already for the sample, outside the classification process. This means, I know k classes, that can easily be avoided in the classification.

Is it possible to filter a MultiClassClassifier (filter out all unwanted classes) before using it?

If it is? What would be the Weka method to work with for this purpose? If not, is there an alter. solution?

I want to increase the accuracy of the classifier by narrowing down the focus on 5 classes out of n classes.

I've found how to filter Instances objects but can't seem to find a proper method for the MultiClassClassifer.

My data to manipulate with is/are my testing Instances and my MultiClassClassifier.

Thank You in advance.


回答1:


There isn't really a way to modify an existing MultiClassClassifier to exclude classes. However, depending on the underlying classifier you're using, you could try using .distributionForInstance which outputs a vector of confidence scores, one per class. You could then take the class with the highest score, ignoring the scores for the classes not in your target set.



来源:https://stackoverflow.com/questions/35901903/weka-filtering-out-classes-in-a-multiclassclassifer

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