How Matlab Classification Learner calculate a model accuracy
3 ビュー (過去 30 日間)
古いコメントを表示
Alessandro Napoli
2016 年 9 月 23 日
コメント済み: Lydia Ashton
2016 年 12 月 15 日
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,
0 件のコメント
採用された回答
Luuk van Oosten
2016 年 9 月 23 日
Dear Alessandro,
Reproducible results can be obtained if one uses a SubStream and RandStreams while building a classifier. I suspect that the classificationLearner does incorporate a fixed number stream, but is not incorporated in the GUI.
See for example in the documentation about TreeBagger how you can obtain reproducible results; indicated under Description> 'Options'.
3 件のコメント
Lydia Ashton
2016 年 12 月 15 日
Do you know of any documentation on how to control this randomness for classification models using logistic regression? Thanks!
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Classification Ensembles についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!