MABC: MICE-assisted Approximate Bayesian Calibration

Description Usage Arguments Details Value

Description

Produces a list with multiple waves of proposed input parameter values to match a vector of target features.

Usage

1
2
3
4
5
MABC(targets.empirical, model, RMSD.tol.max = 2, min.givetomice = 64,
  n.experiments = 256, start.experiments = NULL, lls, uls,
  strict.positive.params, probability.params, inside_prior = TRUE,
  method = "norm", predictorMatrix = "complete", maxit = 50,
  maxwaves = 4, n_cores = n_cores, multinode = FALSE)

Arguments

targets.empirical

The vector of target features

model

Wrapper function for the simulation model. See details for a description of the required format.

RMSD.tol.max

Tolerance for the root mean squared distance between target features and model output features

min.givetomice

Minimal number of observations in the training dataset to which MICE is applied

n.experiments

Number of parameter combinations in each wave of model runs

start.experiments

If set to NULL (default), start experiments will be drawn uniformly from the prior distributions. If a matrix of input parameter values, possibly output from a previous calibration, models with these inputs will be run, instead of drawing from the prior distributions. To resume where a previous calibration ended, you can input start.experiments as a data.frame with inputs, outputs, seed, wave and RMSD values.

lls

Vector of lower limits of the prior distribution of input parameter values

uls

Vector of upper limits of the prior distribution of input parameter values

strict.positive.params

Vector of indices that indicate which of the input parameters are strictly positive. Set to zero if there are no such parameters.

probability.params

Vector of indices that indicate which of the input parameters are strictly between 0 and 1. Set to zero if there are no such parameters.

inside_prior

TRUE by default. If FALSE, parameter sampling is not restricted to the initial ranges of the prior distribution during the subsequent algorithm steps.

method

Method used by MICE. Currently, only "norm" is supported.

predictorMatrix

As in mice::mice. Can be "complete", "LASSO" (Least Absolute Shrinkage and Selection Operator), or a user-defined matrix of zeros and ones. Diagonal must always be zeros. Ones indicate which variables are included in the chained equations in MICE.

maxit

The maxit argument used in MICE (number of times that the chained equations are cycled through)

maxwaves

The maximum number of waves of model runs

n_cores

The number of cores available for parallel model runs. Default = 1, i.e. serial execution of model runs

multinode

TRUE or FALSE (Default). If TRUE, model runs are distributed over the cores of multiple nodes, using DOsnow and snow as the back-end to the foreach package. If FALSE and n_cores > 1, model runs are distributed over the cores of a single node, using the parallel package.

Details

The model wrapper function for the simulaton model must have a vector of model input parameter values as its one and only argument. Furthermore, it must return a vector of model features. These model features are then compared against the target features.

Value

A list with the following components:

results

A list with maxwaves elements. Each element is itself a list with 6 named elements: thiswave.io: Input and Output of the simulations of this wave, thiswave.median.features: The l1 median of this wave's model output, upto.thiswave.median.features: The l1 median of all model output up to and including this wave, closest.upto.thiswave.median.features: The l1 median of the min.givetomice model features that are closest to the target features, up to this wave, max.RMSD: The largest Root Mean Square Distance of the min.givetomice model features that are closest to the target features, up to this wave. The max.RMSD is expected to decrease with increasing waves, closest.upto.thiswave.io: Input and Output of the min.givetomice simulations that have features closest to the target features, up to this wave. The input parameters make up the approximate posterior distribution.

targets

The vector of target features

secondspassed

The time (in seconds) it took MABC to complete the calibration


wdelva/MABC documentation built on May 27, 2019, 9:56 a.m.