Dsxir. Optimizer. Search. Sampler behaviour
(dsxir v0.2.0)
Copy Markdown
Behaviour for categorical hyperparameter samplers used by Dsxir.Optimizer.MIPROv2
and any other optimizer that searches a fixed categorical space.
The space is a map from dimension key to a {:categorical, [choices]} tuple.
Configs are maps from dimension key to a chosen value (typically an integer index
into the choices list). Observations pair a config with its scalar score.
suggest/3 returns n candidate configs and the (possibly mutated) sampler state.
observe/2 takes a list of observations — batched, one call per suggest batch —
and folds them into state. Random's observe/2 is a no-op; TPE's updates its
good/bad partition.
Summary
Types
Callbacks
@callback observe(state :: term(), [observation()]) :: state :: term()
@callback suggest(state :: term(), history :: [observation()], n :: pos_integer()) :: {[config()], state :: term()}