ace {acebayes} | R Documentation |
Approximate Coordinate Exchange (ACE) Algorithm
Description
These functions implement the approximate coordinate exchange (ACE) algorithm (Overstall & Woods, 2017) for finding optimal Bayesian experimental designs by maximising an approximation to an intractable expected utility function.
Usage
ace(utility, start.d, B, Q = 20, N1 = 20, N2 = 100, lower = -1, upper = 1,
limits = NULL, progress = FALSE, binary = FALSE, deterministic = FALSE)
acephase1(utility, start.d, B, Q = 20, N1 = 20, lower, upper, limits = NULL,
progress = FALSE, binary = FALSE, deterministic = FALSE)
acephase2(utility, start.d, B, N2 = 100, progress = FALSE, binary = FALSE,
deterministic = FALSE)
pace(utility, start.d, B, Q = 20, N1 = 20, N2 = 100, lower = -1, upper = 1,
limits = NULL, binary = FALSE, deterministic = FALSE, mc.cores = 1,
n.assess = 20)
Arguments
utility |
A function with two arguments: For a Monte Carlo approximation ( For a deterministic approximation ( |
start.d |
For For |
B |
An argument for controlling the approximation to the expected utility. For a Monte Carlo approximation ( For a deterministic approximation ( |
Q |
An integer specifying the number of evaluations of the approximate expected utility that are used to fit the Gaussian process emulator. The default value is |
N1 |
An integer specifying the number of iterations of Phase I of the ACE algorithm (the coordinate exchange phase).
The default value is |
N2 |
An integer specifying the number of iterations of Phase II of the ACE algorithm (the point exchange phase).
The default value is |
lower |
An argument specifying the bounds on the design space. This argument can either be a scalar or a matrix of the same dimension as the argument |
upper |
An argument specifying the bounds on the design space. This argument can either be a scalar or a matrix of the same dimension as the argument |
limits |
An argument specifying the grid over which to maximise the Gaussian process emulator for the expected utility function. It should be a function with three arguments: |
progress |
A logical argument indicating whether the iteration number and other information detailing the progress of the algorithm should be printed. The default value is |
binary |
A logical argument indicating whether the utility function has binary or continuous output. In some cases, the utility function is an indicator function of some event giving binary output. The expected utility function will then be the expected posterior probability of the event. Utility functions such as Shannon information gain and negative squared error loss give continuous output. The type of output guides the choice of comparison procedure used in the ACE algorithm. The default value is |
deterministic |
A logical argument indicating if a Monte Carlo ( |
mc.cores |
The number of cores to use, i.e. at most how many child processes will be run simultaneously. Must be at least one (the default), and parallelisation requires at least two cores. See |
n.assess |
If |
Details
Finding an optimal Bayesian experimental design (Chaloner & Verdinelli, 1995) involves maximising an objective function given by the expectation of some appropriately chosen utility function with respect to the joint distribution of unknown quantities (including responses). This objective function is usually not available in closed form and the design space can be continuous and of high dimensionality.
Overstall & Woods (2017) proposed the approximate coordinate exchange (ACE) algorithm to approximately maximise the expectation of the utility function. ACE consists of two phases.
Phase I uses a continuous version of the coordinate exchange algorithm (Meyer &
Nachtsheim, 1995) to maximise an approximation to the expected utility. Very briefly,
the approximate expected utility is sequentially maximised over each one-dimensional element
of the design space. The approximate expected utility is given by the predictive mean of a
Gaussian process (GP) regression model (also known as an emulator or surrogate) fitted
to a 'small' number (argument Q
) of evaluations of either a Monte Carlo (MC) or deterministic (e.g. quadrature) approximation to the expected utility (the MC sample size or arguments for the deterministic approximation are given by B
). A GP
emulator is a statistical model and, similar to all statistical models, can be an
inadequate representation of the underlying process (i.e. the expected utility).
Instead of automatically accepting the new design given by the value that maximises
the GP emulator, for MC approximations a Bayesian hypothesis test, independent of the GP emulator, is
performed to assess whether the expected utility of the new design is larger than the
current design. For deterministic approximations, the approximate expected utility is calculated for the new design, and compared to that for the current design.
Phase I tends to produce clusters of design points. This is where, for example, two design points are separated by small Euclidean distance. Phase II allows these points to be consolidated into a single repeated design point by using a point exchange algorithm (e.g Gotwalt et al., 2009) with a candidate set given by the final design from Phase I. In the same way as Phase I, comparisons of the expected loss between two designs is made on the basis of either a Bayesian hypothesis test or a direct comparison of deterministic approximations.
The original Bayesian hypothesis test proposed by Overstall & Woods (2017) is
appropriate for utility functions with continuous output. Overstall et al. (2017)
extended the idea to utility functions with binary output, e.g. the utility
function is an indicator function for some event. The type of test can be specified by
the argument binary
.
Similar to all coordinate exchange algorithms, ACE should be repeated from different initial designs. The function
pace
will implement this where the initial designs are given by a list via the argument start.d
. On the completion
of the repetitions of ACE, pace
will approximate the expected utility for all final designs and return the design (the terminal design) with the
largest approximate expected utility.
Value
The function will return an object of class "ace"
(for functions ace
, acephase1
and acephase2
) or "pace"
(for function "pace"
) which is a list with the following components:
utility |
The argument |
start.d |
The argument |
phase1.d |
The design found from Phase I of the ACE algorithm (only for |
phase2.d |
The design found from Phase II of the ACE algorithm (only for |
phase1.trace |
A vector containing the approximated expected utility of the current design at each stage of Phase I of the ACE algorithm. This can be used to assess convergence for MC approximations.
If For |
phase2.trace |
A vector containing the approximated expected utility of the current design at each stage of Phase II of the ACE algorithm. This can be used to assess convergence for MC approximations.
If For |
B |
The argument |
Q |
The argument |
N1 |
The argument |
N2 |
The argument |
glm |
If the object is a result of a direct call to |
nlm |
If the object is a result of a direct call to |
criterion |
If the object is a result of a direct call to |
prior |
If the object is a result of a direct call to |
time |
Computational time (in seconds) to run the ACE algorithm. |
binary |
The argument |
deterministic |
The argument |
d |
The terminal design ( |
eval |
If If |
final.d |
A list of the same length as the argument |
besti |
A scalar indicating which repetition of the ACE algorithm resulted in the terminal design ( |
Note
For more details on the R
implementation of the utility function used in the Examples section, see utilcomp18bad
.
Author(s)
Antony M. Overstall A.M.Overstall@soton.ac.uk, David C. Woods, Maria Adamou & Damianos Michaelides
References
Chaloner, K. & Verdinelli, I. (1995). Bayesian Experimental Design: A Review. Statistical Science, 10, 273-304.
Gotwalt, C., Jones, B. & Steinberg, D. (2009). Fast Computation of Designs Robust to Parameter Uncertainty for Nonlinear Settings. Technometrics, 51, 88-95.
Meyer, R. & Nachtsheim, C. (1995). The Coordinate Exchange Algorithm for Constructing Exact Optimal Experimental Designs. Technometrics, 37, 60-69.
Overstall, A.M. & Woods, D.C. (2017). Bayesian design of experiments using approximate coordinate exchange. Technometrics, 59, 458-470.
Overstall, A.M., McGree, J.M. & Drovandi, C.C. (2018). An approach for finding fully Bayesian optimal designs using normal-based approximations to loss functions. Statistics and Computing, 28(2), 343-358.
Examples
set.seed(1)
## Set seed for reproducibility.
## This example involves finding a pseudo-Bayesian D-optimal design for a
## compartmental model with n = 18 runs. There are three parameters.
## Two parameters have uniform priors and the third has a prior
## point mass. For more details see Overstall & Woods (2017).
start.d<-optimumLHS(n = 18, k = 1)
## Create an initial design.
## Using a MC approximation
example1<-ace(utility = utilcomp18bad, start.d = start.d, N1 = 1, N2 = 2, B = c(100, 20))
## Implement the ACE algorithm with 1 Phase I iterations and 2 Phase II
## iterations. The Monte Carlo sample sizes are 100 (for comparison) and 20 for
## fitting the GP emulator.
example1
## Produce a short summary.
#User-defined model & utility
#
#Number of runs = 18
#
#Number of factors = 1
#
#Number of Phase I iterations = 1
#
#Number of Phase II iterations = 2
#
#Computer time = 00:00:00
mean(utilcomp18bad(d = example1$phase2.d, B = 100))
## Calculate an approximation to the expected utility for the final design.
## Should get:
#[1] 9.254198
## Not run:
plot(example1)
## Produces a trace plot of the current value of the expected utility. This
## can be used to assess convergence.
## End(Not run)