Continuous Functions
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 two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to add.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe sum of the two mean functions.
__mul__
Multiply two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to multiply.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe product of the two mean functions.
generate_dataset
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 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.
Forrester
dataclass
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 two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to add.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe sum of the two mean functions.
__mul__
Multiply two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to multiply.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe product of the two mean functions.
generate_dataset
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 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
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 two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to add.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe sum of the two mean functions.
__mul__
Multiply two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to multiply.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe product of the two mean functions.
generate_dataset
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 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
Bases: AbstractContinuousTestFunction
Toy quadratic function defined over \([0, 1]\).
__add__
Add two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to add.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe sum of the two mean functions.
__mul__
Multiply two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to multiply.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe product of the two mean functions.
generate_dataset
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 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.