Skip to content

Ucb

neps.optimizers.bayesian_optimization.acquisition_functions.ucb #

UpperConfidenceBound #

UpperConfidenceBound(
    beta: float = 1.0, maximize: bool = False
)

Bases: BaseAcquisition

PARAMETER DESCRIPTION
beta

Controls the balance between exploration and exploitation.

TYPE: float DEFAULT: 1.0

maximize

If True, maximize the given model, else minimize. DEFAULT=False, assumes minimzation.

TYPE: bool DEFAULT: False

Source code in neps/optimizers/bayesian_optimization/acquisition_functions/ucb.py
def __init__(self, beta: float=1.0, maximize: bool=False):
    """Upper Confidence Bound (UCB) acquisition function.

    Args:
        beta: Controls the balance between exploration and exploitation.
        maximize: If True, maximize the given model, else minimize.
            DEFAULT=False, assumes minimzation.
    """
    super().__init__()
    self.beta = beta  # can be updated as part of the state for dynamism or a schedule
    self.maximize = maximize

    # to be initialized as part of the state
    self.surrogate_model = None