bonni.EIConfig#
- class bonni.EIConfig(*, offset=0.0001, penalty_mode='none', stop_penalty_after=None, neighbor_threshold=0.3, value_factor=1.0, boundary_penalty_start=0.25)[source]#
Configuration for the Expected Improvement acquisition function. Specifically, this can be controlled to impose penalties on the evaluation of new samples. For example with penalty_mode=’bounds’, sampling near boundaries is penalized, or with penalty_mode=’distance’ sampling far from previous samples is penalized.
- offset#
Offset for increasing the exploration during optimization. by default this is a small positive value. Defaults to 1e-4.
- Type:
float
- stop_penalty_after#
Number of optimization iterations, after which no more penalty is applied. We recommend setting this to half the number of total iterations. Defaults to None.
- Type:
int | None
- penalty_mode#
Mode for penalizing different sampling behavior. With ‘none’, no penalty is applied. With ‘bounds’ sampling near boundary is penalized. With ‘distance’, samples far from previous samples are penalized. Defaults to ‘none’.
- Type:
Literal[‘none’, ‘bounds’, ‘distance’]
- distance_threshold#
Penalty threshold for the distance mode. This has to be value in the range [0, 1]. Defaults to 0.3.
- Type:
float
- penalty_weight#
Scale of the penalty applied. This should be roughly equivalent to the range between the minimum and maximum possible value of the objective function. Defaults to 1.0.
- Type:
float
- bounds_threshold#
Penalty threshold for the bounds mode. This has to be a value in the range [0, 0.5]. Defaults to 0.25.
- Type:
float
- __init__(*, offset=0.0001, penalty_mode='none', stop_penalty_after=None, neighbor_threshold=0.3, value_factor=1.0, boundary_penalty_start=0.25)#
Methods
__init__(*[, offset, penalty_mode, ...])Attributes
boundary_penalty_startneighbor_thresholdvalue_factor