pyhf

pyhf: pure-Python implementation of HistFactory statistical models - Published in JOSS (2021)

https://github.com/scikit-hep/pyhf

Science Score: 100.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 13 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, joss.theoj.org, zenodo.org
  • Committers with academic emails
    6 of 35 committers (17.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

asymptotic-formulas closember cls frequentist-statistics hep hep-ex high-energy-physics histfactory jax numpy python pytorch scientific-computations scikit-hep scipy statistical-inference statistics tensorflow

Keywords from Contributors

mesh energy-systems exoplanet climate-science astronomy astropy solar solar-physics sun sunpy

Scientific Fields

Engineering Computer Science - 40% confidence
Last synced: 4 months ago · JSON representation ·

Repository

pure-Python HistFactory implementation with tensors and autodiff

Basic Info
  • Host: GitHub
  • Owner: scikit-hep
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage: https://pyhf.readthedocs.io/
  • Size: 56 MB
Statistics
  • Stars: 288
  • Watchers: 9
  • Forks: 90
  • Open Issues: 451
  • Releases: 39
Topics
asymptotic-formulas closember cls frequentist-statistics hep hep-ex high-energy-physics histfactory jax numpy python pytorch scientific-computations scikit-hep scipy statistical-inference statistics tensorflow
Created almost 8 years ago · Last pushed 4 months ago
Metadata Files
Readme Contributing License Code of conduct Citation Governance Authors Zenodo

README.rst

.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/_static/img/pyhf-logo.svg
   :alt: pyhf logo
   :width: 320
   :align: center

pure-python fitting/limit-setting/interval estimation HistFactory-style
=======================================================================

|GitHub Project| |DOI| |JOSS DOI| |Scikit-HEP| |NSF Award Number IRIS-HEP v1| |NSF Award Number IRIS-HEP v2| |NumFOCUS Affiliated Project|

|Docs from latest| |Docs from main| |Jupyter Book tutorial| |Binder|

|PyPI version| |Conda-forge version| |Supported Python versions| |Docker Hub pyhf| |Docker Hub pyhf CUDA|

|Code Coverage| |CodeFactor| |pre-commit.ci Status| |Code style: black|

|GitHub Actions Status: CI| |GitHub Actions Status: Docs| |GitHub Actions Status: Publish|
|GitHub Actions Status: Docker|

The HistFactory p.d.f. template
[`CERN-OPEN-2012-016 `__] is per-se
independent of its implementation in ROOT and sometimes, it’s useful to
be able to run statistical analysis outside of ROOT, RooFit, RooStats
framework.

This repo is a pure-python implementation of that statistical model for
multi-bin histogram-based analysis and its interval estimation is based
on the asymptotic formulas of “Asymptotic formulae for likelihood-based
tests of new physics”
[`arXiv:1007.1727 `__]. The aim is also
to support modern computational graph libraries such as PyTorch and
TensorFlow in order to make use of features such as autodifferentiation
and GPU acceleration.

..
  Comment: JupyterLite segment goes here in docs

User Guide
----------

For an in depth walkthrough of usage of the latest release of ``pyhf`` visit the |pyhf tutorial|_.

.. |pyhf tutorial| replace:: ``pyhf`` tutorial
.. _pyhf tutorial: https://pyhf.github.io/pyhf-tutorial/

Hello World
-----------

This is how you use the ``pyhf`` Python API to build a statistical model and run basic inference:

.. code:: pycon

   >>> import pyhf
   >>> pyhf.set_backend("numpy")
   >>> model = pyhf.simplemodels.uncorrelated_background(
   ...     signal=[12.0, 11.0], bkg=[50.0, 52.0], bkg_uncertainty=[3.0, 7.0]
   ... )
   >>> data = [51, 48] + model.config.auxdata
   >>> test_mu = 1.0
   >>> CLs_obs, CLs_exp = pyhf.infer.hypotest(
   ...     test_mu, data, model, test_stat="qtilde", return_expected=True
   ... )
   >>> print(f"Observed: {CLs_obs:.8f}, Expected: {CLs_exp:.8f}")
   Observed: 0.05251497, Expected: 0.06445321

Alternatively the statistical model and observational data can be read from its serialized JSON representation (see next section).

.. code:: pycon

   >>> import pyhf
   >>> import requests
   >>> pyhf.set_backend("numpy")
   >>> url = "https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/examples/json/2-bin_1-channel.json"
   >>> wspace = pyhf.Workspace(requests.get(url).json())
   >>> model = wspace.model()
   >>> data = wspace.data(model)
   >>> test_mu = 1.0
   >>> CLs_obs, CLs_exp = pyhf.infer.hypotest(
   ...     test_mu, data, model, test_stat="qtilde", return_expected=True
   ... )
   >>> print(f"Observed: {CLs_obs:.8f}, Expected: {CLs_exp:.8f}")
   Observed: 0.35998409, Expected: 0.35998409


Finally, you can also use the command line interface that ``pyhf`` provides

.. code:: bash

   $ cat << EOF  | tee likelihood.json | pyhf cls
   {
       "channels": [
           { "name": "singlechannel",
             "samples": [
               { "name": "signal",
                 "data": [12.0, 11.0],
                 "modifiers": [ { "name": "mu", "type": "normfactor", "data": null} ]
               },
               { "name": "background",
                 "data": [50.0, 52.0],
                 "modifiers": [ {"name": "uncorr_bkguncrt", "type": "shapesys", "data": [3.0, 7.0]} ]
               }
             ]
           }
       ],
       "observations": [
           { "name": "singlechannel", "data": [51.0, 48.0] }
       ],
       "measurements": [
           { "name": "Measurement", "config": {"poi": "mu", "parameters": []} }
       ],
       "version": "1.0.0"
   }
   EOF

which should produce the following JSON output:

.. code:: json

   {
      "CLs_exp": [
         0.0026062609501074576,
         0.01382005356161206,
         0.06445320535890459,
         0.23525643861460702,
         0.573036205919389
      ],
      "CLs_obs": 0.05251497423736956
   }

What does it support
--------------------

Implemented variations:
  - ☑ HistoSys
  - ☑ OverallSys
  - ☑ ShapeSys
  - ☑ NormFactor
  - ☑ Multiple Channels
  - ☑ Import from XML + ROOT via `uproot `__
  - ☑ ShapeFactor
  - ☑ StatError
  - ☑ Lumi Uncertainty
  - ☑ Non-asymptotic calculators

Computational Backends:
  - ☑ NumPy
  - ☑ PyTorch
  - ☑ TensorFlow
  - ☑ JAX

Optimizers:
  - ☑ SciPy (``scipy.optimize``)
  - ☑ MINUIT (``iminuit``)

All backends can be used in combination with all optimizers.
Custom user backends and optimizers can be used as well.

Todo
----

-  ☐ StatConfig

results obtained from this package are validated against output computed
from HistFactory workspaces

A one bin example
-----------------

.. code:: python

   import pyhf
   import numpy as np
   import matplotlib.pyplot as plt
   from pyhf.contrib.viz import brazil

   pyhf.set_backend("numpy")
   model = pyhf.simplemodels.uncorrelated_background(
       signal=[10.0], bkg=[50.0], bkg_uncertainty=[7.0]
   )
   data = [55.0] + model.config.auxdata

   poi_vals = np.linspace(0, 5, 41)
   results = [
       pyhf.infer.hypotest(
           test_poi, data, model, test_stat="qtilde", return_expected_set=True
       )
       for test_poi in poi_vals
   ]

   fig, ax = plt.subplots()
   fig.set_size_inches(7, 5)
   brazil.plot_results(poi_vals, results, ax=ax)
   fig.show()

**pyhf**

.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/_static/img/README_1bin_example.png
   :alt: manual
   :width: 500
   :align: center

**ROOT**

.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/_static/img/hfh_1bin_55_50_7.png
   :alt: manual
   :width: 500
   :align: center

A two bin example
-----------------

.. code:: python

   import pyhf
   import numpy as np
   import matplotlib.pyplot as plt
   from pyhf.contrib.viz import brazil

   pyhf.set_backend("numpy")
   model = pyhf.simplemodels.uncorrelated_background(
       signal=[30.0, 45.0], bkg=[100.0, 150.0], bkg_uncertainty=[15.0, 20.0]
   )
   data = [100.0, 145.0] + model.config.auxdata

   poi_vals = np.linspace(0, 5, 41)
   results = [
       pyhf.infer.hypotest(
           test_poi, data, model, test_stat="qtilde", return_expected_set=True
       )
       for test_poi in poi_vals
   ]

   fig, ax = plt.subplots()
   fig.set_size_inches(7, 5)
   brazil.plot_results(poi_vals, results, ax=ax)
   fig.show()


**pyhf**

.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/_static/img/README_2bin_example.png
   :alt: manual
   :width: 500
   :align: center

**ROOT**

.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/_static/img/hfh_2_bin_100.0_145.0_100.0_150.0_15.0_20.0_30.0_45.0.png
   :alt: manual
   :width: 500
   :align: center

Installation
------------

To install ``pyhf`` from PyPI with the NumPy backend run

.. code:: bash

   python -m pip install pyhf

and to install ``pyhf`` with all additional backends run

.. code:: bash

   python -m pip install pyhf[backends]

or a subset of the options.

To uninstall run

.. code:: bash

   python -m pip uninstall pyhf

Documentation
-------------

For model specification, API reference, examples, and answers to FAQs visit the |pyhf documentation|_.

.. |pyhf documentation| replace:: ``pyhf`` documentation
.. _pyhf documentation: https://pyhf.readthedocs.io/

Questions
---------

If you have a question about the use of ``pyhf`` not covered in `the
documentation `__, please ask a question
on the `GitHub Discussions `__.

If you believe you have found a bug in ``pyhf``, please report it in the
`GitHub
Issues `__.
If you're interested in getting updates from the ``pyhf`` dev team and release
announcements you can join the |pyhf-announcements mailing list|_.

.. |pyhf-announcements mailing list| replace:: ``pyhf-announcements`` mailing list
.. _pyhf-announcements mailing list: https://groups.google.com/group/pyhf-announcements/subscribe

Citation
--------

As noted in `Use and Citations `__,
the preferred BibTeX entry for citation of ``pyhf`` includes both the
`Zenodo `__ archive and the
`JOSS `__ paper:

.. code:: bibtex

   @software{pyhf,
     author = {Lukas Heinrich and Matthew Feickert and Giordon Stark},
     title = "{pyhf: v0.7.6}",
     version = {0.7.6},
     doi = {10.5281/zenodo.1169739},
     url = {https://doi.org/10.5281/zenodo.1169739},
     note = {https://github.com/scikit-hep/pyhf/releases/tag/v0.7.6}
   }

   @article{pyhf_joss,
     doi = {10.21105/joss.02823},
     url = {https://doi.org/10.21105/joss.02823},
     year = {2021},
     publisher = {The Open Journal},
     volume = {6},
     number = {58},
     pages = {2823},
     author = {Lukas Heinrich and Matthew Feickert and Giordon Stark and Kyle Cranmer},
     title = {pyhf: pure-Python implementation of HistFactory statistical models},
     journal = {Journal of Open Source Software}
   }

Authors
-------

``pyhf`` is openly developed by Lukas Heinrich, Matthew Feickert, and Giordon Stark.

Please check the `contribution statistics for a list of
contributors `__.

Milestones
----------

- 2022-09-12: 2000 GitHub issues and pull requests. (See PR `#2000 `__)
- 2021-12-09: 1000 commits to the project. (See PR `#1710 `__)
- 2020-07-28: 1000 GitHub issues and pull requests. (See PR `#1000 `__)

Acknowledgements
----------------

Matthew Feickert has received support to work on ``pyhf`` provided by NSF
cooperative agreements `OAC-1836650 `__
and `PHY-2323298 `__ (IRIS-HEP)
and grant `OAC-1450377 `__ (DIANA/HEP).

``pyhf`` is a `NumFOCUS Affiliated Project `__.

.. |GitHub Project| image:: https://img.shields.io/badge/GitHub--blue?style=social&logo=GitHub
   :target: https://github.com/scikit-hep/pyhf
.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1169739.svg
   :target: https://doi.org/10.5281/zenodo.1169739
.. |JOSS DOI| image:: https://joss.theoj.org/papers/10.21105/joss.02823/status.svg
   :target: https://doi.org/10.21105/joss.02823
.. |Scikit-HEP| image:: https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg
   :target: https://scikit-hep.org/
.. |NSF Award Number IRIS-HEP v1| image:: https://img.shields.io/badge/NSF-1836650-blue.svg
   :target: https://nsf.gov/awardsearch/showAward?AWD_ID=1836650
.. |NSF Award Number IRIS-HEP v2| image:: https://img.shields.io/badge/NSF-2323298-blue.svg
   :target: https://nsf.gov/awardsearch/showAward?AWD_ID=2323298
.. |NumFOCUS Affiliated Project| image:: https://img.shields.io/badge/NumFOCUS-Affiliated%20Project-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
   :target: https://numfocus.org/sponsored-projects/affiliated-projects
.. |Docs from latest| image:: https://img.shields.io/badge/docs-v0.7.6-blue.svg
   :target: https://pyhf.readthedocs.io/
.. |Docs from main| image:: https://img.shields.io/badge/docs-main-blue.svg
   :target: https://scikit-hep.github.io/pyhf
.. |Jupyter Book tutorial| image:: https://jupyterbook.org/_images/badge.svg
   :target: https://pyhf.github.io/pyhf-tutorial/
.. |Binder| image:: https://mybinder.org/badge_logo.svg
   :target: https://mybinder.org/v2/gh/scikit-hep/pyhf/main?labpath=docs%2Fexamples%2Fnotebooks%2Fbinderexample%2FStatisticalAnalysis.ipynb

.. |PyPI version| image:: https://badge.fury.io/py/pyhf.svg
   :target: https://badge.fury.io/py/pyhf
.. |Conda-forge version| image:: https://img.shields.io/conda/vn/conda-forge/pyhf.svg
   :target: https://prefix.dev/channels/conda-forge/packages/pyhf
.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/pyhf.svg
   :target: https://pypi.org/project/pyhf/
.. |Docker Hub pyhf| image:: https://img.shields.io/badge/pyhf-v0.7.6-blue?logo=Docker
   :target: https://hub.docker.com/r/pyhf/pyhf/tags
.. |Docker Hub pyhf CUDA| image:: https://img.shields.io/badge/pyhf-CUDA-blue?logo=Docker
   :target: https://hub.docker.com/r/pyhf/cuda/tags

.. |Code Coverage| image:: https://codecov.io/gh/scikit-hep/pyhf/graph/badge.svg?branch=main
   :target: https://codecov.io/gh/scikit-hep/pyhf?branch=main
.. |CodeFactor| image:: https://www.codefactor.io/repository/github/scikit-hep/pyhf/badge
   :target: https://www.codefactor.io/repository/github/scikit-hep/pyhf
.. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/scikit-hep/pyhf/main.svg
  :target: https://results.pre-commit.ci/latest/github/scikit-hep/pyhf/main
  :alt: pre-commit.ci status
.. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/psf/black

.. |GitHub Actions Status: CI| image:: https://github.com/scikit-hep/pyhf/actions/workflows/ci.yml/badge.svg
   :target: https://github.com/scikit-hep/pyhf/actions/workflows/ci.yml?query=branch%3Amain
.. |GitHub Actions Status: Docs| image:: https://github.com/scikit-hep/pyhf/actions/workflows/docs.yml/badge.svg
   :target: https://github.com/scikit-hep/pyhf/actions/workflows/docs.yml?query=branch%3Amain
.. |GitHub Actions Status: Publish| image:: https://github.com/scikit-hep/pyhf/actions/workflows/publish-package.yml/badge.svg
   :target: https://github.com/scikit-hep/pyhf/actions/workflows/publish-package.yml?query=branch%3Amain
.. |GitHub Actions Status: Docker| image:: https://github.com/scikit-hep/pyhf/actions/workflows/docker.yml/badge.svg
   :target: https://github.com/scikit-hep/pyhf/actions/workflows/docker.yml?query=branch%3Amain

Owner

  • Name: Scikit-HEP Project
  • Login: scikit-hep
  • Kind: organization
  • Email: scikit-hep-forum@googlegroups.com

A community project for High Energy Physics data analysis in Python

JOSS Publication

pyhf: pure-Python implementation of HistFactory statistical models
Published
February 04, 2021
Volume 6, Issue 58, Page 2823
Authors
Lukas Heinrich ORCID
CERN
Matthew Feickert ORCID
University of Illinois at Urbana-Champaign
Giordon Stark ORCID
SCIPP, University of California, Santa Cruz
Kyle Cranmer ORCID
New York University
Editor
Eloisa Bentivegna ORCID
Tags
physics high energy physics statistical modeling fitting auto-differentiation

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Please cite the following works when using this software."
type: software
authors:
- family-names: "Heinrich"
  given-names: "Lukas"
  orcid: "https://orcid.org/0000-0002-4048-7584"
  affiliation: "Technical University of Munich"
- family-names: "Feickert"
  given-names: "Matthew"
  orcid: "https://orcid.org/0000-0003-4124-7862"
  affiliation: "University of Wisconsin-Madison"
- family-names: "Stark"
  given-names: "Giordon"
  orcid: "https://orcid.org/0000-0001-6616-3433"
  affiliation: "SCIPP, University of California, Santa Cruz"
title: "pyhf: v0.7.6"
version: 0.7.6
doi: 10.5281/zenodo.1169739
repository-code: "https://github.com/scikit-hep/pyhf/releases/tag/v0.7.6"
url: "https://pyhf.readthedocs.io/en/v0.7.6/"
keywords:
  - python
  - physics
  - statistics
  - fitting
  - scipy
  - numpy
  - tensorflow
  - pytorch
  - jax
  - auto-differentiation
license: "Apache-2.0"
abstract: |
  The HistFactory p.d.f. template is per-se independent of its implementation
  in ROOT and it is useful to be able to run statistical analysis outside of
  the ROOT, RooFit, RooStats framework. pyhf is a pure-python implementation
  of that statistical model for multi-bin histogram-based analysis and its
  interval estimation is based on the asymptotic formulas of "Asymptotic
  formulae for likelihood-based tests of new physics". pyhf supports modern
  computational graph libraries such as TensorFlow, PyTorch, and JAX in order
  to make use of features such as autodifferentiation and GPU acceleration.
references:
  - type: article
    authors:
    - family-names: "Heinrich"
      given-names: "Lukas"
      orcid: "https://orcid.org/0000-0002-4048-7584"
      affiliation: "CERN"
    - family-names: "Feickert"
      given-names: "Matthew"
      orcid: "https://orcid.org/0000-0003-4124-7862"
      affiliation: "University of Illinois at Urbana-Champaign"
    - family-names: "Stark"
      given-names: "Giordon"
      orcid: "https://orcid.org/0000-0001-6616-3433"
      affiliation: "SCIPP, University of California, Santa Cruz"
    - family-names: "Cranmer"
      given-names: "Kyle"
      orcid: "https://orcid.org/0000-0002-5769-7094"
      affiliation: "New York University"
    title: "pyhf: pure-Python implementation of HistFactory statistical models"
    doi: 10.21105/joss.02823
    url: "https://doi.org/10.21105/joss.02823"
    year: 2021
    publisher:
      name: "The Open Journal"
    volume: 6
    number: 58
    pages: 2823
    journal: Journal of Open Source Software

Papers & Mentions

Total mentions: 1

Lepton flavor violation and dilepton tails at the LHC
Last synced: 2 months ago

GitHub Events

Total
  • Issues event: 16
  • Watch event: 10
  • Delete event: 16
  • Issue comment event: 56
  • Push event: 56
  • Pull request review event: 24
  • Pull request review comment event: 9
  • Pull request event: 39
  • Fork event: 5
  • Create event: 18
Last Year
  • Issues event: 16
  • Watch event: 10
  • Delete event: 16
  • Issue comment event: 57
  • Push event: 56
  • Pull request review event: 24
  • Pull request review comment event: 9
  • Pull request event: 39
  • Fork event: 5
  • Create event: 18

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 1,435
  • Total Committers: 35
  • Avg Commits per committer: 41.0
  • Development Distribution Score (DDS): 0.458
Past Year
  • Commits: 19
  • Committers: 4
  • Avg Commits per committer: 4.75
  • Development Distribution Score (DDS): 0.368
Top Committers
Name Email Commits
Matthew Feickert m****t@c****h 778
Lukas l****h@g****m 248
Giordon Stark k****g 213
dependabot[bot] 4****] 58
pre-commit-ci[bot] 6****] 55
GitHub Action a****n@g****m 21
Alexander Held 4****d 17
Henry Schreiner h****r@c****h 11
Kanishk Kalra k****0@g****m 3
Lorenz Gaertner l****r@p****e 2
Daniel Werner 1****n 2
lhenkelm l****n@c****h 2
Nikolai Hartmann n****e@p****e 2
Aryan Roy 5****y 2
Chris Ellis 5****i 1
Beojan Stanislaus b****n@g****m 1
Aksh Gupta a****7@g****m 1
Frank Sauerburger f****k@s****m 1
Tadej Novak t****j@t****i 1
StepSecurity Bot b****t@s****o 1
Saransh Chopra s****1@g****m 1
Ruggero Turra g****o@g****m 1
Rohan Sharma r****3@g****m 1
Pradyumna Rahul p****d@g****m 1
Nathan Simpson e****n@g****m 1
Melissa Weber Mendonça m****m@g****m 1
Mason Proffitt m****p@u****u 1
Marco Gorelli m****i@g****m 1
M Bussonnier b****s@g****m 1
Lars Holm Nielsen l****n@c****h 1
and 5 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 116
  • Total pull requests: 478
  • Average time to close issues: 6 months
  • Average time to close pull requests: 4 days
  • Total issue authors: 21
  • Total pull request authors: 19
  • Average comments per issue: 2.85
  • Average comments per pull request: 1.71
  • Merged pull requests: 414
  • Bot issues: 0
  • Bot pull requests: 118
Past Year
  • Issues: 17
  • Pull requests: 60
  • Average time to close issues: 22 minutes
  • Average time to close pull requests: 7 days
  • Issue authors: 6
  • Pull request authors: 10
  • Average comments per issue: 0.24
  • Average comments per pull request: 0.93
  • Merged pull requests: 29
  • Bot issues: 0
  • Bot pull requests: 39
Top Authors
Issue Authors
  • matthewfeickert (45)
  • alexander-held (28)
  • kratsg (15)
  • andrewfowlie (7)
  • lukasheinrich (3)
  • MoAly98 (2)
  • lorenzennio (2)
  • ntadej (1)
  • darousso (1)
  • dantrim (1)
  • klemens90 (1)
  • melissawm (1)
  • Sinclert (1)
  • lhenkelm (1)
  • TC01 (1)
Pull Request Authors
  • matthewfeickert (274)
  • dependabot[bot] (87)
  • pre-commit-ci[bot] (31)
  • meeseeksmachine (27)
  • kratsg (15)
  • henryiii (8)
  • lukasheinrich (8)
  • alexander-held (6)
  • lorenzennio (4)
  • pfackeldey (2)
  • ligerlac (2)
  • WolfgangWaltenberger (2)
  • Carreau (2)
  • melissawm (2)
  • tkoyama010 (2)
Top Labels
Issue Labels
needs-triage (38) feat/enhancement (35) bug (34) docs (27) user request (17) tests (10) help wanted (9) chore (6) API (5) good first issue (4) Docker (2) question (2) schema and spec (2) CI (2) research (2) wontfix (2) Windows (1) contrib (1) not-a-bug (1) build (1) experiment/belle2 (1) type checking (1) follow up (1) packaging (1) CLI (1) dependencies (1) unreproducible (1) needs-info (1) community (1)
Pull Request Labels
docs (155) dependencies (94) github-actions (92) backport (88) fix (86) chore (85) need-to-backport (70) CI (65) tests (44) feat/enhancement (28) build (27) pre-commit (20) Docker (18) type checking (8) contrib (7) API (6) Binder (5) Windows (4) security (4) need-to-forwardport (2) python (2) packaging (2) experiment/belle2 (2) community (2) visualization (2) user request (2) schema and spec (2) deployment (2) question (1) refactor (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 9,641 last-month
  • Total docker downloads: 435
  • Total dependent packages: 6
    (may contain duplicates)
  • Total dependent repositories: 30
    (may contain duplicates)
  • Total versions: 58
  • Total maintainers: 4
pypi.org: pyhf

pure-Python HistFactory implementation with tensors and autodiff

  • Versions: 47
  • Dependent Packages: 5
  • Dependent Repositories: 27
  • Downloads: 9,641 Last month
  • Docker Downloads: 435
Rankings
Dependent packages count: 1.3%
Docker downloads count: 1.9%
Downloads: 2.2%
Dependent repos count: 2.8%
Average: 2.9%
Stargazers count: 3.9%
Forks count: 5.0%
Last synced: 4 months ago
conda-forge.org: pyhf

The HistFactory p.d.f. template [CERN-OPEN-2012-016] is per-se independent of its implementation in ROOT and sometimes, it's useful to be able to run statistical analysis outside of ROOT, RooFit, RooStats framework. This repo is a pure-python implementation of that statistical model for multi-bin histogram-based analysis and its interval estimation is based on the asymptotic formulas of "Asymptotic formulae for likelihood-based tests of new physics" [arXiv:1007.1727]. The aim is also to support modern computational graph libraries such as PyTorch, JAX, and TensorFlow in order to make use of features such as automatic differentiation and GPU acceleration.

  • Versions: 11
  • Dependent Packages: 1
  • Dependent Repositories: 3
Rankings
Dependent repos count: 17.9%
Forks count: 21.5%
Average: 23.2%
Stargazers count: 24.3%
Dependent packages count: 29.0%
Last synced: 4 months ago

Dependencies

.github/workflows/bump-version.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/ci.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v3 composite
  • mxschmitt/action-tmate v3 composite
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v4 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/init v2 composite
.github/workflows/dependencies-head.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/docker.yml actions
  • actions/checkout v4 composite
  • docker/build-push-action v5 composite
  • docker/login-action v3 composite
  • docker/setup-buildx-action v3 composite
  • docker/setup-qemu-action v3 composite
.github/workflows/docs.yml actions
  • actions/checkout v4 composite
  • actions/configure-pages v3 composite
  • actions/deploy-pages v2 composite
  • actions/setup-python v4 composite
  • actions/upload-pages-artifact v2 composite
.github/workflows/lint.yml actions
  • actions/checkout v4 composite
  • hadolint/hadolint-action v3.1.0 composite
.github/workflows/lower-bound-requirements.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/merged.yml actions
  • actions/checkout v4 composite
.github/workflows/notebooks.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/publish-package.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • pypa/gh-action-pypi-publish v1.8.10 composite
.github/workflows/release_tests.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/semantic-pr-check.yml actions
  • amannn/action-semantic-pull-request v5 composite
docker/Dockerfile docker
  • ${BASE_IMAGE} latest build
  • base latest build
docker/gpu/Dockerfile docker
  • base latest build
  • nvidia/cuda 10.1-cudnn7-runtime-ubuntu18.04 build
pyproject.toml pypi
  • click >=8.0.0
  • importlib_resources >=1.4.0; python_version < '3.9'
  • jsonpatch >=1.15
  • jsonschema >=4.15.0
  • numpy *
  • pyyaml >=5.1
  • scipy >=1.5.1
  • tqdm >=4.56.0
.github/workflows/ci-windows.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite