trieste.observer#
Definitions and utilities for observers of objective functions.
Module Contents#
- SingleObserver[source]#
Type alias for an observer of the objective function (that takes query points and returns an unlabelled dataset).
- MultiObserver[source]#
Type alias for an observer of the objective function (that takes query points and returns labelled datasets).
- Observer[source]#
Type alias for an observer, returning either labelled datasets or a single unlabelled dataset.
- OBJECTIVE: typing_extensions.Final[trieste.types.Tag] = 'OBJECTIVE'[source]#
A tag typically used by acquisition rules to denote the data sets and models corresponding to the optimization objective.
- filter_finite(query_points: trieste.types.TensorType, observations: trieste.types.TensorType) trieste.data.Dataset[source]#
- Parameters:
query_points – A tensor of shape (N x M).
observations – A tensor of shape (N x 1).
- Returns:
A
Datasetcontaining all the rows inquery_pointsandobservationswhere theobservationsare finite numbers.- Raises:
ValueError or InvalidArgumentError – If
query_pointsorobservationshave invalid shapes.
- map_is_finite(query_points: trieste.types.TensorType, observations: trieste.types.TensorType) trieste.data.Dataset[source]#
- Parameters:
query_points – A tensor.
observations – A tensor.
- Returns:
A
Datasetcontaining all the rows inquery_points, along with the tensor result of mapping the elements ofobservationsto: 1 if they are a finite number, else 0, with dtype tf.uint8.- Raises:
ValueError or InvalidArgumentError – If
query_pointsandobservationsdo not satisfy the shape constraints ofDataset.