full_wave: History Match

Description Usage Arguments Details Value Examples

View source: R/basic_wave.R

Description

Performs a full wave of emulation and history matching from data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
full_wave(
  input_data,
  validation_data,
  ranges,
  output_names,
  targets,
  n_points = 40,
  previous_wave = NULL,
  sample_method = "importance",
  ...
)

Arguments

input_data

The set of training points

validation_data

The set of points to use in validation

ranges

The ranges of the inputs, as a named list.

output_names

The names of the outputs to emulate.

targets

The observations, given in the usual (val, sigma) form

n_points

The number of points to evaluate the parameters on.

previous_wave

The preliminary emulators for the set of waves, if they exist

sample_method

The method to be used to find new points (see generate_new_runs)

...

Any optional parameters to pass to emulator_from_data

Details

Given simulator runs (split into training and validation data), the target values, and the identification of outputs to emulate, the function generates trained emulators, tests them with emulator diagnostics (removing any emulators whose outputs cannot be well emulated from the data), and finally generates a new sample of points to be entered into the simulator.

Necessary parameters to be passed are the input data, the validation data, the ranges of inputs, and the observation values for each output. If any specifications are to be passed directly to the emulator construction, then they should be given as additional parameters (see emulator_from_data to see the options).

A set of preliminary ('wave 0') emulators are fitted to the data before being used to train a new set of emulators on the data, using Bayes linear adjustment. The preliminary emulators are provided as part of the output of the function to indicate the prior specifications, should any by-hand modification be needed (for example, if any of the outputs could not be adequately fitted).

The output consists of a list of four items: the preliminary emulators base_emulators, the trained emulators emulators, the next points to be put into the simulator next_sample, and the minimum enclosing hyperrectangle for the non-implausible region, given as ranges new_ranges.

Value

A list of base emulators, trained emulators for this wave, new sample points, and new ranges.

Examples

1
2
3
4
5
6
7
8
9
 #ranges <- list(aSI = c(0.1, 0.8), aIR = c(0, 0.5), aSR = c(0, 0.05))
 #outputs <- c('nS','nI','nR')
 #targets <- list(
 # list(val = 281, sigma = 10.43),
 # list(val = 30, sigma = 11.16),
 # list(val = 689, sigma = 14.32)
 #)
 #wave1 <- full_wave(GillespieSIR, GillespieValidation, ranges, outputs, targets,
 # n_points = 30, deltas = rep(0.1, 3), quadratic = TRUE)

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