plotlyROC: Use 'plotly' to produce a ROC plot.

View source: R/ROC.R

plotlyROCR Documentation

Use plotly to produce a ROC plot.

Description

Note: any arrange_ warning is a version incompatibility between plotly and dplyr.

Usage

plotlyROC(
  d,
  predCol,
  outcomeCol,
  outcomeTarget,
  title,
  ...,
  estimate_sig = FALSE
)

Arguments

d

dataframe

predCol

name of column with numeric predictions

outcomeCol

name of column with truth

outcomeTarget

value considered true

title

character title for plot

...

no unnamed argument, added to force named binding of later arguments.

estimate_sig

logical, if TRUE estimate and display significance of difference from AUC 0.5.

Value

plotly plot

See Also

ROCPlot

Examples


if(FALSE && requireNamespace("plotly", quietly = TRUE)) {
   if (requireNamespace('data.table', quietly = TRUE)) {
	   # don't multi-thread during CRAN checks
		   data.table::setDTthreads(1)
   }
   set.seed(34903490)
   x = rnorm(50)
   y = 0.5*x^2 + 2*x + rnorm(length(x))
   frm = data.frame(x=x,yC=y>=as.numeric(quantile(y,probs=0.8)))
   plotlyROC(frm, 'x', 'yC', TRUE, 'example plot', estimate_sig = TRUE)
}



WinVector/WVPlots documentation built on April 23, 2024, 4:51 a.m.