Skip to contents

Evaluates the Ishigami-Homma function. Input samples are drawn from a uniform distribution over \([-\pi, \pi]^3\)

Usage

ishi_homma_fun(N, A = 2, B = 1)

Arguments

N

Number of input samples to generate.

A

(default: 2) Numeric, amplitude of the second sine component .

B

(default: 1) Numeric, coefficient of the interaction term.

Value

A list with two elements:

  • x: a numeric matrix of size N x 8 containing the input samples.

  • y: a numeric vector of length N with the corresponding function outputs.

Details

The Ishigami-Homma function is defined as: $$Y = \sin(X_1) + A \cdot \sin^2(X_2) + B \cdot X_3^4 \cdot \sin(X_1)$$ where \(X_i \sim \mathcal{U}(-\pi, \pi)\).

Examples

result <- ishi_homma_fun(1000)
#> Warning: data length [8000] is not a sub-multiple or multiple of the number of rows [2667]
head(result$x)
#>               X1          X2         X3
#> [1,] -2.28423759  1.79802532  2.5392859
#> [2,] -0.09561026 -1.44091702  2.7606143
#> [3,] -2.28376501  0.09747321  0.2907198
#> [4,] -2.22049303 -0.72236898  1.1359593
#> [5,]  2.22482608  1.77325241  0.7638785
#> [6,] -2.77463554 -0.14388686 -3.1280338
head(result$y)
#> [1] -30.2940876  -3.6735528  -0.7428849  -1.2478894   2.9829971 -34.6663382