cintervalplot2: cintervalplot2

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Just a helpful wrapper that demonstrates how to make a confidence-interval plot from raw probability-outcome data, using metric functions x and y.

Usage

1
2
cintervalplot2(pred, actual, x, y, draws = 100, res = 0.1,
  parallel = FALSE)

Arguments

pred

Vector of predictions

actual

Vector of outcomes

x

The X dimension of the metric curve.

y

The Y dimension of the metric curve.

draws

Number of times to randomly sample the data for bootstrapping. Larger numbers yield better results, but also increase runtime.

res

Resolution of ROC thresholds. A float between 0 and 1.

parallel

Boolean. Run in parallel? Uses ncores - 1 CPU cores.

Value

A list containing results and a ggplot object.

Examples

1
2
3
4
# To make a ROC plot with confidence intervals: 
testdata <- examplePredictions() 
cintervalplot(testdata$pred, testdata$actual, fallout, recall,
              draws = 1000, res = 0.01, parallel = TRUE)

Peder2911/evallib documentation built on Dec. 18, 2019, 2:41 a.m.