gg_roc.rfsrc | R Documentation |
The sensitivity and specificity of a randomForest classification object.
## S3 method for class 'rfsrc'
gg_roc(object, which_outcome, oob, ...)
object |
an |
which_outcome |
select the classification outcome of interest. |
oob |
use oob estimates (default TRUE) |
... |
extra arguments (not used) |
gg_roc
data.frame
for plotting ROC curves.
plot.gg_roc
rfsrc
randomForest
## ------------------------------------------------------------
## classification example
## ------------------------------------------------------------
## -------- iris data
rfsrc_iris <- rfsrc(Species ~ ., data = iris)
# 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)
## -------- iris data
rf_iris <- randomForest::randomForest(Species ~ ., data = iris)
# ROC for setosa
gg_dta <- gg_roc(rf_iris, which_outcome=1)
plot(gg_dta)
# ROC for versicolor
gg_dta <- gg_roc(rf_iris, which_outcome=2)
plot(gg_dta)
# ROC for virginica
gg_dta <- gg_roc(rf_iris, which_outcome=3)
plot(gg_dta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.