Description Usage Arguments Details Value Author(s) References Examples
Optimizes the weighted integrated mean-square error (wIMSE) surface to sequentially select inducing points for a given predictive location and local neighborhood.
1 2 3 4 |
Xn |
a |
M |
the positive integer number of inducing points placed for each local neighborhood; |
theta |
the lengthscale parameter (positive number) in a Gaussian
correlation function; a (default) |
g |
the nugget parameter (positive number) in the covariance |
w_mean |
a vector of the mean (center) of the Gaussian weight; |
w_var |
a positive number or vector of positive numbers (length equal to |
ip_bounds |
a 2 by d |
integral_bounds |
a 2 by d |
num_multistart |
a positive integer indicating the number of starting locations used to optimize wIMSE for each inducing point |
fix_xm1 |
an indicator of whether or not the first inducing point should be fixed at |
epsK |
a small positive number added to the diagonal of the correlation matrix, of inducing points, K, for numerically stability for inversion |
epsQ |
a small positive number added to the diagonal of the Q |
mult |
a vector of length |
verbose |
if |
The function sequentially places M
inducing points around the local neighborhood (Xn
). Inducing points are placed based on the minimum in the wIMSE surface integrating over integral_bounds
. Hyperparameters theta,g
are fixed.
The output is a list
with the following components:
Xm |
a |
wimse |
a vector of the wIMSE progress at each inducing point selection step |
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 | ## a "computer experiment"
## Simple 2-d 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)
library(laGP)
## Build a local neighborhood
Xstar <- matrix(c(.4, -1.1), nrow=1)
n <- 100; m <- 10
Xstar_to_X_dists <- distance(Xstar, X)
quant_dists <- quantile(Xstar_to_X_dists, n/nrow(X))
Xn <- X[Xstar_to_X_dists < quant_dists,]
Yn <- Y[Xstar_to_X_dists < quant_dists]
theta <- darg(NULL, Xn)$start
integral_bounds <- rbind(c(-2,-2), c(2,2))
## Optimize inducing point locations
Xm.wimse1 <- optIP.wIMSE(Xn, M=m, Xn=, theta=theta, w_mean=Xstar,
integral_bounds=integral_bounds)
## Use a different variance for weight
Xm.wimse2 <- optIP.wIMSE(Xn, M=m, Xn=, theta=theta, w_mean=Xstar,
w_var = c(theta/2, 3*theta),
integral_bounds=integral_bounds)
## Plot inducing point design and neighborhood
ranges <- apply(Xn, 2, range)
plot(Xn, pch = 16, cex=.5, col='grey',
xlim=ranges[,1]+c(-.02, .02), ylim=ranges[,2]+c(-.02, .15),
xlab='x1', ylab = 'x2',
main='ALC-optimal Inducing Point Design')
points(Xstar[1], Xstar[2], pch=16)
points(Xm.wimse1$Xm, pch=2, col=3, lwd=2)
points(Xm.wimse2$Xm, pch=3, col=4, lwd=2)
legend('topleft', legend=c('Xstar','Neighborhood','Xm with w_var=theta',
'Xm with nonisotropic weight'),
col=c(1,'grey',3,4), pch=c(16,16,2,3), lty=NA, lwd=2, ncol=2)
## View wIMSE progress
plot(1:m, log(Xm.wimse1$wimse), type='l', xlab='inducing point number',
ylab='log wIMSE',main='wIMSE optimization progress')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.