Skip to content

Commit

Permalink
docs: add pyhf compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-eschle committed Oct 15, 2024
1 parent 9a02681 commit 00b77a5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Develop
Major Features and Improvements
-------------------------------
- `TF-PWA <https://tf-pwa.readthedocs.io/en/latest/>`_ support for loss functions. Minimizer can directly minimize the loss function of a model.
- `pyhf <https://pyhf.readthedocs.io/en/stable/>`_ support for loss functions. Minimizer can directly minimize the loss function of a model.

Breaking changes
------------------
Expand Down
32 changes: 32 additions & 0 deletions docs/api/static/zfit_physics.pyhf.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
pyhf
=======================

The pure Python package `pyhf <https://pyhf.readthedocs.io/en/stable/>`_ 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:

0 comments on commit 00b77a5

Please sign in to comment.