scikit-hep / pyhf

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

Provide simple API to get pre/post fit distributions with errors #726

Open ntadej opened 4 years ago

ntadej commented 4 years ago

The usual HEP workflow is to create a workspace with several channels and several systematics. In the final paper we need to show the post-fit distributions with appropriate errors.

The request is to have a simple interface to get the channel distribution with errors, ideally just two arrays (one with yields and one with errors), supporting:

Plotting the actual distributions is then certainly out of scope of pyhf.

alexander-held commented 4 years ago

I believe this is a very important ingredient needed to allow people to fully move to pyhf. As @lukasheinrich mentions in #731, it's not so easy to calculate the post-fit uncertainty band and I've seen calculations starting to break especially with high parameter correlations. I think it would be useful to not only get the uncertainty of the total model prediction, but also per sample (e.g. needed for yield tables).

alexander-held commented 3 years ago

Since GitHub does not seem to link discussions back to issues: #1414 is related to this request.