saealib.LowerConfidenceBound#
- class saealib.LowerConfidenceBound(kappa=2.0, obj_idx=0, beta_schedule=None, direction=None)[ソース]#
ベースクラス:
PointwiseAcquisitionLower Confidence Bound (LCB) acquisition function.
LCB trades off exploitation (low predicted mean) and exploration (high predicted uncertainty):
LCB(x) = mu(x) - kappa * sigma(x)
For minimization, lower LCB values are better. This class returns the negated LCB so that higher scores indicate more promising candidates, consistent with the convention used by other acquisition functions.
Requires a surrogate that provides uncertainty estimates (std).
- パラメータ:
kappa (float) -- Exploration-exploitation trade-off parameter used when
beta_scheduleisNone. Higher values encourage more exploration. Default: 2.0.obj_idx (int) -- Index of the objective to optimize. Used for multi-objective problems where LCB is applied to a single objective. Default: 0.
beta_schedule (callable or None) -- Optional
beta_tscheduleschedule(t) -> float(kappacorresponds tosqrt(beta_t)in the cited bound). When set,t = ctx.decision_count + 1-- the number of genuinely new evaluation plans the runtime has confirmed so far (synchronous or async), plus one for the decision about to be made -- andkappa_t = sqrt(schedule(t))replaces the fixedkappa. This makestone full round in the cited paper's sense only under synchronous, single-point-per-decision execution; seegp_ucb_beta_schedule().None(default) keepskappafixed.direction (np.ndarray or None) -- Per-objective optimization direction (+1 = maximize, -1 = minimize). shape: (n_obj,). The predicted mean is converted to minimize-space via
direction_to_minimize_signbefore the (minimize-only) LCB formula above runs.None(default) means already-minimize; when unset, it is auto-injected fromproblem.directionat run start.
参照
[25]: Srinivas, N., Krause, A., Kakade, S. M., & Seeger, M. W. (2012). Information-theoretic regret bounds for Gaussian process optimization in the bandit setting. IEEE Transactions on Information Theory, 58(5), 3250-3265.
Methods
LowerConfidenceBound uses no reference value; always returns None. |
|
Return the pointwise acquisition contract. |
|
Reject |
|
Resolve the |
|
Compute negated LCB scores (higher is better). |
Method Details
- LowerConfidenceBound.__init__(kappa=2.0, obj_idx=0, beta_schedule=None, direction=None)[ソース]#
- パラメータ:
kappa (float)
obj_idx (int)
beta_schedule (Callable[[int], float] | None)
direction (ndarray | None)
- LowerConfidenceBound.compute_reference(archive, rng=None)[ソース]#
LowerConfidenceBound uses no reference value; always returns None.
- パラメータ:
archive (Archive)
rng (np.random.Generator | None)
- 戻り値の型:
Any
- LowerConfidenceBound.contract()#
Return the pointwise acquisition contract.
- 戻り値の型:
- LowerConfidenceBound.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.- パラメータ:
candidates_x (np.ndarray)
prediction (SurrogatePrediction | None)
archive (Archive)
ctx (OptimizationState | None)
prepared (Any)
- 戻り値の型:
AcquisitionResult
- LowerConfidenceBound.prepare(archive, ctx=None)[ソース]#
Resolve the
beta_schedule-drivenkappafor this decision, if set.Overrides
PointwiseAcquisition.prepare()(rather than onlycompute_reference()) because resolvingbeta_scheduleneedsctx.decision_count, whichcompute_reference()has no access to. Whenbeta_scheduleisNone, delegates tocompute_reference()unchanged.- 戻り値:
Nonewhenbeta_scheduleis unset; otherwise the resolvedkappa_tfloat, passed toscore()asreference.- 戻り値の型:
Any
- 例外:
ValidationError -- If
beta_scheduleis set butctxisNone(thas no source). Call viaevaluate()with a realctx, notscore()directly. Ifbeta_schedulereturns a non-finite or negative value.- パラメータ:
archive (Archive)
ctx (OptimizationState | None)
- LowerConfidenceBound.score(prediction, reference=None, rng=None)[ソース]#
Compute negated LCB scores (higher is better).
- パラメータ:
prediction (SurrogatePrediction) -- Surrogate predictions. Must have std (has_uncertainty == True).
reference (Any) -- The
kappa_tresolved byprepare()whenbeta_scheduleis set (Noneotherwise). PassingNonehere whilebeta_scheduleis set is a caller error (see raises below); it never silently falls back to the fixedkappa.rng (Generator | None)
- 戻り値:
Negated LCB scores. shape: (n_samples,)
- 戻り値の型:
np.ndarray
- 例外:
TypeError -- If prediction does not contain uncertainty estimates.
ValidationError -- If
beta_scheduleis set butreferenceisNone(i.e.score()was called directly, bypassingprepare()).