Skip to content
Prev 174198 / 398506 Next

Prediction-class ROCR

Regina,

to get a simple ROC curve, use the following sequence of commands:
pred <- prediction(predictions, labels)
perf <- performance(pred, "tpr", "fpr")
plot(perf)
In the first line, 'predictions' are the raw predictions (usually
numerical) of your classifier, and labels (as you correctly guessed)
the true (binary) classes of your items. The true positive and false
positive rates _at various cutoffs_ are then calculated from the raw
predictions. The purpose of ROCR is to obtain these (and other) rates
--- if you already have them, I don't understand from your email what
else you want.

Just in case you are uncertain about the overall framework of
classification, take a look at this tutorial:
Fawcett, T. (2003):  ROC graphs: Notes and practical considerations
for data mining researchers
http://www.hpl.hp.com/techreports/2003/HPL-2003-4.pdf

The following slide deck also contains a brief introduction of the
framework, as well as usage examples of ROCR:
http://rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt

Hope that helps,
  Tobias



On Thu, Mar 19, 2009 at 3:01 AM, Regina Beretta Mazaro
<rberettam at hotmail.com> wrote: