IOSFD: Input-Output Space-Filling Design

View source: R/OSFD.R

IOSFDR Documentation

Input-Output Space-Filling Design

Description

This function is for producing designs that explicitly balance the input and output points.

Usage

IOSFD(
  D = NULL,
  f,
  p,
  q,
  lambda = 0.5,
  n_ini = NA,
  n,
  scale = TRUE,
  CAND = NULL,
  rand_out = FALSE,
  rand_in = FALSE
)

Arguments

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.

lambda

the weight for the input space. Its value should be within [0, 1]. The default value is 0.5. When lambda=0, please directly use OSFD.

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.

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.

Details

IOSFD produces a design that balances the input and output points by Wang et al. (2025).

Value

D

the final design points in the input space

Y

the output points

References

Wang, Shangkun, and V. Roshan Joseph. (2025), "Comment: A Model-free Method for Input-Output Space-Filling Design." Technometrics, to appear.

Examples

# 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
iosfd = IOSFD(f=f, p=p, q=q, n_ini=n_ini, n=n)
D = iosfd$D
Y = iosfd$Y
 

OSFD documentation built on April 4, 2025, 12:45 a.m.