Generate confusion matrix like in classification learner app programmatically
9 views (last 30 days)
Show older comments
The classification learner app provided with the Statistics and Machine Learning Toolbox generates a plot of the confusion matrix with colored cells. Is it possible to generate the same plot programmatically, without passing through the app? It is very time consuming to always use the app when the number of plots to generate is high.
0 Comments
Answers (3)
Ali Farmanesh
on 29 Jun 2017
I think you can use a toolbox for solve your problem.One of this classification toolbox's (it is free) for MATLAB has been released by Milano Chemometrics and QSAR research Group. You can download the toolbox from the link below and also inform about toolbox. http://michem.disat.unimib.it/chm/download/softwares/help_classification/index.htm
Baptiste Ottino
on 8 Aug 2017
Hello Mustrum,
If you want the exact confusion matrix from the app, the path to the configuration m-file is the following:
MATLAB_R2016b.app/toolbox/stats/mlearnapp/+mlearnapp/+internal/+ui/ConfusionMatrixView.m
But rather than copying that, which could be tedious, you coud just adapt the one from the Neural Network Toolbox, if you happen to own it:
doc plotconfusion
Best of luck!
0 Comments
YT
on 14 Dec 2017
If you want fast and almost same result, then maybe it's best to use:
plotconfusion(your_confusion_matrix);
But if you want to programmatically do it yourself, in case you need multiple confusionmatrices plotted in one figure using subplot:
0 Comments
See Also
Categories
Find more on Classification Learner App 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!