saealib.ProbabilityOfFeasibility#
- class saealib.ProbabilityOfFeasibility(obj_idx=0, reference=None)[source]#
Bases:
PointwiseAcquisitionProbability of Feasibility (PoF) acquisition function.
Estimates the probability that a candidate satisfies a constraint g(x) <= 0, using a surrogate model that predicts the constraint value.
PoF(x) = Phi((0 - mu(x)) / sigma(x))
Typically used in combination with another acquisition function (e.g., EI * PoF) to handle black-box constraints.
Requires a surrogate that provides uncertainty estimates (std).
- Parameters:
obj_idx (int) – Index of the predicted constraint to evaluate. Default: 0.
reference (Any)
References
[31]: Schonlau, M. (1997). Computer Experiments and Global Optimization (PhD thesis, University of Waterloo). (Earliest formulation.)
[32]: Gelbart, M. A., Snoek, J., & Adams, R. P. (2014). Bayesian optimization with unknown constraints. Proceedings of the 30th Conference on Uncertainty in Artificial Intelligence (UAI). (Constraint-handling with independent surrogates.)
Methods
Return fixed reference if set, otherwise None. |
|
Return the pointwise acquisition contract. |
|
Reject |
|
Delegate to |
|
Compute Probability of Feasibility scores. |
Method Details
- ProbabilityOfFeasibility.__init__(obj_idx=0, reference=None)[source]#
- Parameters:
obj_idx (int)
reference (Any)
- ProbabilityOfFeasibility.compute_reference(archive, rng=None)[source]#
Return fixed reference if set, otherwise None.
- Parameters:
archive (Archive)
rng (np.random.Generator | None)
- Return type:
Any
- ProbabilityOfFeasibility.contract()#
Return the pointwise acquisition contract.
- Return type:
- ProbabilityOfFeasibility.evaluate(candidates_x, prediction, archive, ctx=None, *, prepared=<object object>)#
Reject
prediction is None, resolve the reference, thenscore().See
AcquisitionFunction.evaluate()for the shared parameter contract, including the_UNSETvs. explicitprepared=Nonedistinction.- Parameters:
candidates_x (np.ndarray)
prediction (SurrogatePrediction | None)
archive (Archive)
ctx (OptimizationState | None)
prepared (Any)
- Return type:
AcquisitionResult
- ProbabilityOfFeasibility.prepare(archive, ctx=None)#
Delegate to
compute_reference(archive, rng=ctx.rng if ctx else None).- Parameters:
archive (Archive)
ctx (OptimizationState | None)
- Return type:
Any
- ProbabilityOfFeasibility.score(prediction, reference=None, rng=None)[source]#
Compute Probability of Feasibility scores.
- Parameters:
prediction (SurrogatePrediction) – Surrogate predictions of constraint values. Must have std (has_uncertainty == True).
reference (Any) – Not used. Accepted for interface compatibility.
rng (Generator | None)
- Returns:
PoF scores in [0, 1]. shape: (n_samples,) Higher scores indicate a higher probability of feasibility.
- Return type:
np.ndarray
- Raises:
TypeError – If prediction does not contain uncertainty estimates.