classification_error: Classification diagnostics

Description Usage Arguments Details Value Examples

View source: R/diagnostics.R

Description

Checks for emulator misclassifications.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
classification_error(
  emulator,
  input_points,
  output_points,
  z,
  output_name,
  cutoff = 3,
  plt = T,
  ...
)

Arguments

emulator

An Emulator object.

input_points

A set of validation points.

output_points

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

z

The observation to test implausibility against. Either as a single numeric, or as list(val=numeric, sigma=numeric).

output_name

Optional. A name for the output.

cutoff

Optional. The cut-off for the implausibility measure.

plt

Should a plot be shown (default: T).

...

Dummy parameters (for compatibility with diagnostic wrapper)

Details

Both the emulator implausibility and the simulator implausibility are computed, and plotted against one another. Points for which the emulator implausibility is outside the desired cut-off but for which the simulator implausibility is not are misclassification points, and are highlighted in red.

Value

The set of points misclassified by the emulator.

Examples

1
2
3
4
5
6
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]]
target_value <- list(val = 281, sigma = 37.26)
classification_error(em, GillespieValidation[,1:3], GillespieValidation[,'nS'], target_value)
#> data.frame containing 0 points

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