Plotting ROC curve from confusion matrix
Mostrar comentarios más antiguos
I have used knn to classify 86 images into 2 classes. I have found the confusion matrix and accuracy using matlab commands confusionmat and classperf. How do I find the ROC curve? I know it is a ratio of true positive rate and false positive rate at all possible thresholds, but how do I calculate it when I only have confusion matrix to play with? I have banged my head for weeks over theory of ROC but still am no where close to actually plotting it. Please if someone could guide me with respect to plotting it on matlab and not the theory behind it, that would be great.
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 3 de Nov. de 2016
0 votos
You can't. One confusion matrix can get you only one point on the ROC curve. To get other points, you'd have to adjust other things in your algorithm (like threshold or whatever) to get different true positive rates (different confusion matrices). For example, you'd have to run your algorithm on different set of images, or take subsets of the one you have (set of 86 images) as a worst case.
3 comentarios
farheen asdf
el 4 de Nov. de 2016
Image Analyst
el 4 de Nov. de 2016
I don't know. I'm not familiar with ann.
Greg Heath
el 22 de Dic. de 2017
The typical ROC is obtained FOR A SINGLE CLASS vs ALL OTHER CLASSES by varying the classification threshold.
However, when there are only two classes, one ROC will suffice.
Hope this helps.
Greg
Categorías
Más información sobre Detection en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!