# How to plot ROC curve with TP, FP and FN alone with different thresholds?

I want to plot a ROC for my detection algorithm which is used to detect features in image. I had obtained true positive, false positive and false negative from the algorithm. There is no true negative in my case.

   I had run the algorithm for 6 images so i got 6 number of TP,FP and FN. With


this how can i plot the ROC curve.

Threshold 1

TP    FP    FN
1066  70    116
1176  67    201
890   42    129
1040  69    74
677   88    94
1284  73    123


Threshold 2

TP  FP  FN
446 41  55
180 15  42
221 16  62
304 23  56
170 39  23
310 31  74


I am new to ‘R’, so I also need to know how to plot it in R?

-
(-1) This question makes no sense. Please reread the definition of the ROC-curve and edit / delete your question appropriately. The important point is in the first sentence, i.e. as its discrimination threshold is varied. By reporting the (although not complete) confusion matrix for all your images, you already have chosen a threshold. – steffen Aug 11 '12 at 9:52
thank you for the edit, but the format is broken now. Can you please please fix it ? I suggest to use the code formatting ("{}" in the options above the textfield) to format the table. Another question: It is absolute mandatory that the answer uses SPSS, Sigmaplot or origin ? What about R ? – steffen Aug 12 '12 at 18:24
Sorry for bothering you, but I am afraid there is still something wrong. How is the data for the two thresholds related ? First I have assumed that the first row of Threshold1 corresponds to the first row of Threshold2, both representing the first image. But then I wonder why TP+FN=All Positives are not the same for both classes ? Can you please clarify ? Maybe helpful: confusion matrix (scroll down) – steffen Aug 13 '12 at 11:51
from the comment to sebp's answer I have recognized you just need the codez ... this is not what the site has been created for. Our main goal is education and building knowledge, not doing the work for you. I want you to know that the question still might be answered, but probability might not be high. – steffen Aug 13 '12 at 12:01