custom#

Custom implementations of acquisition functions using BoTorch API

Classes

RandomSampling(m_batch, n_dim[, data_type, ...])

qMean(model[, sampler, objective, ...])

Acquisition function which optimizes for the maximum value of the posterior mean

qSpaceFill(model, X_baseline[, sampler, ...])

Acquisition function which optimizes for the maximum value of minimum distance between a point and the training data

class obsidian.acquisition.custom.RandomSampling(m_batch: int, n_dim: int, data_type: dtype = torch.float64, generator: Generator | None = None, model: Model | None = None, sampler: MCSampler | None = None, objective: MCAcquisitionObjective | None = None, posterior_transform: PosteriorTransform | None = None, X_pending: Tensor | None = None, constraints=None)[source]#

Bases: Module

forward(x: Tensor | None = None) Tensor[source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class obsidian.acquisition.custom.qMean(model: Model, sampler: MCSampler = SobolQMCNormalSampler(), objective: MCAcquisitionObjective | None = None, posterior_transform: PosteriorTransform | None = None, X_pending: Tensor | None = None)[source]#

Bases: MCAcquisitionFunction

Acquisition function which optimizes for the maximum value of the posterior mean

forward(x: Tensor) Tensor[source]#

Evaluate the acquisition function on the candidate set x

class obsidian.acquisition.custom.qSpaceFill(model: Model, X_baseline: Tensor, sampler: MCSampler = SobolQMCNormalSampler(), objective: MCAcquisitionObjective | None = None, posterior_transform: PosteriorTransform | None = None, X_pending: Tensor | None = None)[source]#

Bases: MCAcquisitionFunction

Acquisition function which optimizes for the maximum value of minimum distance between a point and the training data

forward(x: Tensor) Tensor[source]#

Evaluate the acquisition function on the candidate set x

static parser(aq_kwargs: dict[str, Any], hps: dict[str, Any], context: ParserContext) dict[str, Any][source]#

Parser for Space Filling acquisition function