Skip to content

Continuous Functions

AbstractContinuousTestFunction

AbstractContinuousTestFunction()

Bases: AbstractMeanFunction

Abstract base class for continuous test functions.

Attributes:

  • search_space (ContinuousSearchSpace) –

    Search space for the function.

  • minimizer (Float[Array, '1 D']) –

    Minimizer of the function (to 5 decimal places)

  • minimum (Float[Array, '1 1']) –

    Minimum of the function (to 5 decimal places).

__add__

__add__(other)

Add two mean functions.

Parameters:

Returns:

__mul__

__mul__(other)

Multiply two mean functions.

Parameters:

Returns:

generate_dataset

generate_dataset(num_points, key, obs_stddev=0.0)

Generate a toy dataset from the test function.

Parameters:

  • num_points (int) –

    Number of points to sample.

  • key (KeyArray) –

    JAX PRNG key.

  • obs_stddev (float, default: 0.0 ) –

    (Optional) standard deviation of Gaussian distributed

Returns:

  • Dataset ( Dataset ) –

    Dataset of points sampled from the test function.

generate_test_points

generate_test_points(num_points, key)

Generate test points from the search space of the test function.

Parameters:

  • num_points (int) –

    Number of points to sample.

  • key (KeyArray) –

    JAX PRNG key.

Returns:

  • Float[Array, 'N D'] –

    Float[Array, 'N D']: Test points sampled from the search space.

evaluate abstractmethod

evaluate(x)

Evaluate the test function at a set of points.

Parameters:

  • x (Float[Array, 'N D']) –

    Points to evaluate the test function at.

Returns:

  • Float[Array, 'N 1'] –

    Float[Array, 'N 1']: Values of the test function at the points.

Forrester dataclass

Forrester()

Bases: AbstractContinuousTestFunction

Forrester function introduced in 'Engineering design via surrogate modelling: a practical guide' (Forrester et al. 2008), rescaled to have zero mean and unit variance over \([0, 1]\).

__add__

__add__(other)

Add two mean functions.

Parameters:

Returns:

__mul__

__mul__(other)

Multiply two mean functions.

Parameters:

Returns:

generate_dataset

generate_dataset(num_points, key, obs_stddev=0.0)

Generate a toy dataset from the test function.

Parameters:

  • num_points (int) –

    Number of points to sample.

  • key (KeyArray) –

    JAX PRNG key.

  • obs_stddev (float, default: 0.0 ) –

    (Optional) standard deviation of Gaussian distributed

Returns:

  • Dataset ( Dataset ) –

    Dataset of points sampled from the test function.

generate_test_points

generate_test_points(num_points, key)

Generate test points from the search space of the test function.

Parameters:

  • num_points (int) –

    Number of points to sample.

  • key (KeyArray) –

    JAX PRNG key.

Returns:

  • Float[Array, 'N D'] –

    Float[Array, 'N D']: Test points sampled from the search space.

LogarithmicGoldsteinPrice dataclass

LogarithmicGoldsteinPrice()

Bases: AbstractContinuousTestFunction

Logarithmic Goldstein-Price function introduced in 'A benchmark of kriging-based infill criteria for noisy optimization' (Picheny et al. 2013), which has zero mean and unit variance over \([0, 1]^2\).

__add__

__add__(other)

Add two mean functions.

Parameters:

Returns:

__mul__

__mul__(other)

Multiply two mean functions.

Parameters:

Returns:

generate_dataset

generate_dataset(num_points, key, obs_stddev=0.0)

Generate a toy dataset from the test function.

Parameters:

  • num_points (int) –

    Number of points to sample.

  • key (KeyArray) –

    JAX PRNG key.

  • obs_stddev (float, default: 0.0 ) –

    (Optional) standard deviation of Gaussian distributed

Returns:

  • Dataset ( Dataset ) –

    Dataset of points sampled from the test function.

generate_test_points

generate_test_points(num_points, key)

Generate test points from the search space of the test function.

Parameters:

  • num_points (int) –

    Number of points to sample.

  • key (KeyArray) –

    JAX PRNG key.

Returns:

  • Float[Array, 'N D'] –

    Float[Array, 'N D']: Test points sampled from the search space.

Quadratic dataclass

Quadratic()

Bases: AbstractContinuousTestFunction

Toy quadratic function defined over \([0, 1]\).

__add__

__add__(other)

Add two mean functions.

Parameters:

Returns:

__mul__

__mul__(other)

Multiply two mean functions.

Parameters:

Returns:

generate_dataset

generate_dataset(num_points, key, obs_stddev=0.0)

Generate a toy dataset from the test function.

Parameters:

  • num_points (int) –

    Number of points to sample.

  • key (KeyArray) –

    JAX PRNG key.

  • obs_stddev (float, default: 0.0 ) –

    (Optional) standard deviation of Gaussian distributed

Returns:

  • Dataset ( Dataset ) –

    Dataset of points sampled from the test function.

generate_test_points

generate_test_points(num_points, key)

Generate test points from the search space of the test function.

Parameters:

  • num_points (int) –

    Number of points to sample.

  • key (KeyArray) –

    JAX PRNG key.

Returns:

  • Float[Array, 'N D'] –

    Float[Array, 'N D']: Test points sampled from the search space.