extract.roc {fbroc} | R Documentation |
Extracts one from two paired ROC curves from a fbroc.paired.roc
object
Description
Given paired ROC curves it can be helpful to look at them in isolation as well.
This functions allows the extraction of one of the paired ROC
curves as a fbroc.roc
object without recalculating the ROC curve.
Usage
extract.roc(x, index)
Arguments
x |
Object of class |
index |
A number specifying which of the two ROC curves should be returned. Needs to be 1 or 2. |
Value
An object of class fbroc.roc
containing all data about the requested ROC curve
Note
Due to the way the predictions are reordered internally, using use.cache to save the bootstrap
results for paired ROC curves and then extracting one of the two curves will not yield the same
values as when the ROC curve is bootstrapped as a single curve using fbroc.roc
.
See Also
Examples
data(roc.examples)
example <- boot.paired.roc(roc.examples$Cont.Pred, roc.examples$Cont.Pred.Outlier,
roc.examples$True.Class, n.boot = 100)
roc1 <- extract.roc(example, 1)
roc1.equivalent <- boot.roc(roc.examples$Cont.Pred, roc.examples$True.Class,
n.boot = 100)
print(identical(roc1, roc1.equivalent)) # roc1 and roc1.equivalent will be the same
# This does not hold when use.cache = TRUE. See the note above.
[Package fbroc version 0.4.1 Index]