saealib.MaxUncertainty#

class saealib.MaxUncertainty(weights=None, reference=None)[ソース]#

ベースクラス: PointwiseAcquisition

Acquisition 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.

パラメータ:
  • weights (np.ndarray or None) -- Weights for aggregating uncertainty across objectives. shape: (n_obj,). If None, uses the mean across objectives.

  • reference (Any)

参照

[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

__init__

compute_reference

Return fixed reference if set, otherwise None.

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 scores based on predictive standard deviation.

Method Details

MaxUncertainty.__init__(weights=None, reference=None)[ソース]#
パラメータ:
  • weights (ndarray | None)

  • reference (Any)

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

Return fixed reference if set, otherwise None.

パラメータ:
  • archive (Archive)

  • rng (np.random.Generator | None)

戻り値の型:

Any

MaxUncertainty.contract()#

Return the pointwise acquisition contract.

戻り値の型:

ComponentContract

MaxUncertainty.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

MaxUncertainty.prepare(archive, ctx=None)#

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

パラメータ:
  • archive (Archive)

  • ctx (OptimizationState | None)

戻り値の型:

Any

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

Compute scores based on predictive standard deviation.

パラメータ:
  • prediction (SurrogatePrediction) -- Surrogate predictions. Must have std (has_uncertainty == True).

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

  • rng (Generator | None)

戻り値:

Scores. shape: (n_samples,)

戻り値の型:

np.ndarray

例外:

TypeError -- If prediction does not contain uncertainty estimates.