Description Usage Arguments Details Value Author(s) References See Also Examples
Constructs a design of inducing points around the center of the design matrix and its local neighborhood. The output is an inducing point design centered at the origin that can be used as a template for predictions anywhere in the design space (with a local neighborhood of the same size). Different criteria are available to optimize the inducing points. The methods "wimse
" and "alc
" use weighted Integrated Mean Squared Error and Active Learning Cohn respectively to sequentially select inducing points.
1 2 3 4 5 |
X |
a |
Y |
a vector of responses/dependent values with |
M |
a positive integer number of inducing points; |
N |
a positive integer number of Nearest Neighbor (NN) locations used to build a local neighborhood |
theta |
the lengthscale parameter (positive number) in a Gaussian
correlation function; a (default) |
g |
the nugget parameter (positive number) in a covariance |
method |
specifies the method by which the inducing point template is built. In brief,
wIMSE ( |
ip_bounds |
a 2 by d |
integral_bounds |
a 2 by d |
num_thread |
a scalar positive integer indicating the number of GPUs
available for calculating ALC; only relevant when |
num_multistart |
a scalar positive integer indicating the number of multistart points used to optimize each inducing point with wIMSE or ALC |
w_var |
a scalar positive number used as the variance for the Gaussian weight in wIMSE. If |
epsK |
a small positive number added to the diagonal of the correlation |
epsQ |
a small positive number added to the diagonal of the Q |
reps |
a notification of replicate design locations in the data set. If |
verbose |
when |
This function calls separate subroutines for certain methods. For method=wimse
, the function
optIP.wIMSE
is called with the reference point being the median of the design matrix. If
method=alc
, optIP.ALC
is called with the predictive variance being minimized at the
median of the design matrix. For any inducing point design, the first inducing point is placed at the predictive location (i.e. the
origin).
The output is a list
with the following components.
Xm.t |
a |
Xn |
a |
time |
a scalar giving the passage of wall-clock time elapsed for (substantive parts of) the calculation |
D. Austin Cole austin.cole8@vt.edu
D.A. Cole, R.B. Christianson, and R.B. Gramacy (2021). Locally Induced Gaussian Processes for Large-Scale Simulation Experiments Statistics and Computing, 31(3), 1-21; preprint on arXiv:2008.12857; https://arxiv.org/abs/2008.12857
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | ## "1D Toy Problem"
## Test function from Forrester et al (2008);
library(hetGP)
X <- as.matrix(seq(0, 1, length=1000))
Y <- f1d(X)
int_bounds <- matrix(c(0, 1))
## Center of design space used to build inducing point templates
X_center <- median(X)
## Optimize inducing points with weighted Integrated Mean-Square Error
wimse.out <- build_ipTemplate(X, Y, N=100, M=10, method="wimse", integral_bounds=int_bounds)
Xm.t_wimse <- wimse.out$Xm.t
## now optimize inducing points using Active Learning Cohn
alc.out <- build_ipTemplate(X, Y, N=100, M=10, method="alc", integral_bounds=int_bounds)
Xm.t_alc <- alc.out$Xm.t
Xn <- alc.out$Xn ## X_center neighborhood
## plot locally optimized inducing point templates
plot(X, Y, pch=16, cex=.5, col='grey')
points(Xn, f1d(Xn), col=2)
points(Xm.t_wimse + X_center, rep(-4, 10), pch=2, col=3)
points(Xm.t_alc + X_center, rep(-5, 10), pch=3, col=4)
legend('topleft', pch = c(16, 16, 2, 3), col = c('grey', 2, 3, 4),
legend=c('Data', 'Local neighborhood', 'wIMSE inducing point design',
'ALC inducing point design'))
## "2D Toy Problem"
## Herbie's Tooth function used in Cole et al (2020);
## thanks to Lee, Gramacy, Taddy, and others who have used it before
## build up a design with N=~40K locations
x <- seq(-2, 2, by=0.02)
X <- as.matrix(expand.grid(x, x))
Y <- herbtooth(X)
X_center <- apply(X, 2, median)
## build a inducing point template, first with weighted Integrated Mean-Square Error
int_bounds <- rbind(c(-2,-2), c(2,2))
wimse.out <- build_ipTemplate(X, Y, N=100, M=10, method="wimse", integral_bounds=int_bounds)
Xm.t_wimse <- wimse.out$Xm.t
## now optimize inducing points using Active Learning Cohn
alc.out <- build_ipTemplate(X, Y, N=100, M=10, method="alc", integral_bounds=int_bounds)
Xm.t_alc <- alc.out$Xm.t
Xn <- alc.out$Xn
## plot locally optimized inducing point templates
plot(Xn, pch=16, cex=.5, col='grey',
xlab = 'x1', ylab = 'x2', main='Locally optimized IP templates')
points(X_center[1], X_center[2], pch=16, cex=1.5)
points(Xm.t_wimse, pch=2, lwd=2, col=3)
points(Xm.t_alc, pch =3, lwd=2, col=4)
legend('topleft', pch = c(16, 2, 3), col = c('grey', 3, 4),
legend=c('Local neighborhood', 'wIMSE inducing point design',
'ALC inducing point design'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.