scikit-hep / pyhf

pure-Python HistFactory implementation with tensors and autodiff
https://pyhf.readthedocs.io/
Apache License 2.0
279 stars 83 forks source link

Nested sampling for p-values #1481

Open andrewfowlie opened 3 years ago

andrewfowlie commented 3 years ago

Description

We've developed a new method for fast computation of small p-values, making no asymptotic assumptions: Nested sampling for frequentist computation: fast estimation of small p-values (2105.13923).

Describe the solution you'd like

I'm not sure the extent to which pyhf includes computational methods. But if it does, I think a nice project for a student would be to link pyhf to standard nested sampling software (there is an established suite of tools, some pure Python, some Python interfaces) and implement the method.

lukasheinrich commented 3 years ago

hi @andrewfowlie - what external sampling software did you have in mind?

andrewfowlie commented 3 years ago

One of dynesty, ultranest (pure python), MultiNest or PolyChord (Fortran with Python API) They have some pros and cons (check-pointing to disk, MPI parallelziation versus threading etc, methods for implementing aspects of NS)

sebhoof commented 3 years ago

Just for convenience: Here's a link to the corresponding repo, where we demonstrate how the Python wrappers for MultiNest and PolyChord can be used with our algorithm: https://github.com/andrewfowlie/ns_for_p_values

It's a bit hacky but should provide a good starting point for doing the same with dynesty, ultranest, ...