diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5be70da..cb6f38d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,7 @@ Develop Major Features and Improvements ------------------------------- - `TF-PWA `_ support for loss functions. Minimizer can directly minimize the loss function of a model. +- `pyhf `_ support for loss functions. Minimizer can directly minimize the loss function of a model. Breaking changes ------------------ diff --git a/docs/api/static/zfit_physics.pyhf.rst b/docs/api/static/zfit_physics.pyhf.rst new file mode 100644 index 0000000..7a81322 --- /dev/null +++ b/docs/api/static/zfit_physics.pyhf.rst @@ -0,0 +1,32 @@ +pyhf +======================= + +The pure Python package `pyhf `_ is a statistical fitting package for high energy physics for purely binned, templated fits. It is a Python implementation of the HistFactory schema. +The connection to zfit is done via the loss function, which can be created from a pyhf model. + +Import the module with: + +.. code-block:: python + + import zfit_physics.pyhf as zpyhf + +The loss function can be created from a ``data`` and a ``pdf`` model with + +.. code-block:: python + + nll = zpyhf.loss.nll_from_pyhf(data, pdf) + + + +which optionally takes already created :py:class:~`zfit.core.interfaces.ZfitParameter` as arguments. + + + + +Loss +++++++++++++ + +.. automodule:: zfit_physics.pyhf.loss + :members: + :undoc-members: + :show-inheritance: