## ------------------------------------------------------------
## classification example
## ------------------------------------------------------------
#iris_rf <- rfsrc(Species ~ ., data = iris)
data(iris_rf, package="ggRandomForests")
# ROC for setosa
ggrf <- gg_roc(iris_rf, which.outcome=1)
plot.gg_roc(ggrf)
# ROC for versicolor
ggrf <- gg_roc(iris_rf, which.outcome=2)
plot.gg_roc(ggrf)
# ROC for virginica
ggrf <- gg_roc(iris_rf, which.outcome=3)
plot.gg_roc(ggrf)
# Alternatively, you can plot all three outcomes in one go
# by calling the plot function on the full forest.
plot.gg_roc(iris_rf)
Run the code above in your browser using DataLab