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

## ------------------------------------------------------------
## 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)

plot of chunk gg_roc.rfsrc

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

plot of chunk gg_roc.rfsrc

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

plot of chunk gg_roc.rfsrc

# Alternatively, you can plot all three outcomes in one go
# by calling the plot function on the forest object.
plot(rfsrc_iris)

plot of chunk gg_roc.rfsrc

## 
##                   all   setosa   versicolor   virginica
## Petal.Length   0.3010   0.1147       0.1079      0.1075
## Petal.Width    0.2960   0.1221       0.1068      0.0959
## Sepal.Length   0.0573   0.0221       0.0194      0.0287
## Sepal.Width    0.0066   0.0038       0.0015      0.0022