trieste.acquisition.combination
#
Module Contents#
-
class
Reducer
(*builders: trieste.acquisition.interface.AcquisitionFunctionBuilder[trieste.models.ProbabilisticModel])[source]# Bases:
trieste.acquisition.interface.AcquisitionFunctionBuilder
[trieste.models.ProbabilisticModel
]A
Reducer
builds anAcquisitionFunction
whose output is calculated from the outputs of a number of otherAcquisitionFunction
s. How these outputs are composed is defined by the method_reduce()
.- Parameters
*builders – Acquisition function builders. At least one must be provided.
- Raises
InvalidArgumentError – If no builders are specified.
-
prepare_acquisition_function
(models: collections.abc.Mapping[trieste.types.Tag, trieste.models.ProbabilisticModel], datasets: Optional[collections.abc.Mapping[trieste.types.Tag, trieste.data.Dataset]] = None) → trieste.acquisition.interface.AcquisitionFunction[source]# Return an acquisition function. This acquisition function is defined by first building acquisition functions from each of the
AcquisitionFunctionBuilder
s specified at__init__()
, then reducing, with_reduce()
, the output of each of those acquisition functions.- Parameters
datasets – The data from the observer.
models – The models over each dataset in
datasets
.
- Returns
The reduced acquisition function.
-
update_acquisition_function
(function: trieste.acquisition.interface.AcquisitionFunction, models: collections.abc.Mapping[trieste.types.Tag, trieste.models.ProbabilisticModel], datasets: Optional[collections.abc.Mapping[trieste.types.Tag, trieste.data.Dataset]] = None) → trieste.acquisition.interface.AcquisitionFunction[source]# - Parameters
function – The acquisition function to update.
models – The model.
datasets – Unused.
-
property
acquisitions
→ collections.abc.Sequence[trieste.acquisition.interface.AcquisitionFunctionBuilder[trieste.models.ProbabilisticModel]][source]# The acquisition function builders specified at class initialisation.
-
abstract
_reduce
(inputs: collections.abc.Sequence[trieste.types.TensorType]) → trieste.types.TensorType[source]# - Parameters
inputs – The output of each constituent acquisition function.
- Returns
The output of the reduced acquisition function.
-
class
Sum
(*builders: trieste.acquisition.interface.AcquisitionFunctionBuilder[trieste.models.ProbabilisticModel])[source]# Bases:
Reducer
Reducer
whose resulting acquisition function returns the element-wise sum of the outputs of constituent acquisition functions.- Parameters
*builders – Acquisition function builders. At least one must be provided.
- Raises
InvalidArgumentError – If no builders are specified.
-
_reduce
(inputs: collections.abc.Sequence[trieste.types.TensorType]) → trieste.types.TensorType[source]# - Parameters
inputs – The outputs of each acquisition function.
- Returns
The element-wise sum of the
inputs
.
-
class
Product
(*builders: trieste.acquisition.interface.AcquisitionFunctionBuilder[trieste.models.ProbabilisticModel])[source]# Bases:
Reducer
Reducer
whose resulting acquisition function returns the element-wise product of the outputs of constituent acquisition functions.- Parameters
*builders – Acquisition function builders. At least one must be provided.
- Raises
InvalidArgumentError – If no builders are specified.
-
_reduce
(inputs: collections.abc.Sequence[trieste.types.TensorType]) → trieste.types.TensorType[source]# - Parameters
inputs – The outputs of each acquisition function.
- Returns
The element-wise product of the
inputs
.