hit_by_wave: Output Hit Summary

hit_by_waveR Documentation

Output Hit Summary

Description

Provides a summary of numbers of points that hit n outputs

Usage

hit_by_wave(
  waves,
  targets,
  input_names,
  measure = "mean",
  plt = FALSE,
  as.per = TRUE,
  grid.plot = TRUE,
  n.sig = 3
)

Arguments

waves

The collection of waves, as a list of data.frames

targets

The output targets

input_names

The names of the input parameters

measure

If stochastic, the measure to use to compare (see description)

plt

If TRUE, results are plotted; else a data.frame is returned

as.per

Should the data be percentages, or raw numbers?

grid.plot

If plt = TRUE, determines the type of plot.

n.sig

If (val, sigma) targets provided, how many sigma away from the mean do we consider a match?

Details

Given a collection of wave points and the targets used in history matching, it might be informative to consider the proportion of points whose model output matches a given number of targets. This function provides by-wave information about how many parameter sets are matches to 0,1,2,...,n outputs.

The results of the analysis can be presented as a data.frame object where each row is a wave and each column a number of outputs; if plt = TRUE the results are instead presented visually, as a grid coloured by proportion of total points (if grid.plot = TRUE, the default) or as a series of discrete density lines, one per wave. The as.per argument determines whether the output values are raw or if they are calculated percentages of the total number of parameter sets for a given wave.

When the data arise from a stochastic model, and therefore parameter sets have multiple realisations, there are multiple ways to analyze the data (determined by measure). The options are "mean" to compare the means of realisations to the outputs; "real" to compare all individual realisations; and "stoch" to consider an output matched to if the mean lies within 3 standard deviations of the output, where the standard deviation is calculated over the realisations.

Value

Either a data.frame of results or a ggplot object plot

See Also

Other visualisation tools: behaviour_plot(), diagnostic_wrap(), effect_strength(), emulator_plot(), output_plot(), plot_actives(), plot_lattice(), plot_wrap(), simulator_plot(), space_removed(), validation_pairs(), wave_dependencies(), wave_points(), wave_values()

Examples

 # Default Usage
 hit_by_wave(SIRMultiWaveData, SIREmulators$targets, c('aSI', 'aIR', 'aSR'))
 # Plotting - line plot or raw figures
 hit_by_wave(SIRMultiWaveData, SIREmulators$targets, c('aSI', 'aIR', 'aSR'),
  plt = TRUE, as.per = FALSE, grid.plot = FALSE)

hmer documentation built on June 22, 2024, 9:22 a.m.