xrobin / pROC

Display and analyze ROC curves in R and S+
https://cran.r-project.org/web/packages/pROC/
GNU General Public License v3.0
121 stars 31 forks source link

More inputs in coords #90

Open xrobin opened 3 years ago

xrobin commented 3 years ago

Follow-up of #67.

ci.coords should be able to accept every coordinate that coords takes.

An application would be to add error bars on PR curves

    r <- roc(aSAH$outcome, aSAH$s100b)
    coords(r, x = seq(0, 1, .1), input="recall", ret="precision")
    ci <- ci.coords(r, x = seq(0, 1, .1), input = "recall", ret="precision")
    plot(ci)
xrobin commented 3 months ago

The feature is now available in the develop branch:

r <- roc(aSAH$outcome, aSAH$s100b)
co <- coords(r, x = "all", input="recall", ret=c("recall", "precision"))
ci <- ci.coords(r, x = seq(0, 1, .1), input="recall", ret="precision")
plot(co, type="l", ylim = c(0, 1))
plot(ci, type="shape")
plot(ci, type="bars")
lines(co)