Skip to content

Updates from 12IDB Beamtime #93

Merged
martintb merged 2 commits intomainfrom
2603_APS_12IDB
Mar 7, 2026
Merged

Updates from 12IDB Beamtime #93
martintb merged 2 commits intomainfrom
2603_APS_12IDB

Conversation

@martintb
Copy link
Collaborator

@martintb martintb commented Mar 6, 2026

This pull request introduces epsilon-greedy sampling to the acquisition function logic, allowing for a mix of random and optimal selection when picking next samples. It also adds input validation for the new parameter and updates plotting marker symbols for improved visualization. The changes are primarily focused on enhancing the sampling strategy and robustness of the acquisition process.

Enhancements to acquisition function sampling:

  • Added a random_fraction parameter to the AcquisitionFunction class and its subclasses, enabling epsilon-greedy sampling where a fraction of samples are chosen randomly from all valid points, and the rest from the top-performing set. [1] [2] [3] [4] [5]
  • Updated the get_next_samples method to implement epsilon-greedy sampling logic, including robust error handling for cases with insufficient valid points. [1] [2]

Input validation improvements:

  • Added validation to ensure random_fraction is within the range [0, 1], raising a ValueError if out of bounds.

Subclass integration:

  • Propagated the random_fraction parameter through subclass constructors to ensure consistent behavior across all acquisition function variants. [1] [2] [3] [4]

Plotting update:

  • Simplified and updated the set of marker symbols used in plot_scatter_plotly for clearer and more consistent visualization.

@martintb martintb merged commit a3de58a into main Mar 7, 2026
6 checks passed
@martintb martintb deleted the 2603_APS_12IDB branch March 7, 2026 01:01
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.

1 participant