Pr/bo only#187
Open
ju-he wants to merge 40 commits into
Open
Conversation
- Scale inputs to [0,1]^d and evaluate the acquisition in scaled space. - Use C * RBF (ARD) + WhiteKernel with sensible bounds; set small alpha. - Honor `optimize_hyperparameters` and disable HPO until n >= 5d points. - Handle PI’s sigma==0 path explicitly to avoid divide-by-zero warnings. These changes prevent RBF length-scales from pegging upper bounds on data-poor, deterministic benchmarks, improving BO stability and removing the warning spam.
Implement mixed-type search space support through continuous relaxation and projection for the Bayesian optimizer propagator. Features: - Integer parameters: continuous optimization with post-optimization rounding - Categorical parameters: one-hot encoding with softmax projection - Mixed spaces: support for float, int, and categorical parameters together - Input validation with clear error messages - Warning for high-dimensional position spaces (>100 dims) Implementation: - Add _project_to_discrete() helper for type-aware projection - Update __init__ with type detection and dimension handling - Modify __call__ to apply projection at all generation points - Use position_dim for kernel and optimizer sizing - Update documentation with mixed-type examples Testing: - 14 new comprehensive tests in test_bayesian_optimizer_mixed_types.py - Integration test in test_bayesian_optimizer.py - Verify backward compatibility with existing float-only tests - All tests passing (25/25)
… losses and subsampling
…rt in mixed spaces
for more information, see https://pre-commit.ci
Adds acquisition_type="TS" to BayesianOptimizer. TS draws one joint GP posterior sample over a candidate set and returns its argmin, bypassing L-BFGS-B and requiring no xi/kappa tuning. Each MPI rank draws an independent sample, providing natural parallel diversity without rank_stretch. Includes unit/integration tests and documentation.
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a full Bayesian Optimization workflow to Propulate and integrates it into the public API, docs, tutorials, and tests.
Summary of changes:
BayesianOptimizerinpropulate/propagators/bayesopt.py.SingleCPUFitter, scikit-learn backend) with robust GP fitting (_robust_lbfgs) and diagnostics.EI,PI,UCB(implemented in minimization form asmu - kappa * sigma)create_acquisition, rank-stretch scaling across MPI rankstop_melites + diversity sampling) and safer handling of non-finite losses.soboldefault,lhs,random) and hyperparameter optimization scheduling.propulate/propagators/__init__.pyand adds LCB alias export.propulate/population.py:Individual.__setitem__tests/test_bayesian_optimizer.py.docs/bayesian_optimizer.rstdocs/tut_bayesopt.rstdocs/usage.rst,docs/tut_propulator.rst,docs/algos_explained.rstdocs/autoapi/index.rsttutorials/bayesian_optimizer_example.py.Motivation/context:
Dependencies required for this change:
scikit-learn,scipyValidation notes:
Type of change
Checklist: