pyhf  by scikit-hep

HistFactory implementation for fitting/limit-setting/interval estimation

created 7 years ago
288 stars

Top 92.1% on sourcepulse

GitHubView on GitHub
Project Summary

pyhf provides a pure-Python implementation of the HistFactory statistical model for multi-bin histogram-based analyses, enabling statistical inference and limit setting outside of the traditional ROOT/RooFit framework. It targets physicists and researchers in high-energy physics and related fields, offering modern computational features like autodifferentiation and GPU acceleration via backends such as PyTorch and TensorFlow.

How It Works

pyhf implements the HistFactory statistical model, which defines probability density functions (PDFs) for histogram-based measurements. It leverages computational graph libraries (NumPy, PyTorch, TensorFlow, JAX) for efficient computation and automatic differentiation, enabling advanced statistical inference techniques like hypothesis testing and interval estimation based on asymptotic formulas. This approach allows for flexible model definition and leverages modern hardware for faster analysis.

Quick Start & Requirements

Highlighted Details

  • Supports various systematic uncertainty types: HistoSys, OverallSys, ShapeSys, NormFactor, ShapeFactor, StatError, Lumi Uncertainty.
  • Integrates with ROOT/XML via uproot for model import.
  • Offers multiple computational backends (NumPy, PyTorch, TensorFlow, JAX) and optimizers (SciPy, iminuit).
  • Includes visualization tools for results, comparable to ROOT outputs.

Maintenance & Community

Licensing & Compatibility

  • Licensed under the BSD 3-Clause License.
  • Compatible with commercial and closed-source applications.

Limitations & Caveats

  • While it supports importing from ROOT/XML via uproot, it is a pure-Python implementation and does not directly use ROOT libraries for its core statistical calculations.
  • Non-asymptotic calculators are implemented, but the primary focus is on asymptotic formulas.
Health Check
Last commit

2 weeks ago

Responsiveness

1 day

Pull Requests (30d)
2
Issues (30d)
3
Star History
3 stars in the last 90 days

Explore Similar Projects

Starred by Ying Sheng Ying Sheng(Author of SGLang) and Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake).

llm-analysis by cli99

0.2%
441
CLI tool for LLM latency/memory analysis during training/inference
created 2 years ago
updated 3 months ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
2 more.

hummingbird by microsoft

0.0%
3k
Compiler for trained ML models into tensor computation
created 5 years ago
updated 2 weeks ago
Feedback? Help us improve.