confusion matrix vs roc 100%

3 次查看(过去 30 天)
Hello
when i plot roc im expecting straight line to top left (point(0,1) and then to top right(1,1) as mine confusion matrix was 100%
why im getting staright line as below
expected

采纳的回答

Image Analyst
Image Analyst 2020-4-1
编辑:Image Analyst 2020-4-1
Why do you think you'd get any more points on the ROC curve than 1 from a single confusion matrix? You won't. One confusion matrix will give you one point on the curve. This is because the sum of the columns in a row (not including the column on the diagonal) of your confusion matrix gives you exactly one false positive rate, not a whole bunch of them even though you analyzed a whole bunch of images to get that confusion matrix. So you get one point on the ROC curve. Then you have to change your algorithm parameters and run the test again and get another point, presumably with different false positive rate this time. Then, to build up the curve by getting a bunch of points on it, you need to repeat that (changing your parameters) until you get as many points along the curve as you want.
Your false positive rate is always 0 and you have just one point on it. If you want, you can add (0,0) and (1,1) to make the L shaped curve, but there's no requirement that your experiment will ever have those points. It's possible that with the given data, no matter what you do you'll never get 100% true positives, though you did here in what is probably a very noise-free, synthetic example, not a real world, noisy data set.

更多回答(0 个)

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by