powered by
Plot the ROC-curve for a vector of probabilities and corresponding observations.
roc_curve_vec(probs, obs, interpolate = TRUE)
a gg object
vector with probabilities (between 0 and 1)
vector with categorical observations
logical. If TRUE the ROC-curve is interpolated and drawn as a continuous function. Otherwise it is drawn as a step function.
probs = seq(0,1,length.out = 5) obs = c(FALSE,FALSE,TRUE,FALSE,TRUE) pp = roc_curve_vec(probs,obs) if(interactive()) plot(pp)
Run the code above in your browser using DataLab