Differentiable versions of common operations in high-energy physics.
Project description
relaxed
Provides differentiable ("relaxed") versions of common operations in high-energy physics. Based on jax
. Where possible, function APIs try to mimic their commonly used counterparts, e.g. fitting and hypothesis testing in pyhf
.
Currently implemented:
relaxed.hist
: histograms via kernel density estimation- fitting routines:
relaxed.mle.fit
: global MLE fitrelaxed.mle.fixed_poi_fit
: constrained fit given a value of a parameter of interest
relaxed.infer.hypotest
: hypothesis test using the profile likelihood as a test statisticrelaxed.fisher_info
: the fisher information matrix (of apyhf
-type model)relaxed.cramer_rao_uncert
: inverts the fisher information matrix to provide uncertainties valid through the Cramér-Rao boundrelaxed.gaussianity
: an experimental metric that quantifies the mean-squared difference of a likelihood function with respect to its gaussian approximation (covariance calculated using the Cramér-Rao bound above)
Will implement:
- smooth cuts via sigmoid
- your favourite idea here!
- we're maintaining a list of desired differentiable operations in
list_of_operations.md
(thanks to @cranmer) -- feel free to take inspiration or contribute :)
- we're maintaining a list of desired differentiable operations in
install
pip install relaxed
For use with pyhf
, e.g. in a neos
-type workflow, it is temporarily recommended to install pyhf
using a specific branch that is designed to be differentiable with respect to model construction:
pip install git+http://github.com/scikit-hep/pyhf.git@make_difffable_model_ctor
We plan to merge this into pyhf
when it's stable, and will then drop this instruction :)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
relaxed-0.1.3.tar.gz
(18.1 kB
view hashes)
Built Distribution
relaxed-0.1.3-py3-none-any.whl
(10.8 kB
view hashes)