ROC (Receiver operator curve) data from a classification random forest.

Description

The sensitivity and specificity of a randomForests classification object.

Usage

1
2
## S3 method for class 'rfsrc'
gg_roc(object, which.outcome, oob = TRUE, ...)

Arguments

object

an rfsrc classification object

which.outcome

select the classification outcome of interest.

oob

use oob estimates (default TRUE)

...

extra arguments (not used)

Value

gg_roc data.frame for plotting ROC curves.

See Also

plot.gg_roc rfsrc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## ------------------------------------------------------------
## classification example
## ------------------------------------------------------------
## -------- iris data
rfsrc_iris <- rfsrc(Species ~ ., data = iris)
#data(rfsrc_iris, package="ggRandomForests")

# ROC for setosa
gg_dta <- gg_roc(rfsrc_iris, which.outcome=1)
plot(gg_dta)

# ROC for versicolor
gg_dta <- gg_roc(rfsrc_iris, which.outcome=2)
plot(gg_dta)

# ROC for virginica
gg_dta <- gg_roc(rfsrc_iris, which.outcome=3)
plot(gg_dta)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.