add_ROC_derived_columns | R Documentation |
Add ROC columns derived from sensitivity and specificity.
add_ROC_derived_columns(d, positive_prevalence)
d |
input data frame, must at lest of columns Sensitivity and Specificity |
positive_prevalence |
scalar, the prevalence of the positive class or prior odds |
extended data frame with more columns
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.