saealib.MaxUncertainty#
- class saealib.MaxUncertainty(weights=None, reference=None)[source]#
Bases:
PointwiseAcquisitionAcquisition function that maximizes predictive uncertainty (exploration).
Selects candidates where the surrogate model is least confident. Requires a surrogate that provides uncertainty estimates (std). This is the “uncertainty sampling” strategy from the active-learning literature, applied here as a pure-exploration acquisition function.
For multi-objective problems, aggregates uncertainty across objectives using a weighted sum.
Using sigma(x) alone as the criterion corresponds to the alpha -> infinity limit of the merit function f_M(x) = t_hat(x) - alpha * sigma(x) in Büche, Schraudolph & Koumoutsakos (2005). That paper’s GPOP procedure never actually takes this limit: it optimizes f_M in parallel for the four fixed values alpha = 0, 1, 2, 4 in that procedure, evaluating all four resulting points rather than using sigma alone.
- Parameters:
weights (np.ndarray or None) – Weights for aggregating uncertainty across objectives. shape: (n_obj,). If None, uses the mean across objectives.
reference (Any)
References
[42]: Lewis, D. D., & Gale, W. A. (1994). A sequential algorithm for training text classifiers. In SIGIR ‘94, 3-12.
[43]: Settles, B. (2009). Active learning literature survey. Computer Sciences Technical Report 1648, University of Wisconsin-Madison.
[37]: Büche, D., Schraudolph, N. N., & Koumoutsakos, P. (2005). Accelerating evolutionary algorithms with Gaussian process fitness function models. IEEE Transactions on Systems, Man, and Cybernetics-Part C, 35(2), 183-194.
Methods
Return fixed reference if set, otherwise None. |
|
Return the pointwise acquisition contract. |
|
Reject |
|
Delegate to |
|
Compute scores based on predictive standard deviation. |
Method Details
- MaxUncertainty.__init__(weights=None, reference=None)[source]#
- Parameters:
weights (ndarray | None)
reference (Any)
- MaxUncertainty.compute_reference(archive, rng=None)[source]#
Return fixed reference if set, otherwise None.
- Parameters:
archive (Archive)
rng (np.random.Generator | None)
- Return type:
Any
- MaxUncertainty.contract()#
Return the pointwise acquisition contract.
- Return type:
- MaxUncertainty.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
- MaxUncertainty.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
- MaxUncertainty.score(prediction, reference=None, rng=None)[source]#
Compute scores based on predictive standard deviation.
- Parameters:
prediction (SurrogatePrediction) – Surrogate predictions. Must have std (has_uncertainty == True).
reference (Any) – Not used. Accepted for interface compatibility.
rng (Generator | None)
- Returns:
Scores. shape: (n_samples,)
- Return type:
np.ndarray
- Raises:
TypeError – If prediction does not contain uncertainty estimates.