--- id: bayesian-optimization version: "3.3.0" license: The MIT License (MIT) Copyright (c) 2014 Fernando M. F. Nogueira Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) license_treatment: permissive maintenance: active --- # bayesian-optimization — Bayesian Optimization package License: permissive · Maintenance: active · Downloads: 789.7K/mo ## What it is and what it does Bayesian Optimization is a constrained global optimization library that finds the maximum of an unknown function by constructing a posterior distribution (Gaussian process) of candidate functions and iteratively selecting the most promising parameter combinations to evaluate. It is designed for scenarios where evaluating the objective function is computationally expensive or time-consuming—such as hyperparameter tuning for machine learning models, experimental design, or simulation-based optimization. The package works by fitting a Gaussian Process to previously observed function evaluations, then using an acquisition function (such as Upper Confidence Bound or Expected Improvement) to decide which parameters to try next. This approach reduces the number of function evaluations needed compared to grid search or random search. It supports bounded parameter spaces, random initialization phases to diversify exploration, and access to both the best result found and the full history of all trials. Use it for: - Tune hyperparameters of machine learning models when cross-validation is expensive - Optimize expensive simulations or physical experiments with limited budget for trials - Find optimal configuration parameters for systems where evaluation is time-consuming - Explore high-dimensional parameter spaces where grid or random search is infeasible - Balance exploration vs. exploitation in sequential decision-making problems ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Bayesian optimization using Gaussian processes to find the maximum of an expensive unknown function with minimal iterations, balancing exploration and exploitation automatically. Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and uses permissive MIT licensing. It is well-suited for anyone optimizing expensive functions where reducing the number of evaluations matters. The dependency chain (numpy, scipy, scikit-learn) is standard and stable. Start with it if you need Bayesian optimization; the API is straightforward. ## Install pip install bayesian-optimization uv add bayesian-optimization poetry add bayesian-optimization ## Installing bayesian-optimization Before you install: Low friction install with pure Python wheels. Actively maintained as of 76 days ago, supports Python 3.9 through 3.14, and depends on well-established scientific libraries (numpy, scipy, scikit-learn). License in practice: MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and proprietary projects. Quickstart: pip install bayesian-optimization from bayesian_optimization import BayesianOptimization def black_box_function(x, y): return -x**2 - (y - 1)**2 + 1 optimizer = BayesianOptimization( f=black_box_function, pbounds={'x': (2, 4), 'y': (-3, 3)}, random_state=1, ) optimizer.maximize(init_points=2, n_iter=3) print(optimizer.max) Verify before relying: - Whether the package handles multi-objective optimization or only single-objective maximization - Performance characteristics on high-dimensional parameter spaces (scalability limits) - Whether parallel or distributed evaluation of the objective function is supported ## Package facts - License: The MIT License (MIT) Copyright (c) 2014 Fernando M. F. Nogueira Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 789.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags bayesian optimization, gaussian process optimization, hyperparameter tuning, expensive function optimization, constrained global optimization, black-box function optimization, acquisition function maximization, optimization, hyperparameter-tuning, gaussian-processes [View on SkillFed](https://skillfed.io/packages/bayesian-optimization) · [View on PyPI](https://pypi.org/project/bayesian-optimization/)