rocplot: Customized ROC plot

View source: R/ROCking.R

rocplotR Documentation

Customized ROC plot

Description

Customized ROC plot

Usage

rocplot(
  df,
  predictions_name,
  outcomes_name,
  decorate_youden = TRUE,
  decorate_performance = TRUE,
  ...
)

Arguments

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, ...)

Value

A plot object, and invisibly the list of objects which can be conveniently further used

Examples

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

imbeimainz/IMBEImisc documentation built on Nov. 14, 2024, 1:22 p.m.