not getting same accuracy as classifier app
3 views (last 30 days)
I train a classifier, say SVM, with data standardization & 50 fold cross validation in Classifier App GUI. I get an accuracy of 90%. Now I export the model, and run prediction on the same features that was used to train the model. The result is that I get very low accuracy (~40-50%). Shouldn't I be getting high accuracy since I'm testing my train set? Is it got something to do with standardizing the test data? or does 'm.predictFcn()' take care of standardizing test data?
Bernhard Suhm on 12 Jun 2018
The model trained inside the Learner app doesn't exactly match the exported model because the latter will be trained on the complete data set, with no evaluation data held out. But that should rather increase than decrease accuracy. You do need to ensure you have applied the same "standardization" (I assume you mean something like subtracting the mean and dividing by the standard deviation) that was applied to the "training" data, the predict function doesn't "automagically" perform such normalization, and a mismatch in that would explain the low accuracy.