build_ROC_curve(modelPredictions, yValues, ..., na.rm = FALSE, yTarget = TRUE)

Arguments

modelPredictions

numeric predictions (not empty)

yValues

truth values (not empty, same length as model predictions)

...

force later arguments to bind by name.

na.rm

logical, if TRUE remove NA values.

yTarget

value considered to be positive.

Value

the ROC graph of Score (model score), Sensitivity, and Specificity. Guaranteed to have the (0, 0) and (1, 1) (1-Specificity,Sensitivity) endpoints.

Examples

sigr::build_ROC_curve(1:4, c(TRUE,FALSE,TRUE,TRUE))
#> Score Sensitivity Specificity #> 1 NA 0.0000000 1 #> 2 4 0.3333333 1 #> 3 3 0.6666667 1 #> 4 2 0.6666667 0 #> 5 1 1.0000000 0