How to extract true positive and true negative rates from confusion matrix obtained using classification learner
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jasmina Burek
el 13 de Jul. de 2017
Comentada: Jasmina Burek
el 20 de Jul. de 2017
I used classification learner to produce confusion matrix. Large matrix does not show automatically numerical values on the figure itself. How to make matlab show all values (annotate) even if overlapping and second how can I extract information from this figure including true positive (TP), and false negative (FN) rates (without writing myself the whole code. When I export model I don't see those values in the workspace. I see only class probability and class count, but nothing that would point to FN and TP etc. Thank you for your help
0 comentarios
Respuesta aceptada
Mukul Rao
el 19 de Jul. de 2017
Hi,
I believe there is a limit of 20 classes for labels to be displayed in the confusion matrix. There is an existing enhancement request in place to clarify this in our documentation. I have updated this ticket reflect your pain point as well.
To answer your second question, you can export your model from the app and then use its "predictFcn" to evaluate its response for the training data. You can then use this result along with the true class values as inputs for the "confusionmat" function to retrieve the confusion matrix.
confusionmat(Y_actual,trainedModel.predictFcn(TrainingData__as_used_in_app))
Please note that the results will be slightly different from what you see in the Classification Learner App because the app uses 5-fold cross-validation by default. The validation scheme only affects the way that Classification Learner computes validation metrics. The final exported model is always trained using the full data set.
Más respuestas (0)
Ver también
Categorías
Más información sobre Classification Learner App en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!