Add knowledge-gradient and noisy-EI acquisition functions#54
Merged
Conversation
Two lookahead optimization acquisitions, available as built-in strings for both single-task (GPOptimizer) and multi-task (fvGPOptimizer) decision-making: - "knowledge gradient": expected increase in the maximum of the posterior mean after a fantasized measurement (KGCP scheme; reference set = data points plus the candidate). The correlated-KG expectation E[max_i a_i + b_i Z] is computed exactly via the upper envelope of lines (Frazier, Powell & Dayanik 2009), validated against Monte Carlo. - "noisy expected improvement": EI averaged over the posterior of the incumbent, making it robust to observation noise (Letham et al. 2019). Monte-Carlo over posterior samples of the objective at the observed points, using common random numbers so the score is smooth for the acquisition optimizer. For multi-task GPs both act on the task-summed objective sum_t f(x, t), matching how the existing multi-task expected improvement / ucb scalarize the outputs. The scalarized cross-covariance is taken from posterior_covariance()["S_flat"] using the task-major (k = point + Npts*task) product-space ordering. Both are tunable through the constructor args dict (reference-set size, seed, and MC sample count for NEI). Wired into evaluate_gp_acquisition_function on both branches, the ask() docstring, tests (single and multi-task), and the acquisition-functions skill. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #54 +/- ##
==========================================
+ Coverage 89.74% 90.05% +0.30%
==========================================
Files 9 9
Lines 819 945 +126
==========================================
+ Hits 735 851 +116
- Misses 84 94 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ti-task skills The acquisition-functions skill already documents both new acquisitions; this surfaces them where a scientist actually picks one: - experiment-designer: acquisition decision row + template comment now point to "noisy expected improvement" and "knowledge gradient" for noisy/lookahead optimization - multi-task-advanced: note that EI/KG/noisy-EI work multi-task on the task-summed objective Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Two lookahead optimization acquisitions, available as built-in strings for both single-task (GPOptimizer) and multi-task (fvGPOptimizer) decision-making:
For multi-task GPs both act on the task-summed objective sum_t f(x, t), matching how the existing multi-task expected improvement / ucb scalarize the outputs. The scalarized cross-covariance is taken from posterior_covariance()["S_flat"] using the task-major (k = point + Npts*task) product-space ordering.
Both are tunable through the constructor args dict (reference-set size, seed, and MC sample count for NEI). Wired into evaluate_gp_acquisition_function on both branches, the ask() docstring, tests (single and multi-task), and the acquisition-functions skill.