I need MATLAB code to export FDR, PPV numbers.

1 次查看(过去 30 天)
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?

回答(1 个)

Drew
Drew 2023-7-26
"(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.

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by