rocplot | R Documentation |
Customized ROC plot
rocplot(
df,
predictions_name,
outcomes_name,
decorate_youden = TRUE,
decorate_performance = TRUE,
...
)
df |
The data frame containing the observations |
predictions_name |
Character, specifying the column name containing the predictor |
outcomes_name |
Character, specifying the column name specifying the labels |
decorate_youden |
Logical, whether to add some info about and around the Youden Index |
decorate_performance |
Logical, whether to add some info about the performance of the classifier |
... |
To be further passed to the ROCR::plot command, ensures some degree of customizability (color, add=TRUE, ...) |
A plot object, and invisibly the list of objects which can be conveniently further used
# Using the basic example from the ROCR package
library(ROCR)
data(ROCR.simple)
pred <- prediction( ROCR.simple$predictions, ROCR.simple$labels )
perf <- performance( pred, "tpr", "fpr" )
ROCR::plot( perf, main ="made with default plot function from ROCR" )
rocplot(ROCR.simple,"predictions","labels", main = "made with rocplot")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.