[R] Question about ROCR package
tobias.sing at gmail.com
Sun Feb 8 14:39:32 CET 2009
you can also use perf at y.values to access the slot (see
help(performance-class) for a description of the slots).
You might also want have a look at the code for demo(ROCR) and at this
On Sat, Feb 7, 2009 at 10:40 PM, Jorge Ivan Velez
<jorgeivanvelez at gmail.com> wrote:
> Hi Waverley,
> I forgot to tell you that "perf" is your performance object. Here is an
> example from the ROCR package:
> ## computing a simple ROC curve (x-axis: fpr, y-axis: tpr)
> pred <- prediction( ROCR.simple$predictions, ROCR.simple$labels)
> perf <- performance(pred,"tpr","fpr")
> # y.values
>> On Sat, Feb 7, 2009 at 3:17 PM, Waverley <waverley.paloalto at gmail.com>wrote:
>>> I have a question about ROCR package. I got the ROC curve plotted
>>> without any problem following the manual. However, I don't know to
>>> extract the values, e.g. y.values ( I think it is the area under the
>>> curve auc measure). The return is an object of class "performance"
>>> which have Slots and one of the slot is "y.values". I type the object
>>> and I can see them in screen. But I want to extract the value for
>>> further programming and computation. I did a summary of the object
>>> and it is a "S4" mode which I don't understand.
>>> Can someone help?
>>> Thanks a lot in advance.
>>> Waverley @ Palo Alto
>>> R-help at r-project.org mailing list
>>> PLEASE do read the posting guide
>>> and provide commented, minimal, self-contained, reproducible code.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help