Skip to content

Utils

gpjax.decision_making.utils

OBJECTIVE: Final[str] = 'OBJECTIVE' module-attribute

Tag for the objective dataset/function in standard utility functions.

FunctionEvaluator = Callable[[Float[Array, 'N D']], Dict[str, Dataset]] module-attribute

Type alias for function evaluators, which take an array of points of shape [N,D][N, D] and evaluate a set of functions at each point, returning a mapping from function tags to datasets of the evaluated points. This is the same as the Observer in Trieste: https://github.com/secondmind-labs/trieste/blob/develop/trieste/observer.py

build_function_evaluator(functions: Dict[str, Callable[[Float[Array, 'N D']], Float[Array, 'N 1']]]) -> FunctionEvaluator

Takes a dictionary of functions and returns a FunctionEvaluator which can be used to evaluate each of the functions at a supplied set of points and return a dictionary of datasets storing the evaluated points.