Skip to main content

Module search

Module search 

Source
Expand description

Search and optimization engine: Sobol quasi-random initial design, a k-NN surrogate with Expected Improvement acquisition (Bayesian-style), and a Track-and-Stop multi-armed bandit for A/B testing.

The ask-and-tell API:

  1. Create a SearchEngine with a ConfigurationSpace and budget.
  2. Call ask() to get the next configuration to try.
  3. Run the experiment and call tell(result) with the outcome.
  4. Repeat until budget exhausted. Call best() for the Pareto-optimal result.

Structs§

KnnSurrogate
A simple k-nearest-neighbor surrogate model for the objective function. Predicts the objective at a new point as the distance-weighted average of the k nearest observed points. This is a lightweight alternative to a full Random Forest (SMAC3) or Gaussian Process, suitable for small budgets.
SearchEngine
The search engine: combines Sobol initial design with k-NN + EI Bayesian optimization.
SobolSequence
A Sobol quasi-random sequence generator for uniform coverage of the [0,1]^d unit hypercube. Uses the Joe & Kuo direction numbers (compact implementation).
TrackAndStopBandit
A multi-armed bandit using the Track-and-Stop algorithm for best-arm identification. Given a small set of pre-selected configurations, it adaptively allocates samples to identify the best one with statistical rigor.

Functions§

expected_improvement
Expected Improvement (EI) acquisition function. EI(x) = (mu - f_best) * Phi(Z) + sigma * phi(Z) where Z = (mu - f_best) / sigma. Higher EI = more promising to try.