botorch.test_functions¶
Synthetic test functions for testing and benchmarking purposes.
-
botorch.test_functions.
neg_branin
(X)[source]¶ Negative Branin test function.
Two-dimensional function (usually evaluated on [-5, 10] x [0, 15]):
B(x) = (x_2 - b x_1^2 + c x_1 - r)^2 + 10 (1-t) cos(x_1) + 10Here b, c, r and t are constants where b = 5.1 / (4 * math.pi ** 2) c = 5 / math.pi, r = 6, t = 1 / (8 * math.pi) B has 3 minimizers for its global minimum at
z_1 = (-pi, 12.275), z_2 = (pi, 2.275), z_3 = (9.42478, 2.475)with B(z_i) = 0.397887
Parameters: X ( Tensor
) – A Tensor of size 2 or k x 2 (k batch evaluations).Return type: Tensor
Returns: -B(X), the negative value of the standard Branin function.
-
botorch.test_functions.
neg_eggholder
(X)[source]¶ Negative Eggholder test function.
Two-dimensional function (usually evaluated on [-512, 512]^2):
E(x) = (x_2 + 47) sin(R1(x)) - x_1 * sin(R2(x)) R1(x) = sqrt(|x_2 + x_1 / 2 + 47|) R2(x) = sqrt(|x_1 - (x_2 + 47)|)Parameters: X ( Tensor
) – A Tensor of size 2 or k x 2 (k batch evaluations).Return type: Tensor
Returns: -E(X), the negative value of the Eggholder function.
-
botorch.test_functions.
neg_hartmann6
(X)[source]¶ Negative Hartmann6 test function.
Six-dimensional function (typically evaluated on [0, 1]^6)
H(x) = - sum_{i=1}^4 ALPHA_i exp( - sum_{j=1}^6 A_ij (x_j - P_ij)**2 )H has a 6 local minima and a global minimum at
z = (0.20169, 0.150011, 0.476874, 0.275332, 0.311652, 0.6573)with H(z) = -3.32237
Parameters: X ( Tensor
) – A Tensor of size 6 or k x 6 (k batch evaluations).Return type: Tensor
Returns: -H(X), the negative value of the standard Hartmann6 function.
-
botorch.test_functions.
neg_holder_table
(X)[source]¶ Negative Holder Table synthetic test function.
Two-dimensional function (typically evaluated on [0, 10] x [0, 10]):
H(x) = - | sin(x_1) * cos(x_2) * exp(| 1 - ||x|| / pi | ) |H has 4 global minima with H(z_i) = -19.2085 at
z_1 = ( 8.05502, 9.66459) z_2 = (-8.05502, -9.66459) z_3 = (-8.05502, 9.66459) z_4 = ( 8.05502, -9.66459)Parameters: X ( Tensor
) – A Tensor of size 2 or k x 2 (k batch evaluations).Return type: Tensor
Returns: -H(X), the negative value of the standard Holder Table function.
-
botorch.test_functions.
neg_michalewicz
(X)[source]¶ Negative 10-dim Michalewicz test function.
10-dim function (usually evaluated on hypercube [0, pi]^10):
M(x) = sum_{i=1}^10 sin(x_i) (sin(i x_i^2 / pi)^20)Parameters: X ( Tensor
) – A Tensor of size 10 or k x 10 (k batch evaluations).Return type: Tensor
Returns: -M(X), the negative value of the Michalewicz function.
-
botorch.test_functions.
neg_styblinski_tang
(X)[source]¶ Negative Styblinski-Tang test function.
d-dimensional function (usually evaluated on the hypercube [-5, 5]^d):
H(x) = 0.5 * sum_{i=1}^d (x_i^4 - 16 * x_i^2 + 5 * x_i)H has a single global mininimum H(z) = -39.166166 * d at z = [-2.903534]^d
Parameters: X ( Tensor
) – A Tensor of size d or k x d (k batch evaluations)Return type: Tensor
Returns: -H(X), the negative value of the standard Styblinski-Tang function.
-
botorch.test_functions.
neg_aug_branin
(X)[source]¶ Negative augmented-Branin test function.
The last dimension of X is the fidelity. 3-dimensional function with domain [-5, 10] x [0, 15] * [0,1]:
- B(x) = (x_2 - (b - 0.1 * (1 - x_3))x_1^2 + c x_1 - r)^2 +
- 10 (1-t) cos(x_1) + 10
Here b, c, r and t are constants where b = 5.1 / (4 * math.pi ** 2) c = 5 / math.pi, r = 6, t = 1 / (8 * math.pi). B has infinitely many minimizers with x_1 = -pi, pi, 3pi
and B_min = 0.397887
Parameters: X ( Tensor
) – A Tensor of size 3 or k x 3 (k batch evaluations).Return type: Tensor
Returns: -B(X), the negative value of the augmented-Branin function.
-
botorch.test_functions.
neg_aug_hartmann6
(X)[source]¶ Negative augmented Hartmann6 test function.
The last dimension of X is the fidelity parameter. 7-dimensional function (typically evaluated on [0, 1]^7):
- H(x) = -(ALPHA_1 - 0.1 * (1-x_7)) * exp(- sum_{j=1}^6 A_1j (x_j - P_1j) ** 2) -
- sum_{i=2}^4 ALPHA_i exp( - sum_{j=1}^6 A_ij (x_j - P_ij) ** 2)
H has unique global minimizer x = [0.20169, 0.150011, 0.476874, 0.275332, 0.311652, 0.6573, 1]
with H_min = -3.32237
Parameters: X ( Tensor
) – A Tensor of size 7 or k x 7 (k batch evaluations).Return type: Tensor
Returns: -H(X), the negative value of the augmented Hartmann6 function.
-
botorch.test_functions.
neg_aug_rosenbrock
(X)[source]¶ Augmented Rosenbrock test function.
4-dimensional function, the last two dimensions are for fidelity parameters, X is usually in [-5,10]^2 * [0,1]^2:
f(x) = 100 (x_2 - x_1^2 + 0.1 * (1 - x_3))^2 + (x_1 - 1 + 0.1 * (1 - x_4)^2)^2f has infinitely many minimizers, with f_min = 0.0
Parameters: X ( Tensor
) – A Tensor of size 4 or k x 4 (k batch evaluations).Returns: -f(X), the negative value of the augmented Rosenbrock function.