plot_roc.SuperLearner: Plot a ROC curve from cross-validated AUC from SuperLearner

Description Usage Arguments Value References Examples

View source: R/plot_roc.SuperLearner.R

Description

Plots the ROC curve for a single learner from a SuperLearner object, defaulting to the minimum estimated risk learner. Based on code by Alan Hubbard.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'SuperLearner'
plot_roc(
  x,
  y = x$Y,
  learner = NULL,
  title = "SuperLearner cross-validated ROC",
  subtitle = NULL,
  digits = 4,
  ...
)

Arguments

x

SuperLearner object

y

Outcome vector if not already included in the SL object.

learner

Which learner to plot (numeric index or character string). Defaults to minimum risk learner.

title

Title to use in the plot.

subtitle

TBD.

digits

Digits to use when rounding AUC and CI for plot.

...

Any additional unused arguments, due to the auc_table generic.

Value

List with plotted AUC & CI, table of AUC results for all learners, and the name of the best learner.

References

LeDell, E., Petersen, M., & van der Laan, M. (2015). Computationally efficient confidence intervals for cross-validated area under the ROC curve estimates. Electronic journal of statistics, 9(1), 1583.

Polley EC, van der Laan MJ (2010) Super Learner in Prediction. U.C. Berkeley Division of Biostatistics Working Paper Series. Paper 226. http://biostats.bepress.com/ucbbiostat/paper266/

Sing, T., Sander, O., Beerenwinkel, N., & Lengauer, T. (2005). ROCR: visualizing classifier performance in R. Bioinformatics, 21(20), 3940-3941.

van der Laan, M. J., Polley, E. C. and Hubbard, A. E. (2007) Super Learner. Statistical Applications of Genetics and Molecular Biology, 6, article 25. http://www.degruyter.com/view/j/sagmb.2007.6.issue-1/sagmb.2007.6.1.1309/sagmb.2007.6.1.1309.xml

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(SuperLearner)
library(ck37r)

data(Boston, package = "MASS")

set.seed(1)
sl = SuperLearner(Boston$chas, subset(Boston, select = -chas),
                  family = binomial(), SL.library = c("SL.mean", "SL.glm"),
                  cvControl = list(V = 2))

sl

plot_roc(sl, y = Boston$chas)

ck37r documentation built on Feb. 6, 2020, 5:09 p.m.