emulator_plot | R Documentation |
A function for plotting emulator expectations, variances, and implausibilities
emulator_plot(
ems,
plot_type = "exp",
ppd = 30,
targets = NULL,
cb = FALSE,
params = NULL,
fixed_vals = NULL,
nth = 1,
imp_breaks = NULL,
include_legend = TRUE
)
ems |
An |
plot_type |
The statistic to plot (see description or examples). |
ppd |
The number of points per plotting dimension |
targets |
If required, the targets from which to calculate implausibility |
cb |
A boolean representing whether a colourblind-friendly plot is produced. |
params |
Which two input parameters should be plotted? |
fixed_vals |
For fixed input parameters, the values they are held at. |
nth |
If plotting nth maximum implausibility, which level maximum to plot. |
imp_breaks |
If plotting nth maximum implausibility, defines the levels at which to draw contours. |
include_legend |
For multiple plots, should a combined legend be appended? |
Given a single emulator, or a set of emulators, the emulator statistics can be plotted
across a two-dimensional slice of the parameter space. Which statistic is plotted is
determined by plot_type
: options are ‘exp’, ‘var’, ‘sd’, ‘imp’, and ‘nimp’, which
correspond to expectation, variance, standard deviation, implausibility, and nth-max
implausibility.
By default, the slice varies in the first two parameters of the emulators, and all other
parameters are taken to be fixed at their mid-range values. This behaviour can be changed
with the params
and fixed_vals
parameters (see examples).
If the statistic is ‘exp’, ‘var’ or ‘sd’, then the minimal set of parameters to pass to this
function are ems
(which can be a list of emulators or a single one) and plot_type
.
If the statistic is ‘imp’ or ‘nimp’, then the targets
must be supplied - it is not
necessary to specify the individual target for a single emulator plot. If the statistic is
‘nimp’, then the level of maximum implausibility can be chosen with the parameter nth
.
Implausibility plots are typically coloured from green (low implausibility) to red (high
implausibility): a colourblind-friendly option is available and can be turned on by setting
cb = TRUE
.
The granularity of the plot is controlled by the ppd
parameter, determining the number
of points per dimension in the grid. For higher detail, at the expense of longer computing
time, increase this value. The default is 30.
A ggplot object, or collection thereof.
Other visualisation tools:
behaviour_plot()
,
diagnostic_wrap()
,
effect_strength()
,
hit_by_wave()
,
output_plot()
,
plot_actives()
,
plot_lattice()
,
plot_wrap()
,
simulator_plot()
,
space_removed()
,
validation_pairs()
,
wave_dependencies()
,
wave_points()
,
wave_values()
# Reducing ppd to 10 for speed.
emulator_plot(SIREmulators$ems, ppd = 10)
emulator_plot(SIREmulators$ems$nS, ppd = 10)
emulator_plot(SIREmulators$ems, plot_type = 'var', ppd = 10, params = c('aIR', 'aSR'))
# Excessive runtime
emulator_plot(SIREmulators$ems, plot_type = 'imp', ppd = 10,
targets = SIREmulators$targets,
fixed_vals = list(aSR = 0.02))
emulator_plot(SIREmulators$ems, plot_type = 'nimp', cb = TRUE,
targets = SIREmulators$targets, nth = 2, ppd = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.