add_ROC_derived_columns: Add ROC derived columns.

Description Usage Arguments Value Examples

View source: R/ROC.R

Description

Add ROC columns derived from sensitivity and specificity.

Usage

1
add_ROC_derived_columns(d, positive_prevalence)

Arguments

d

input data frame, must at lest of columns Sensitivity and Specificity

positive_prevalence

scalar, the prevalence of the positive class or prior odds

Value

extended data frame with more columns

Examples

1
2
3
d <- data.frame(pred = 1:4, truth = c(TRUE,FALSE,TRUE,TRUE))
roc <- build_ROC_curve(d$pred, d$truth)
add_ROC_derived_columns(roc, mean(d$truth))

sigr documentation built on June 12, 2021, 9:07 a.m.