Description Usage Arguments Value Examples
Calculates a maximum-resolution Receiver Operating Characteristic (ROC) curve (considering all possible thresholds). Note that tied values are correctly handled, which is one point of pedantry many other implementations fail to satisfy.
1 | roc(y, classes)
|
y |
A numeric vector, high values of which are assumed to predict class TRUE. |
classes |
A boolean vector of the same length as |
A data.frame representing the ROC curve for the classifier
y >= t
for all possible values of the threshold t
.
Rows represent each unique point on this ROC curve, with columns
for the respective FPR and TPR of each point. Each such point
corresponds to an interval of threshold values, and a third
column, t, returns the largest value of t on the
closure of the corresponding interval. Note that:
This will include a value of Inf
for the (0,0) point on
the ROC curve.
The largest value on the closure of each interval will simply
be the largest value in each interval except for in the case of the
(1,1) point on the ROC curve, which represents an open interval from
-Inf
(all others are half-open).
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.