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:
- Create a
SearchEnginewith aConfigurationSpaceand budget. - Call
ask()to get the next configuration to try. - Run the experiment and call
tell(result)with the outcome. - 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.
- Search
Engine - The search engine: combines Sobol initial design with k-NN + EI Bayesian optimization.
- Sobol
Sequence - A Sobol quasi-random sequence generator for uniform coverage of the [0,1]^d unit hypercube. Uses the Joe & Kuo direction numbers (compact implementation).
- Track
AndStop Bandit - 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.