draw.prc.CI: Draw Precision-Recall Curve (PRC) with confidence intervals

View source: R/yr2.R

draw.prc.CIR Documentation

Draw Precision-Recall Curve (PRC) with confidence intervals

Description

Balancing concept by Yingzhou Wu and Fritz Roth (Wu et al, unpublished) Confidence interval concept by Jochen Weile

Usage

draw.prc.CI(
  yr2,
  col = seq_along(yr2),
  lty = 1,
  monotonized = TRUE,
  balanced = FALSE,
  legend = "bottomleft",
  ...
)

Arguments

yr2

the yogiroc2 object

col

vector of colors to use for the predictors

monotonized

whether or not to monotonize the curve

balanced

whether or not to use prior-balancing

legend

the position of the legend, e.g. "bottomleft". NA disables legend

...

additional graphical parameters (see par)

Value

nothing. draws a plot

Examples

#generate fake data
N <- 100
M <- 80
truth <- c(rep(TRUE,N),rep(FALSE,M))
scores <- cbind(
  pred1=c(rnorm(N,1,0.2),rnorm(M,.9,0.1)),
  pred2=c(rnorm(N,1.1,0.2),rnorm(M,.9,0.2))
)
#create yogiroc2 object
yrobj <- yr2(truth,scores)
#draw PRC curve
draw.prc.CI(yrobj)
#draw non-monotonized PRC curve
draw.prc.CI(yrobj,monotonized=FALSE)

jweile/yogiroc documentation built on Jan. 15, 2024, 2:47 a.m.