I need MATLAB code to export FDR, PPV numbers.
2 views (last 30 days)
Show older comments
I need MATLAB code to export FDR, PPV numbers.
I am running Matlab classifier app code. Everything works, except I can not export out PPV/FDR numbers. I am currently looking at confusion matrix and manually writing down PPV/FDR stats.
Does MATLAB have a code to export PPV/FDR numbers out of the classifier app?
0 Comments
Answers (1)
Drew
on 26 Jul 2023
See number (2) at the answer at https://www.mathworks.com/matlabcentral/answers/321904-how-to-export-performance-measures-from-the-classificaiton-learner-app
"(2) To export confusion matrices from Classification Learner, you can use the "Export Plot to Figure" option. Next, at the command line, with the current figure showing the confusion matrix exported from Classification Learner, use "cm=gca;" to get a variable "cm" representing the ConfusionMatrixChart object. From the ConfusionMatrixChart object, the metrics of interest (TPR, FNR, PPV, FDR) for the primary matrix can be accessed from the NormalizedValues property. Alternately, to reproduce Classification Learner confusion matrix plots at the command line, use confusionchart (introduced in 18b). Set the Normalization, RowSummary, and ColumnSummary properties to get the metrics of interest."
See the answer linked above for an image and some example code.
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!