tfp.experimental.bayesopt.acquisition.AcquisitionFunction
Stay organized with collections
Save and categorize content based on your preferences.
Base class for acquisition functions.
tfp.experimental.bayesopt.acquisition.AcquisitionFunction(
predictive_distribution, observations, seed=None
)
Acquisition Functions are (relatively) inexpensive functions that guide
Bayesian Optimization search. Typically, their values at points will
correspond to how desirable it is to evaluate the function at that point.
This desirability can come in the form of improving information about the
black box function (exploration) or trying to find an extrema given past
evaluations (exploitation).
TFP acquisition functions are callable objects that may be instantiated with
subclass-specific parameters. This design enables expensive one-time
computation to be run in __init__
before the acquisition function is called
repeatedly, for example during optimization. The AcquisitionFunction
base
class is instantiated with a predictive distribution (typically an instance of
tfd.GaussianProcessRegressionModel
, tfd.StudentTProcessRegressionModel
, or
tfp.experimental.distributions.MultiTaskGaussianProcessRegressionModel
),
previously-observed function values, and an optional random seed. The
__call__
method evaluates the acquisition function.
Args |
predictive_distribution
|
tfd.Distribution -like, the distribution over
observations at a set of index points.
|
observations
|
Float Tensor of observations.
|
seed
|
PRNG seed; see tfp.random.sanitize_seed for details.
|
Attributes |
is_parallel
|
Python bool indicating whether the acquisition function is parallel.
Parallel (batched) acquisition functions evaluate batches of points rather
than single points.
|
observations
|
Float Tensor of observations.
|
predictive_distribution
|
The distribution over observations at a set of index points.
|
seed
|
PRNG seed.
|
Methods
__call__
View source
__call__(
**kwargs
)
Call self as a function.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-21 UTC.
[null,null,["Last updated 2023-11-21 UTC."],[],[],null,["# tfp.experimental.bayesopt.acquisition.AcquisitionFunction\n\n\u003cbr /\u003e\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/probability/blob/v0.23.0/tensorflow_probability/python/experimental/bayesopt/acquisition/acquisition_function.py#L26-L92) |\n\nBase class for acquisition functions. \n\n tfp.experimental.bayesopt.acquisition.AcquisitionFunction(\n predictive_distribution, observations, seed=None\n )\n\nAcquisition Functions are (relatively) inexpensive functions that guide\nBayesian Optimization search. Typically, their values at points will\ncorrespond to how desirable it is to evaluate the function at that point.\nThis desirability can come in the form of improving information about the\nblack box function (exploration) or trying to find an extrema given past\nevaluations (exploitation).\n\nTFP acquisition functions are callable objects that may be instantiated with\nsubclass-specific parameters. This design enables expensive one-time\ncomputation to be run in `__init__` before the acquisition function is called\nrepeatedly, for example during optimization. The `AcquisitionFunction` base\nclass is instantiated with a predictive distribution (typically an instance of\n`tfd.GaussianProcessRegressionModel`, `tfd.StudentTProcessRegressionModel`, or\n[`tfp.experimental.distributions.MultiTaskGaussianProcessRegressionModel`](../../../../tfp/experimental/distributions/MultiTaskGaussianProcessRegressionModel)),\npreviously-observed function values, and an optional random seed. The\n`__call__` method evaluates the acquisition function.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------------------------|---------------------------------------------------------------------------------------|\n| `predictive_distribution` | `tfd.Distribution`-like, the distribution over observations at a set of index points. |\n| `observations` | `Float` `Tensor` of observations. |\n| `seed` | PRNG seed; see tfp.random.sanitize_seed for details. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `is_parallel` | Python `bool` indicating whether the acquisition function is parallel. \u003cbr /\u003e Parallel (batched) acquisition functions evaluate batches of points rather than single points. |\n| `observations` | Float `Tensor` of observations. |\n| `predictive_distribution` | The distribution over observations at a set of index points. |\n| `seed` | PRNG seed. |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `__call__`\n\n[View source](https://github.com/tensorflow/probability/blob/v0.23.0/tensorflow_probability/python/experimental/bayesopt/acquisition/acquisition_function.py#L91-L92) \n\n __call__(\n **kwargs\n )\n\nCall self as a function."]]