Skip to content

Bayesian Search - #509

Open
andrewdalpino wants to merge 7 commits into
3.1from
bayesian-search
Open

andrewdalpino wants to merge 7 commits into
3.1from
bayesian-search

Conversation

@andrewdalpino

Copy link
Copy Markdown
Member

A companion to Grid Search. Uses Optuna-style TPE to iteratively propose the next set of hyper-parameters over n trials.

@andrewdalpino
andrewdalpino requested review from a team and a lite review from Copilot September 20, 2026 17:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

There are correctness/performance issues in candidate generation and search-space sizing that can lead to wasted trials and severe memory usage on large spaces.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 Medium severity · 2 Low severity

Open (5)
What changed in this PR

Introduces a new BayesianSearch meta-estimator (TPE-style sampler) as a companion to GridSearch, including PHPUnit coverage and documentation updates to expose the new tuning option in the docs navigation.

Changes:

  • Added Rubix\ML\BayesianSearch implementing sequential Bayesian hyper-parameter optimization with a startup random-search phase and result reporting (scores(), results(), best()).
  • Added end-to-end PHPUnit tests validating training, best-trial selection, result ordering, and argument validation behavior.
  • Added documentation pages/links describing Bayesian Search and comparing it to Grid Search.
File Description
src/​BayesianSearch.php New Bayesian hyper-parameter search meta-estimator using TPE-style sampling.
tests/​Base/​BayesianSearchTest.php New PHPUnit coverage for BayesianSearch behavior and validation.
docs/​bayesian-search.md New documentation page for Bayesian Search usage and API.
docs/​hyper-parameter-tuning.md Added Bayesian Search section and example.
mkdocs.yml Added Bayesian Search to docs navigation under Meta Estimators.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/BayesianSearch.php
Comment thread src/BayesianSearch.php
Comment thread src/BayesianSearch.php
Comment thread docs/bayesian-search.md Outdated
Comment thread docs/hyper-parameter-tuning.md Outdated
andrewdalpino and others added 6 commits September 20, 2026 12:55
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Update return type of base() method and clarify hyper-parameter retrieval.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants