discrete_acqf.thompson_sampling
discrete_acqf.thompson_sampling(
model,
candidates,
*,
maximize=True,
generator=None,
)The values of one function drawn from the posterior.
The best candidate under the draw is the one to evaluate. All candidates share the draw, so this is Thompson sampling proper, not a draw per candidate.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| model | LaplaceDiscreteSurrogate | The surrogate. | required |
| candidates | Any | The candidates, as model.predict takes them. |
required |
| maximize | bool | Whether larger outcomes are better. If not, the values are negated. | True |
| generator | torch.Generator | None | Seeds the draw. | None |
Returns
| Name | Type | Description |
|---|---|---|
| Tensor | One score per candidate. |