Skip to content

Add profile-curve scan helpers and vectorize Neyman belts - #2

Merged
JaLuka98 merged 2 commits into
mainfrom
scan-helpers-and-batched-toys
Jun 18, 2026
Merged

Add profile-curve scan helpers and vectorize Neyman belts#2
JaLuka98 merged 2 commits into
mainfrom
scan-helpers-and-batched-toys

Conversation

@JaLuka98

Copy link
Copy Markdown
Owner

This pull request introduces several new features and improvements to the Neyman construction and profile likelihood workflow, focusing on performance and usability. The main updates include new utility functions for generating and inverting Neyman belts using precomputed grids, enhancements to the simulation API, and more efficient computation of profile likelihood curves.

Neyman construction and profile likelihood enhancements:

  • Added build_belts_from_grid to neyman.py, allowing multiple Neyman belts to be constructed efficiently from a single toy ensemble and grid scan.
  • Added invert_belt_from_curve, which enables inverting a Neyman belt using a precomputed observed q curve, avoiding repeated likelihood fits.
  • Added profile_curve_from_likelihood and profile_curve_from_grid to stats.py for efficient evaluation of the profile likelihood (NLL) on a parameter grid without repeated minimization.

API and usability improvements:

  • Updated the public API in __init__.py to export the new functions: build_belts_from_grid, invert_belt_from_curve, profile_curve_from_likelihood, and profile_curve_from_grid. [1] [2]
  • Refactored GaussianModel.simulate to support generating multiple pseudo-experiments at once via a new size argument, and exposed the covariance and inverse covariance matrices as properties for easier access.

@JaLuka98 JaLuka98 self-assigned this Jun 18, 2026
@JaLuka98

Copy link
Copy Markdown
Owner Author

Tests are failing because they are written for the current main version with an mle fit, now the grid leads to a boundary condition, this will be fixed later

@JaLuka98
JaLuka98 merged commit a07ae3d into main Jun 18, 2026
0 of 2 checks passed
@JaLuka98
JaLuka98 deleted the scan-helpers-and-batched-toys branch June 18, 2026 11:30
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