saealib.ProductOfFeasibility#

class saealib.ProductOfFeasibility[ソース]#

ベースクラス: PointwiseAcquisition

Joint probability of feasibility across all constraint columns.

Computes the product of per-constraint feasibility probabilities:

\[\text{PoF}_{\text{joint}}(x) = \prod_{i=1}^{m} \Phi\!\left(\frac{0 - \mu_i(x)}{\sigma_i(x)}\right)\]

where \(\mu_i\) and \(\sigma_i\) are the surrogate's predicted mean and standard deviation for the i-th constraint column.

This is the standard acquisition function for constrained Bayesian optimisation with independent constraint surrogates ([23]; Eriksson & Poloczek, 2021). Use it with a surrogate trained on ConstraintObjectiveSet (which returns archive.g as train_y), typically via PerObjectiveSurrogate([GP(), ...] * n_constraints).

Combine this acquisition with an objective acquisition through CompositeAcquisition and configure the result on the optimizer.

Requires a surrogate that provides uncertainty estimates (std).

メモ

Assumes constraints are independent. When constraints are strongly correlated, a multi-output GP with joint predictions is more accurate but is not required by this acquisition function.

参照

[23]: Letham, B., Karrer, B., Ottoni, G., & Bakshy, E. (2019). Constrained Bayesian optimization with noisy experiments. Bayesian Analysis, 14(2), 495-519.

Conceptual origin also draws on Eriksson & Poloczek (2021), SCBO.

Methods

__init__

compute_reference

Return None (no reference needed).

contract

Return the pointwise acquisition contract.

evaluate

Reject prediction is None, resolve the reference, then score().

prepare

Delegate to compute_reference(archive, rng=ctx.rng if ctx else None).

score

Compute joint probability of feasibility scores.

Method Details

ProductOfFeasibility.__init__()#
ProductOfFeasibility.compute_reference(archive, rng=None)[ソース]#

Return None (no reference needed).

パラメータ:
  • archive (Archive)

  • rng (np.random.Generator | None)

戻り値の型:

Any

ProductOfFeasibility.contract()#

Return the pointwise acquisition contract.

戻り値の型:

ComponentContract

ProductOfFeasibility.evaluate(candidates_x, prediction, archive, ctx=None, *, prepared=<object object>)#

Reject prediction is None, resolve the reference, then score().

See AcquisitionFunction.evaluate() for the shared parameter contract, including the _UNSET vs. explicit prepared=None distinction.

パラメータ:
  • candidates_x (np.ndarray)

  • prediction (SurrogatePrediction | None)

  • archive (Archive)

  • ctx (OptimizationState | None)

  • prepared (Any)

戻り値の型:

AcquisitionResult

ProductOfFeasibility.prepare(archive, ctx=None)#

Delegate to compute_reference(archive, rng=ctx.rng if ctx else None).

パラメータ:
  • archive (Archive)

  • ctx (OptimizationState | None)

戻り値の型:

Any

ProductOfFeasibility.score(prediction, reference=None, rng=None)[ソース]#

Compute joint probability of feasibility scores.

パラメータ:
  • prediction (SurrogatePrediction) -- Surrogate predictions of constraint values. prediction.value shape: (n_samples, n_constraints). Must have std (has_uncertainty == True).

  • reference (Any) -- Not used. Accepted for interface compatibility.

  • rng (Generator | None)

戻り値:

Joint PoF scores in [0, 1]. shape: (n_samples,). Score is 1 when all constraints are clearly satisfied, 0 when any constraint is clearly violated.

戻り値の型:

np.ndarray

例外:

TypeError -- If prediction does not contain uncertainty estimates.