roc_score_vec {SeaVal} | R Documentation |
ROC score (AUC)
Description
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.
Usage
roc_score_vec(probs, obs)
Arguments
probs |
vector with probabilities (between 0 and 1) |
obs |
vector with categorical observations (as TRUE/FALSE) |
Value
numeric. The ROC score.
Examples
roc_score_vec(probs = c(0.1,0.6,0.3,0.4),
obs = c(FALSE,TRUE,TRUE,FALSE))
[Package SeaVal version 1.2.0 Index]