BayesianOptimization Repo Skill
Use this repo skill when a user asks about the bayesian-optimization package,
its bayes_opt import, Gaussian-process Bayesian optimization, black-box
function maximization, small hyperparameter optimization, acquisition functions,
constraints, typed/categorical parameters, sequential domain reduction, or
maintaining this package's source checkout.
This skill is self-contained. Do not send future agents to original repository
notebooks or examples for package usage; use the bundled references and scripts
below. Checkout-only test and docs commands are confined to the maintainer
sub-skill.
Install and import baseline
Package users normally install one of:
pip install bayesian-optimization
conda install -c conda-forge bayesian-optimization
Minimal import check:
from bayes_opt import BayesianOptimization
def objective(x, y):
return -x**2 - (y - 1.0) ** 2 + 1.0
optimizer = BayesianOptimization(
f=objective,
pbounds={"x": (-2.0, 2.0), "y": (-3.0, 3.0)},
random_state=1,
verbose=0,
)
optimizer.maximize(init_points=1, n_iter=1)
assert optimizer.max is not None
For an environment-level diagnostic, run