plotCCVal: Plot confidence curve for (uE,E) set. New version with...

View source: R/plotConfidence.R

plotCCValR Documentation

Plot confidence curve for (uE,E) set. New version with improved validation.

Description

Plot confidence curve for (uE,E) set. New version with improved validation.

Usage

plotCCVal(
  E,
  uE,
  stat = ErrViewLib::rmse,
  probref = FALSE,
  rep_probref = 1000,
  showUk = FALSE,
  plot = TRUE,
  score = FALSE,
  nBoot = 5000,
  parallel = FALSE,
  cl = NULL,
  col = 5,
  type = c("l", "p"),
  add = FALSE,
  xlab = "k% discarded",
  xlim = NULL,
  ylab = "RMSE",
  ylim = NULL,
  title = NULL,
  label = 0,
  showLegend = TRUE,
  legend = NULL,
  legLoc = "bottomleft",
  gPars = ErrViewLib::setgPars()
)

Arguments

E

(vector) prediction uncertainty, uE, or predicted value, V

uE

(vector) error or z-score

probref

(logical) plot probabilistic reference (probref) curve (default: FALSE)

rep_probref

(integer) sampling repetitions for normal curve (default = 1000)

showUk

(logical) plot secondary axis with u_k values; supersedes 'title'

plot

(function) produce plot ?

score

(logical) estimate confidence score ? This requires a bootstrapped CI on the CC and might take some time.

nBoot

(integer) nb of bootstrap repeats to estimate CI on confidence curve (default = 5000)

parallel

(logical) use parallelized bootstrap ? (default = FALSE)

cl

(object) cluster for parallel computing, which is used when parallel = TRUE. If parallel = TRUE and cl = NULL, then the cluster is defined as cl = makeCluster(detectCores()). (default = NULL)

col

(integer) color index for the curve (default: 6)

add

(logical) add confidence curve to previous plot (default: FALSE)

xlab

(string) x axis label (default: 'k % discarded)

xlim

(vector) limits of the x axis (default: NULL)

ylim

(vector) limits of the y axis (default: NULL)

title

(string) a title to display above the plot (default: ”)

label

(integer) index of letter for subplot tag (default: 0)

showLegend

(logical) display legend (default: TRUE)

legend

(string) legend for the dataset (default: NULL)

legLoc

(string) location of legend (see xy.coord) (default: 'bottomleft')

gPars

(list) graphical parameters (default: ErrViewLib::setgPars())

unit

(string) unit string to add to ylab

Value

Plot confidence curve for (E,uE) set

Examples


  uE  = sqrt(rchisq(1000, df = 4))  # Re-scale uncertainty
  E   = rnorm(uE, mean=0, sd=uE)  # Generate errors
  plotCCVal(E, uE)


ppernot/ErrViewLib documentation built on June 1, 2024, 4:33 a.m.