Skip to main content

discrete_acqf.thompson_batch

discrete_acqf.thompson_batch(
    model,
    candidates,
    q,
    *,
    maximize=True,
    generator=None,
)

The indices of q different candidates to evaluate together.

Each candidate is the best under its own function drawn from the posterior. Where the posterior is unsure, the draws disagree and the batch spreads out. If two draws favor the same candidate, the later one takes its best candidate not yet in the batch.

Parameters

Name Type Description Default
model LaplaceDiscreteSurrogate The surrogate. required
candidates Any The candidates, as model.predict takes them. Needs at least q. required
q int The batch size. required
maximize bool Whether larger outcomes are better. True
generator torch.Generator | None Seeds the draws. None

Returns

Name Type Description
Tensor q indices into candidates, in the order of the draws.