# How to plot ROC curve?

8 views (last 30 days)

Show older comments

I have dataset which I classified using 10 different thresholds. Then I evaluated true and false positive rate (TPR, FPR) to generate ROC curve. However, the curve looks strange. Did I evaluated the curve correctly? Below is the code which I used to generate ROC curve.

TPR=[0.214091009346534 0.231387608987612 0.265932891531049 ...

0.324782536928746 0.407704239947213 0.497932979272465 ...

0.566189022386499 0.587833185570207 0.546182718263242 ...

0.434923996561788];

FPR=[0.006017495627892 0.008669605012233 0.013377312018797 ...

0.022621821298088 0.039994426565193 0.069264094928662 ...

0.108694153334795 0.148784394110204 0.178634096117665 ...

0.194756822274831];

plot(FPR,TPR);

##### 2 Comments

Image Analyst
on 7 Apr 2017

Cretu, please explain why believe the last two points are to the right of the 0-to-1 diagonal:

### Accepted Answer

Thorsten
on 25 Nov 2015

##### 9 Comments

Natsu dragon
on 3 Feb 2018

Edited: Natsu dragon
on 3 Feb 2018

### More Answers (0)

### See Also

### Categories

### Community Treasure Hunt

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

Start Hunting!