MyNixOS website logo
Description

History Matching and Emulation Package.

A set of objects and functions for Bayes Linear emulation and history matching. Core functionality includes automated training of emulators to data, diagnostic functions to ensure suitability, and a variety of proposal methods for generating 'waves' of points. For details on the mathematical background, there are many papers available on the topic (see references attached to function help files or the below references); for details of the functions in this package, consult the manual or help files. Iskauskas, A, et al. (2024) <doi:10.18637/jss.v109.i10>. Bower, R.G., Goldstein, M., and Vernon, I. (2010) <doi:10.1214/10-BA524>. Craig, P.S., Goldstein, M., Seheult, A.H., and Smith, J.A. (1997) <doi:10.1007/978-1-4612-2290-3_2>.

hmer

R-CMD-check CRANstatus Codecov testcoverage

Overview

The goal of hmer is to make the process of history matching and emulation accessible and easily usable by modellers, particularly in epidemiology. The central object of the process is an Emulator: a statistical approximation for the output of a complex (and often expensive) model that, given a relatively small number of model evaluations, can give predictions of the model output at unseen points with the appropriate uncertainty built-in. Using these we may follow a process of ‘history matching’, where unfeasible parts of the parameter space are ruled out. Sampling parameter sets from the remaining region allows us to train more accurate emulators, which allow us to remove more of the space, and so on. The hmer package contains tools for the automated construction of emulators, visualisations for diagnostic checks and exploration of parameter space, and a means by which new points can be proposed.

Installation

You can install the development version of hmer from GitHub with:

# install.packages("devtools")
devtools::install_github("andy-iskauskas/hmer")

Example

The three core functions of the package are called below, using built-in toy data.

library(hmer)
#> Registered S3 method overwritten by 'GGally':
#>   method from   
#>   +.gg   ggplot2
## Train a set of emulators to data
ems <- emulator_from_data(input_data = SIRSample$training,
                          output_names = names(SIREmulators$targets),
                          ranges = list(aSI = c(0.1, 0.8), aIR = c(0, 0.5), aSR = c(0, 0.05)))
## Perform diagnostics on the emulators
validation <- validation_diagnostics(ems, SIREmulators$targets, SIRSample$validation, plt = FALSE)
## Propose new points from the emulators
new_points <- generate_new_design(ems, 50, SIREmulators$targets)

Learning Emulation and History Matching

There is a wealth of published information on Bayes Linear emulation, history matching, and the more general framework of uncertainty quantification, upon which this package is based. The easiest way to learn how to use the hmer package, however, is to look through the vignettes within.

browseVignettes("hmer")
vignette("low-dimensional-examples", package = 'hmer')
  • Low-dimensional examples low-dimensional-examples introduces the basics of emulation and history matching and how to use hmer in some low-dimensional toy models;

  • Demonstration demonstrating-the-hmer-package serves as a broad overview of most of the functions in the package;

  • Stochastic and Bimodal Emulation stochasticandbimodalemulation introduces the basics of dealing with stochastic systems, and identifying bimodality;

  • The “Emulation Handbook” emulationhandbook details some common problems and considerations that occur when using the framework, and serves as a broad FAQ for problems encountered.

Metadata

Version

1.6.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows