In WEKA, when I try to debug the code with an instance that has to be classified with a trained model using SVM, I see that first I get into classifyInstance() to classify a test instance, and then this method calls distributionforinstance() method. There, inside the distributionforinstance() method, I see that we make a call back to classifyinstance() method.
Isn’t this a chicken-egg kind of problem where these two methods are calling back each other?
What is happening out here?
The comment of Rekin is correct:
If you just derived from
Classifier, you inherited the default implementations ofclassifyInstance()anddistributionforinstance(). You need to implement at least one of the two for it to work.When you debug your code, it may be that the debugger somehow jumps in the abstract class
Classifierinstead of the specific SVM implementation.