Test_functions: Test function

sphereR Documentation

Test function

Description

Test functions adapted for the Rembo problem, i.e., possibly with non-active variables. All are defined in the [0,1]^d hypercube.

Implemented functions:
Sphere function (Euclidean distance to given optimum) (nD)

Cola function (17D)

Giunta function (nD)

Levy function (nD)

Styblinski-Tang function (nD)

Usage

sphere(x, x0, ii)

branin_mod(x, ii = c(1, 2))

branin2_mod(x, ii = c(1, 2))

hartman6_mod(x, ii = c(1, 2, 3, 4, 5, 6))

hartman6_mod_log(x, ii = c(1, 2, 3, 4, 5, 6))

cola(x)

giunta(x, ii = NULL)

levy(x, ii = NULL)

styb(x, ii = NULL)

Arguments

x

vector of input location, or, for sphere and giunta, matrix specifying locations where the function is to be evaluated, one point per row.

x0

optimum in the effective space (same length as ii)

ii

effective dimensions indices

Details

Modified Branin function to have a single optimum, see [Forrester et al., (2008)].

Levy function adapted from the code of Sonja Surjanovic and Derek Bingham and available at https://www.sfu.ca/~ssurjano/levy.html.

Styblinski-Tang function function adapted from the code of Sonja Surjanovic and Derek Bingham and available at https://www.sfu.ca/~ssurjano/levy.html.

References

A. Forrester, A. Sobester, A. Keane (2008), Engineering design via surrogate modelling: a practical guide John Wiley \& Sons, 2008.

D. R. Jones, M. Schonlau, W. Welch (1998), Efficient global optimization of expensive black-box functions

Madsen, Kaj, and Julius Zilinskas. Testing branch-and-bound methods for global optimization. IMM, Department of Mathematical Modelling, Technical Universityof Denmark, 2000.

See Also

branin and hartman6 for the original branin and hartman6 functions.

Examples

## Sphere function example
set.seed(35)
n <- 101
d <- 2
D <- 3

ygrid <- seq(-3,3, length.out = n)
Y <- as.matrix(expand.grid(ygrid, ygrid))
A <- selectA(d, D)
opt <- c(0.5,0.5)
fgrid <- sphere(randEmb(Y, A), x0 = opt, ii = c(1,2))
filled.contour(ygrid, ygrid, matrix(fgrid, n), color = terrain.colors)

# Modified branin
xstar <- c(0.08738062, 0.90866704)
branin2_mod(xstar) # -16.64402

# cola function
xstar <- c(0.1629765, 0.6627425, 0.51240525, 0.38952613, 0.39005, 0.52558138, 0.0894825,
           0.6063985, 0.06719375, 0.81655625, 0.38809425, 0.67624, 0.11579125,
           0.74532125, 0.12766, 0.39901887, 0.2887775)
cola(xstar) # 11.7464

# Giunta function
xstar <- c(0.73366, 0.73366)
giunta(xstar) # 0.06447042

# Levy function
xstar <- rep(0.55, 10)
levy(xstar) # 0

# Styblinski-Tang function
xstar <- rep(0.2096466, 10)
styb(xstar) # -39.16599 * 10


mbinois/RRembo documentation built on Sept. 16, 2023, 10:15 p.m.