Title: | Output Space-Filling Design |
---|---|
Description: | A method to generate a design in the input space that sequentially fills the output space of a black-box function. The output space-filling design will be helpful in inverse design or feature-based modeling problem. Please see Wang et al.(2023) <DOI:10.48550/arXiv.2305.07202> for details. This work is supported by U.S. National Foundation grant CMMI-1921646. |
Authors: | Shangkun Wang [aut, cre], Roshan Joseph [aut] |
Maintainer: | Shangkun Wang <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2024-12-08 07:06:14 UTC |
Source: | CRAN |
A sequential method to generate a design that produces points filling the output space. The underlying mapping f
from input space to output space is assumed to be a black-box function that can be evaluated in the forward direction. Please see Wang et al. (2023) for details.
Shangkun Wang, V. Roshan Joseph
Maintainer: Shangkun Wang <[email protected]>
Wang, Shangkun, Adam P. Generale, Surya R. Kalidindi, and V. Roshan Joseph. "Sequential Designs for Filling Output Spaces." Technometrics, to appear (2023).
ball_unif
generate random or quasi-random uniform points in a p-dimensional ball.
ball_unif(cen, rad, n, rand = TRUE)
ball_unif(cen, rad, n, rand = TRUE)
cen |
a vector specifying the center of the ball. |
rad |
radius of the ball. |
n |
number of points. |
rand |
whether to generate random or quasi random points. Default value is TRUE. |
ball_unif
generate random uniform points or quasi uniform points by twinning algorithm in a p-dimensional ball.
a matrix of the generated points.
Vakayil, Akhil, and V. Roshan Joseph. "Data twinning." Statistical Analysis and Data Mining: The ASA Data Science Journal 15.5 (2022): 598-610.
Wang, Shangkun, Adam P. Generale, Surya R. Kalidindi, and V. Roshan Joseph. "Sequential Designs for Filling Output Spaces." Technometrics, to appear (2023).
x = ball_unif(c(0,0),1,10,rand=FALSE) plot(x,type='p')
x = ball_unif(c(0,0),1,10,rand=FALSE) plot(x,type='p')
mMdist
computes the minimax distance of a deisng in a specified region. A large uniform sample
from the specified region is need to compute the minimax distance.
mMdist(X, X_space)
mMdist(X, X_space)
X |
a matrix specifying the design. |
X_space |
a large sample of uniform points in the space of interest. |
mMdist
approximates the minimax distance of a set of points X
by the large sample X_space
in the space of interest.
the minimax distance.
Johnson, Mark E., Leslie M. Moore, and Donald Ylvisaker. "Minimax and maximin distance designs." Journal of statistical planning and inference 26.2 (1990): 131-148.
Wang, Shangkun, Adam P. Generale, Surya R. Kalidindi, and V. Roshan Joseph. "Sequential Designs for Filling Output Spaces." Technometrics, to appear (2023).
# the minimax distance of a random Latin hypercube design D = randomLHS(5,2) mMdist(D,replicate(2,runif(1e5)))
# the minimax distance of a random Latin hypercube design D = randomLHS(5,2) mMdist(D,replicate(2,runif(1e5)))
This function is for producing designs that fill the output space.
OSFD( D = NULL, f, p, q, n_ini = NA, n, scale = TRUE, method = "EI", CAND = NULL, rand_out = FALSE, rand_in = FALSE )
OSFD( D = NULL, f, p, q, n_ini = NA, n, scale = TRUE, method = "EI", CAND = NULL, rand_out = FALSE, rand_in = FALSE )
D |
a matrix of the initial design. If not specified, a random Latin hypercube design of size n_ini and dimension p will be generated as initial design. |
f |
black-box function. |
p |
input dimension. |
q |
output dimension. |
n_ini |
the size of initial design. This initial size must be specified if D is not provided. |
n |
the size of the final design. |
scale |
whether to scale the output points to 0 to 1 for each dimension. |
method |
two choices: 'EI' or 'Greedy'; the default is 'EI'. |
CAND |
the candidate points in the input space. If Null, it will be automatically generated. |
rand_out |
whether to use random uniform points or quasi random points by twinning algorithm for generating points in spheres for output space approximation. The default value is FALSE. |
rand_in |
whether to use random uniform points or quasi random points by twinning algorithm for generating points in spheres for input space candidate sets. The default value is FALSE. |
OSFD
produces a design that fills the output space using the sequential algorithm by Wang et al. (2023).
D |
the final design points in the input space |
Y |
the output points |
Wang, Shangkun, Adam P. Generale, Surya R. Kalidindi, and V. Roshan Joseph. "Sequential Designs for Filling Output Spaces." Technometrics, to appear (2023).
# test function: inverse-radius function (Wang et.al 2023) inverse_r = function(x){ epsilon = 0.1 y1=1/(x[1]^2+x[2]^2+epsilon^2)^(1/2) if (x[2]==0){ y2 = 0 }else if (x[1]==0) { y2 = pi/2}else{ y2 = atan(x[2]/x[1]) } return (c(y1=y1,y2=y2)) } set.seed(2022) p = 2 q = 2 f = inverse_r n_ini = 10 n = 50 osfd = OSFD(f=f,p=p,q=q,n_ini=n_ini,n=n) D = osfd$D Y = osfd$Y
# test function: inverse-radius function (Wang et.al 2023) inverse_r = function(x){ epsilon = 0.1 y1=1/(x[1]^2+x[2]^2+epsilon^2)^(1/2) if (x[2]==0){ y2 = 0 }else if (x[1]==0) { y2 = pi/2}else{ y2 = atan(x[2]/x[1]) } return (c(y1=y1,y2=y2)) } set.seed(2022) p = 2 q = 2 f = inverse_r n_ini = 10 n = 50 osfd = OSFD(f=f,p=p,q=q,n_ini=n_ini,n=n) D = osfd$D Y = osfd$Y