trieste.objectives.single_objectives#
This module contains toy objective functions, useful for experimentation. A number of them have been taken from this Virtual Library of Simulation Experiments <https://web.archive.org/web/20211015101644/https://www.sfu.ca/~ssurjano/> (:cite:`ssurjano2021)`_.
Module Contents#
-
branin(x: trieste.types.TensorType) → trieste.types.TensorType[source]# The Branin-Hoo function over \([0, 1]^2\). See [PWG13] for details.
- Parameters
x – The points at which to evaluate the function, with shape […, 2].
- Returns
The function values at
x, with shape […, 1].- Raises
ValueError (or InvalidArgumentError) – If
xhas an invalid shape.
-
scaled_branin(x: trieste.types.TensorType) → trieste.types.TensorType[source]# The Branin-Hoo function, rescaled to have zero mean and unit variance over \([0, 1]^2\). See [PWG13] for details.
- Parameters
x – The points at which to evaluate the function, with shape […, 2].
- Returns
The function values at
x, with shape […, 1].- Raises
ValueError (or InvalidArgumentError) – If
xhas an invalid shape.
-
BRANIN_MINIMIZERS[source]# The three global minimizers of the
branin()function over \([0, 1]^2\), with shape [3, 2] and dtype float64.
-
BRANIN_MINIMUM[source]# The global minimum of the
branin()function, with shape [1] and dtype float64.
-
SCALED_BRANIN_MINIMUM[source]# The global minimum of the
branin()function, with shape [1] and dtype float64.
-
simple_quadratic(x: trieste.types.TensorType) → trieste.types.TensorType[source]# A trivial quadratic function over \([0, 1]^2\). Useful for quick testing.
- Parameters
x – The points at which to evaluate the function, with shape […, 2].
- Returns
The function values at
x, with shape […, 1].- Raises
ValueError (or InvalidArgumentError) – If
xhas an invalid shape.
-
SIMPLE_QUADRATIC_MINIMIZER[source]# The global minimizer of the
simple_quadratic()function over \([0, 1]^2\), with shape [1, 2] and dtype float64.
-
SIMPLE_QUADRATIC_MINIMUM[source]# The global minimum of the
simple_quadratic()function over \([0, 1]^2\), with shape [1] and dtype float64.
-
SIMPLE_QUADRATIC_SEARCH_SPACE[source]# The search space for the
simple_quadratic()function.
-
gramacy_lee(x: trieste.types.TensorType) → trieste.types.TensorType[source]# The Gramacy & Lee function, typically evaluated over \([0.5, 2.5]\). See [GL12] for details.
- Parameters
x – Where to evaluate the function, with shape […, 1].
- Returns
The function values, with shape […, 1].
- Raises
ValueError (or InvalidArgumentError) – If
xhas an invalid shape.
-
GRAMACY_LEE_MINIMIZER[source]# The global minimizer of the
gramacy_lee()function over \([0.5, 2.5]\), with shape [1, 1] and dtype float64.
-
GRAMACY_LEE_MINIMUM[source]# The global minimum of the
gramacy_lee()function over \([0.5, 2.5]\), with shape [1] and dtype float64.
-
GRAMACY_LEE_SEARCH_SPACE[source]# The search space for the
gramacy_lee()function.
-
logarithmic_goldstein_price(x: trieste.types.TensorType) → trieste.types.TensorType[source]# A logarithmic form of the Goldstein-Price function, with zero mean and unit variance over \([0, 1]^2\). See [PWG13] for details.
- Parameters
x – The points at which to evaluate the function, with shape […, 2].
- Returns
The function values at
x, with shape […, 1].- Raises
ValueError (or InvalidArgumentError) – If
xhas an invalid shape.
-
LOGARITHMIC_GOLDSTEIN_PRICE_MINIMIZER[source]# The global minimizer for the
logarithmic_goldstein_price()function, with shape [1, 2] and dtype float64.
-
LOGARITHMIC_GOLDSTEIN_PRICE_MINIMUM[source]# The global minimum for the
logarithmic_goldstein_price()function, with shape [1] and dtype float64.
-
LOGARITHMIC_GOLDSTEIN_PRICE_SEARCH_SPACE[source]# The search space for the
logarithmic_goldstein_price()function.
-
hartmann_3(x: trieste.types.TensorType) → trieste.types.TensorType[source]# The Hartmann 3 test function over \([0, 1]^3\). This function has 3 local and one global minima. See https://www.sfu.ca/~ssurjano/hart3.html for details.
- Parameters
x – The points at which to evaluate the function, with shape […, 3].
- Returns
The function values at
x, with shape […, 1].- Raises
ValueError (or InvalidArgumentError) – If
xhas an invalid shape.
-
HARTMANN_3_MINIMIZER[source]# The global minimizer for the
hartmann_3()function, with shape [1, 3] and dtype float64.
-
HARTMANN_3_MINIMUM[source]# The global minimum for the
hartmann_3()function, with shape [1] and dtype float64.
-
HARTMANN_3_SEARCH_SPACE[source]# The search space for the
hartmann_3()function.
-
shekel_4(x: trieste.types.TensorType) → trieste.types.TensorType[source]# The Shekel test function over \([0, 1]^4\). This function has ten local minima and a single global minimum. See https://www.sfu.ca/~ssurjano/shekel.html for details. Note that we rescale the original problem, which is typically defined over [0, 10]^4.
- Parameters
x – The points at which to evaluate the function, with shape […, 4].
- Returns
The function values at
x, with shape […, 1].- Raises
ValueError (or InvalidArgumentError) – If
xhas an invalid shape.
-
SHEKEL_4_MINIMIZER[source]# The global minimizer for the
shekel_4()function, with shape [1, 4] and dtype float64.
-
SHEKEL_4_MINIMUM[source]# The global minimum for the
shekel_4()function, with shape [1] and dtype float64.
-
SHEKEL_4_SEARCH_SPACE[source]# The search space for the
shekel_4()function.
-
rosenbrock_4(x: trieste.types.TensorType) → trieste.types.TensorType[source]# The Rosenbrock function, rescaled to have zero mean and unit variance over \([0, 1]^4. See :cite:\) for details. This function (also known as the Banana function) is unimodal, however the minima lies in a narrow valley.
- Parameters
x – The points at which to evaluate the function, with shape […, 4].
- Returns
The function values at
x, with shape […, 1].- Raises
ValueError (or InvalidArgumentError) – If
xhas an invalid shape.
-
ROSENBROCK_4_MINIMIZER[source]# The global minimizer for the
rosenbrock_4()function, with shape [1, 4] and dtype float64.
-
ROSENBROCK_4_MINIMUM[source]# The global minimum for the
rosenbrock_4()function, with shape [1] and dtype float64.
-
ROSENBROCK_4_SEARCH_SPACE[source]# The search space for the
rosenbrock_4()function.
-
ackley_5(x: trieste.types.TensorType) → trieste.types.TensorType[source]# The Ackley test function over \([0, 1]^5\). This function has many local minima and a global minima. See https://www.sfu.ca/~ssurjano/ackley.html for details. Note that we rescale the original problem, which is typically defined over [-32.768, 32.768].
- Parameters
x – The points at which to evaluate the function, with shape […, 5].
- Returns
The function values at
x, with shape […, 1].- Raises
ValueError (or InvalidArgumentError) – If
xhas an invalid shape.
-
ACKLEY_5_MINIMIZER[source]# The global minimizer for the
ackley_5()function, with shape [1, 5] and dtype float64.
-
ACKLEY_5_MINIMUM[source]# The global minimum for the
ackley_5()function, with shape [1] and dtype float64.
-
ACKLEY_5_SEARCH_SPACE[source]# The search space for the
ackley_5()function.
-
hartmann_6(x: trieste.types.TensorType) → trieste.types.TensorType[source]# The Hartmann 6 test function over \([0, 1]^6\). This function has 6 local and one global minima. See https://www.sfu.ca/~ssurjano/hart6.html for details.
- Parameters
x – The points at which to evaluate the function, with shape […, 6].
- Returns
The function values at
x, with shape […, 1].- Raises
ValueError (or InvalidArgumentError) – If
xhas an invalid shape.
-
HARTMANN_6_MINIMIZER[source]# The global minimizer for the
hartmann_6()function, with shape [1, 6] and dtype float64.
-
HARTMANN_6_MINIMUM[source]# The global minimum for the
hartmann_6()function, with shape [1] and dtype float64.
-
HARTMANN_6_SEARCH_SPACE[source]# The search space for the
hartmann_6()function.
-
michalewicz(x: trieste.types.TensorType, d: int = 2, m: int = 10) → trieste.types.TensorType[source]# The Michalewicz function over \([0, \pi]\) for all i=1,…,d. Dimensionality is determined by the parameter
dand it features steep ridges and drops. It has \(d!\) local minima, and it is multimodal. The parametermdefines the steepness of they valleys and ridges; a largermleads to a more difficult search. The recommended value ofmis 10. See https://www.sfu.ca/~ssurjano/egg.html for details. :param x: The points at which to evaluate the function, with shape […, d]. :param d: The dimension of the function. :param m: The steepness of the valleys/ridges. :return: The function values atx, with shape […, 1]. :raise ValueError (or InvalidArgumentError): Ifxhas an invalid shape.
-
michalewicz_2(x: trieste.types.TensorType) → trieste.types.TensorType[source]# Convenience function for the 2-dimensional
michalewicz()function with steepness 10. :param x: The points at which to evaluate the function, with shape […, 2]. :return: The function values atx, with shape […, 1].
-
michalewicz_5(x: trieste.types.TensorType) → trieste.types.TensorType[source]# Convenience function for the 5-dimensional
michalewicz()function with steepness 10. :param x: The points at which to evaluate the function, with shape […, 5]. :return: The function values atx, with shape […, 1].
-
michalewicz_10(x: trieste.types.TensorType) → trieste.types.TensorType[source]# Convenience function for the 10-dimensional
michalewicz()function with steepness 10. :param x: The points at which to evaluate the function, with shape […, 10]. :return: The function values atx, with shape […, 1].
-
MICHALEWICZ_2_MINIMIZER[source]# The global minimizer of the
michalewicz()function over \([0, \pi]^2\), with shape [1, 2] and dtype float64. Taken from https://arxiv.org/abs/2003.09867
-
MICHALEWICZ_5_MINIMIZER[source]# The global minimizer of the
michalewicz()function over \([0, \pi]^5\), with shape [1, 5] and dtype float64. Taken from https://arxiv.org/abs/2003.09867
-
MICHALEWICZ_10_MINIMIZER[source]# The global minimizer of the
michalewicz()function over \([0, \pi]^10\), with shape [1, 10] and dtype float64. Taken from https://arxiv.org/abs/2003.09867
-
MICHALEWICZ_2_MINIMUM[source]# The global minimum of the 2-dimensional
michalewicz()function, with shape [1] and dtype float64. Taken from https://arxiv.org/abs/2003.09867
-
MICHALEWICZ_5_MINIMUM[source]# The global minimum of the 5-dimensional
michalewicz()function, with shape [1] and dtype float64. Taken from https://arxiv.org/abs/2003.09867
-
MICHALEWICZ_10_MINIMUM[source]# The global minimum of the 10-dimensional
michalewicz()function, with shape [1] and dtype float64. Taken from https://arxiv.org/abs/2003.09867
-
MICHALEWICZ_2_SEARCH_SPACE[source]# The search space for the 2-dimensional
michalewicz()function.
-
MICHALEWICZ_5_SEARCH_SPACE[source]# The search space for the 5-dimensional
michalewicz()function.
-
MICHALEWICZ_10_SEARCH_SPACE[source]# The search space for the 10-dimensional
michalewicz()function.
-
trid(x: trieste.types.TensorType, d: int = 10) → trieste.types.TensorType[source]# The Trid function over \([-d^2, d^2]\) for all i=1,…,d. Dimensionality is determined by the parameter
dand it has a global minimum. This function has large variation in output which makes it challenging for Bayesian optimisation with vanilla Gaussian processes with non-stationary kernels. Models that can deal with non-stationarities, such as deep Gaussian processes, can be useful for modelling these functions. See [HBB+19] and https://www.sfu.ca/~ssurjano/trid.html for details.- Parameters
x – The points at which to evaluate the function, with shape […, d].
d – Dimensionality.
- Returns
The function values at
x, with shape […, 1].- Raises
ValueError (or InvalidArgumentError) – If
xhas an invalid shape.
-
trid_10(x: trieste.types.TensorType) → trieste.types.TensorType[source]# The Trid function with dimension 10.
- Parameters
x – The points at which to evaluate the function, with shape […, 10].
- Returns
The function values at
x, with shape […, 1].- Raises
ValueError (or InvalidArgumentError) – If
xhas an invalid shape.
-
TRID_10_MINIMIZER[source]# The global minimizer of
trid()function is defined as \(x_i=i(d+1-i)\) for all i=1,…,d. Here, we define it specifically for the 10-dimensional variant, with shape [1, 10] and dtype float64.