How Matlab Classification Learner calculate a model accuracy
Show older comments
Hi, here is my question: I trained a series of classifiers using Matlab Classification Learner and then I tried to replicate the same results writing my own code. I'm pretty sure I set all the parameters exactly the same way and used the same functions. I checked by generating code from the Classification Learner and making sure that my code had the same parameters. Now the thing is every time I train a model with the same data set, Matlab Classification Learner gives me the same accuracy, while when I do the same using my own code, the accuracy values change. This is due to the randomness associated with the cross validation step. So I assume that Matlab Classification Learner is running the cross validation step multiple time and then presenting the average accuracy of the cross validation. Am I right? Interestingly enough, if I use the code generated through the GUI and run it several times, even there the accuracy changes every time. So my question is how does the GUI get a constant accuracy? How many times does it average the cross validation results, if that's the case?
Thanks,
Accepted Answer
More Answers (0)
Categories
Find more on Classification Ensembles in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!