A categorical Tree-structured Parzen Estimator.
Each dimension is a categorical choice 0..n-1. The first n_startup
suggestions are uniform. After that, observations are split into a good
group (the best min(ceil(gamma * n), 25) scores, higher is better) and a
bad group. For each dimension independently, smoothed category densities
l(x) and g(x) are computed with a uniform prior of weight prior_weight;
n_candidates values are sampled from l and the one with the highest
l(x) / g(x) is chosen, earliest on ties.
This follows the documented behavior of Optuna's independent categorical TPE sampler. It does not reproduce Optuna's random number stream, multivariate mode, or Parzen weighting of older trials.
Summary
Functions
Builds a sampler for a space of dimension name to category count.
Suggests one choice from {choice, score} observations.
Types
@type choice() :: %{required(String.t()) => non_neg_integer()}
@type t() :: %Tune.Optimizers.TPE{ gamma: float(), n_candidates: pos_integer(), n_startup: non_neg_integer(), prior_weight: float(), space: %{required(String.t()) => pos_integer()} }
Functions
@spec new(%{required(String.t()) => pos_integer()}, keyword()) :: t()
Builds a sampler for a space of dimension name to category count.
@spec suggest(t(), [{choice(), number()}], Tune.Search.Program.Context.t()) :: {choice(), Tune.Search.Program.Context.t()}
Suggests one choice from {choice, score} observations.