Introduce multiparam gridding - #4
Merged
Merged
Conversation
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.
This pull request significantly extends the Neyman construction and profiling utilities for multi-parameter statistical inference in the
npkitpackage. The main focus is on supporting grid-based and profiled grid-based confidence belt construction, with new helper functions and data structures for efficient and flexible multi-parameter scans.Key additions and improvements:
Multi-parameter grid support
GridBeltdataclass to represent critical quantiles for multi-parameter grid scans, enabling more general Neyman belt construction beyond 1D cases.build_grid_beltfor constructing Neyman belts over arbitrary parameter grids without fitting, andbuild_profiled_grid_beltfor building 1D belts by profiling over a grid of nuisance parameters.Vectorized and utility functions
precompute_predictionsfor efficient batch evaluation of model predictions on parameter grids, andchi2_gridfor vectorized computation of chi-squared statistics over grids.q_grid_profileandq_grid_profile_slicefor evaluating profile likelihood-ratio statistics on grids, supporting both fixed-slice and best-fit approaches.grid_mask_for_fixed_paramsto select grid points matching fixed parameter values, facilitating profiling and slicing operations.API and usability enhancements
build_belts_from_gridto support batch processing via abatch_sizeparameter and improved quantile extraction for multiple confidence levels in a single pass. [1] [2] [3]__init__.pyto expose all new functions and theGridBeltclass in the public API. [1] [2]These changes provide a robust foundation for multi-parameter confidence interval construction, profiling, and efficient statistical computation workflows in the package.