comparison_diagnostics: Emulator Diagnostic Plot

Description Usage Arguments Details Value Examples

View source: R/diagnostics.R

Description

Produces a diagnostic plot of emulator output.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
comparison_diagnostics(
  emulator,
  input_points,
  output_points,
  output_name,
  sd = 3,
  plt = T,
  targets = NULL,
  ...
)

Arguments

emulator

An Emulator object.

input_points

A set of validation points.

output_points

The outputs, f(x), from the simulator.

output_name

Optional. A name for the output.

sd

Numeric: the allowed number of standard deviations (default: 3).

plt

Should a plot be shown (default: T).

targets

The output targets (to check if failing points are relevant). Default: NULL

...

Dummy parameters (for compatibility with diagnostic wrapper)

Details

The emulator output E[f(x)] is plotted against the simulator output f(x), with error bars given by the emulator standard deviation sqrt(3*Var[f(x)]), for each point x in a validation set X. Points whose emulator expectation lies outside 3-sigma of the simulator output are shown in red, and those input points are returned.

Value

A list of points whose emulator value is outside the allowed standard deviation.

Examples

1
2
3
4
5
em <- emulator_from_data(GillespieSIR, output_names = c('nS', 'nI', 'nR'),
 ranges = list(aSI = c(0.1, 0.8), aIR = c(0, 0.5), aSR = c(0, 0.05)),
 quadratic = TRUE)[[1]]
comparison_diagnostics(em, GillespieValidation[,1:3], GillespieValidation[,'nS'])
#> (0.7864384, 0.01426296, 0.001072935)

Tandethsquire/emulatorr documentation built on April 12, 2021, 1:08 a.m.