roc_curve_vec {SeaVal}R Documentation

ROC curves

Description

Plot the ROC-curve for a vector of probabilities and corresponding observations.

Usage

roc_curve_vec(probs, obs, interpolate = TRUE)

Arguments

probs

vector with probabilities (between 0 and 1)

obs

vector with categorical observations

interpolate

logical. If TRUE the ROC-curve is interpolated and drawn as a continuous function. Otherwise it is drawn as a step function.

Value

a gg object

Examples

probs = seq(0,1,length.out = 5)
obs = c(FALSE,FALSE,TRUE,FALSE,TRUE)
pp = roc_curve_vec(probs,obs)
if(interactive()) plot(pp)


[Package SeaVal version 1.1.1 Index]