Neps local and incumbent
NePSLocalPriorIncumbentSampler
dataclass
#
NePSLocalPriorIncumbentSampler(
space: PipelineSpace,
random_ratio: float = 0.0,
local_prior: dict[str, Any] | None = None,
inc_takeover_mode: Literal[0, 1, 2, 3] = 0,
)
Implement a sampler that samples from the incumbent.
inc_takeover_mode
class-attribute
instance-attribute
#
inc_takeover_mode: Literal[0, 1, 2, 3] = 0
The incumbent takeover mode. 0: Always mutate the first config. 1: Use the global incumbent. 2: Crossover between global incumbent and first config. 3: Choose randomly between 0, 1, and 2.
local_prior
class-attribute
instance-attribute
#
The local prior configuration.
random_ratio
class-attribute
instance-attribute
#
random_ratio: float = 0.0
The ratio of random sampling vs incumbent sampling.
sample_config
#
Sample a configuration based on the PriorBand algorithm.
| PARAMETER | DESCRIPTION |
|---|---|
table
|
The table containing the configurations and their performance.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict[str, Any]
|
dict[str, Any]: A sampled configuration. |