roc_score_vec | R Documentation |
Calculates the area under curve (AUC) or ROC-score from a vector of probabilities and corresponding observations. Formula (1a) from Mason&2018 is used in the calculation, corresponding to trapezoidal interpolation. This is mostly an auxiliary function for the ROCS function, but also used in the ROC-diagram function, where the AUC is added to the diagrams.
roc_score_vec(probs, obs)
probs |
vector with probabilities (between 0 and 1) |
obs |
vector with categorical observations (as TRUE/FALSE) |
numeric. The ROC score.
roc_score_vec(probs = c(0.1,0.6,0.3,0.4),
obs = c(FALSE,TRUE,TRUE,FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.