gg_roc: Plot AUC Curve

Description Usage Arguments Value Examples

Description

Plot AUC Curve

Usage

1
gg_roc(target, ...)

Arguments

target

A numeric binary vector (0, 1)

...

A data frame of scores, or a multiples score vectors: score1, score2, etc

Value

the plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
set.seed(1313)
n <- 5000
score <- runif(n)
score_2 <- score + runif(n)
score_3 <- score + runif(n)
target <- rbinom(n, 1, prob = score)

df <- data.frame(target, score, score_2, score_3)

gg_roc(target, score)
gg_roc(target, model = score, score_3)

library("dplyr")

gg_roc(target,  df %>% select(starts_with("score")))

jbkunst/riskr documentation built on May 18, 2019, 7 p.m.