Continuous Functions
gpjax.decision_making.test_functions.continuous_functions
AbstractContinuousTestFunction
Bases: ABC
Abstract base class for continuous test functions.
Attributes:
Name | Type | Description |
---|---|---|
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). |
search_space: ContinuousSearchSpace
instance-attribute
minimizer: Float[Array, '1 D']
instance-attribute
minimum: Float[Array, '1 1']
instance-attribute
generate_dataset(num_points: int, key: KeyArray) -> Dataset
generate_test_points(num_points: int, key: KeyArray) -> Float[Array, 'N D']
Generate test points from the search space of the test function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_points |
int
|
Number of points to sample. |
required |
key |
KeyArray
|
JAX PRNG key. |
required |
Returns:
Type | Description |
---|---|
Float[Array, 'N D']
|
Float[Array, 'N D']: Test points sampled from the search space. |
evaluate(x: Float[Array, 'N D']) -> Float[Array, 'N 1']
abstractmethod
Evaluate the test function at a set of points.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Float[Array, 'N D']
|
Points to evaluate the test function at. |
required |
Returns:
Type | Description |
---|---|
Float[Array, 'N 1']
|
Float[Array, 'N 1']: Values of the test function at the points. |
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 .
search_space = ContinuousSearchSpace(lower_bounds=jnp.array([0.0]), upper_bounds=jnp.array([1.0]))
class-attribute
instance-attribute
minimizer = jnp.array([[0.75725]])
class-attribute
instance-attribute
minimum = jnp.array([[-1.4528]])
class-attribute
instance-attribute
generate_dataset(num_points: int, key: KeyArray) -> Dataset
generate_test_points(num_points: int, key: KeyArray) -> Float[Array, 'N D']
Generate test points from the search space of the test function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_points |
int
|
Number of points to sample. |
required |
key |
KeyArray
|
JAX PRNG key. |
required |
Returns:
Type | Description |
---|---|
Float[Array, 'N D']
|
Float[Array, 'N D']: Test points sampled from the search space. |
evaluate(x: Float[Array, 'N D']) -> Float[Array, 'N 1']
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 .
search_space = ContinuousSearchSpace(lower_bounds=jnp.array([0.0, 0.0]), upper_bounds=jnp.array([1.0, 1.0]))
class-attribute
instance-attribute
minimizer = jnp.array([[0.5, 0.25]])
class-attribute
instance-attribute
minimum = jnp.array([[-3.12913]])
class-attribute
instance-attribute
generate_dataset(num_points: int, key: KeyArray) -> Dataset
generate_test_points(num_points: int, key: KeyArray) -> Float[Array, 'N D']
Generate test points from the search space of the test function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_points |
int
|
Number of points to sample. |
required |
key |
KeyArray
|
JAX PRNG key. |
required |
Returns:
Type | Description |
---|---|
Float[Array, 'N D']
|
Float[Array, 'N D']: Test points sampled from the search space. |
evaluate(x: Float[Array, 'N D']) -> Float[Array, 'N 1']
Quadratic
dataclass
Bases: AbstractContinuousTestFunction
Toy quadratic function defined over .
search_space = ContinuousSearchSpace(lower_bounds=jnp.array([0.0]), upper_bounds=jnp.array([1.0]))
class-attribute
instance-attribute
minimizer = jnp.array([[0.5]])
class-attribute
instance-attribute
minimum = jnp.array([[0.0]])
class-attribute
instance-attribute
generate_dataset(num_points: int, key: KeyArray) -> Dataset
generate_test_points(num_points: int, key: KeyArray) -> Float[Array, 'N D']
Generate test points from the search space of the test function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_points |
int
|
Number of points to sample. |
required |
key |
KeyArray
|
JAX PRNG key. |
required |
Returns:
Type | Description |
---|---|
Float[Array, 'N D']
|
Float[Array, 'N D']: Test points sampled from the search space. |