mice | R Documentation |
This function searches from a candidate set to locate the next design point(s) to be added to a (D)GP emulator or a bundle of (D)GP emulators using the Mutual Information for Computer Experiments (MICE), see the reference below.
mice(object, ...)
## S3 method for class 'gp'
mice(
object,
x_cand = NULL,
n_cand = 200,
batch_size = 1,
M = 50,
nugget_s = 1e-06,
workers = 1,
limits = NULL,
int = FALSE,
...
)
## S3 method for class 'dgp'
mice(
object,
x_cand = NULL,
n_cand = 200,
batch_size = 1,
M = 50,
nugget_s = 1e-06,
workers = 1,
limits = NULL,
int = FALSE,
aggregate = NULL,
...
)
## S3 method for class 'bundle'
mice(
object,
x_cand = NULL,
n_cand = 200,
batch_size = 1,
M = 50,
nugget_s = 1e-06,
workers = 1,
limits = NULL,
int = FALSE,
aggregate = NULL,
...
)
See further examples and tutorials at https://mingdeyu.github.io/dgpsi-R/.
If x_cand
is not NULL
:
When object
is an instance of the gp
class, a vector of length batch_size
is returned, containing the positions
(row numbers) of the next design points from x_cand
.
When object
is an instance of the dgp
class, a vector of length batch_size * D
is returned, containing the positions
(row numbers) of the next design points from x_cand
to be added to the DGP emulator.
D
is the number of output dimensions of the DGP emulator if no likelihood layer is included.
For a DGP emulator with a Hetero
or NegBin
likelihood layer, D = 2
.
For a DGP emulator with a Categorical
likelihood layer, D = 1
for binary output or D = K
for multi-class output with K
classes.
When object
is an instance of the bundle
class, a matrix is returned with batch_size
rows and a column for each emulator in
the bundle, containing the positions (row numbers) of the next design points from x_cand
for individual emulators.
If x_cand
is NULL
:
When object
is an instance of the gp
class, a matrix with batch_size
rows is returned, giving the next design points to be evaluated.
When object
is an instance of the dgp
class, a matrix with batch_size * D
rows is returned, where:
D
is the number of output dimensions of the DGP emulator if no likelihood layer is included.
For a DGP emulator with a Hetero
or NegBin
likelihood layer, D = 2
.
For a DGP emulator with a Categorical
likelihood layer, D = 1
for binary output or D = K
for multi-class output with K
classes.
When object
is an instance of the bundle
class, a list is returned with a length equal to the number of emulators in the bundle. Each
element of the list is a matrix with batch_size
rows, where each row represents a design point to be added to the corresponding emulator.
The first column of the matrix supplied to the first argument of aggregate
must correspond to the first output dimension of the DGP emulator
if object
is an instance of the dgp
class, and so on for subsequent columns and dimensions. If object
is an instance of the bundle
class,
the first column must correspond to the first emulator in the bundle, and so on for subsequent columns and emulators.
Beck, J., & Guillas, S. (2016). Sequential design with mutual information for computer experiments (MICE): emulation of a tsunami model. SIAM/ASA Journal on Uncertainty Quantification, 4(1), 739-766.
## Not run:
# load packages and the Python env
library(lhs)
library(dgpsi)
# construct a 1D non-stationary function
f <- function(x) {
sin(30*((2*x-1)/2-0.4)^5)*cos(20*((2*x-1)/2-0.4))
}
# generate the initial design
X <- maximinLHS(10,1)
Y <- f(X)
# training a 2-layered DGP emulator with the global connection off
m <- dgp(X, Y, connect = F)
# generate a candidate set
x_cand <- maximinLHS(200,1)
# locate the next design point using MICE
next_point <- mice(m, x_cand = x_cand)
X_new <- x_cand[next_point,,drop = F]
# obtain the corresponding output at the located design point
Y_new <- f(X_new)
# combine the new input-output pair to the existing data
X <- rbind(X, X_new)
Y <- rbind(Y, Y_new)
# update the DGP emulator with the new input and output data and refit
m <- update(m, X, Y, refit = TRUE)
# plot the LOO validation
plot(m)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.