🌀 stanhf
Convert a histfactory declarative specification of a model in json into a Stan model. Stan is a probabilistic programming language and a set of algorithms with automatic differentiation.
We follow the histfactory specification as closely as possible and the target function (log-likelihood) should match that from pyhf up to a constant term to within a negligible numerical difference.
Install
pip install stanhf
At runtime, the first time you use stanhf it could install cmdstan if it isn't found. This is required to lint, validate and compile any Stan models, though stanhf can be used as a conversion tool without it.
Run
Stanhf consists of one CLI. See
stanhf --help
for details. Try e.g.,
stanhf ./examples/model.json
This converts, compiles and validates the example model. The compiled model is a cmdstan executable. You can run the usual Stan algorithms (HMC, optimization etc) through this executable.
Workflows
See EXAMPLE.md for a walkthrough of how to run and analyse outpus from a compiled Stan model.
Metadata
Release files for stanhf 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stanhf-1.1.0.tar.gz | 31.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stanhf-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.8 kB
Release files / stanhf-1.1.0.tar.gz
| Download URL | stanhf-1.1.0.tar.gz |
|---|---|
| Size | 31.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1158976afdea6dbb25ff441d0ed8531fa29b8e1dda8d29f507f7fbdc9768771d
|
|
BLAKE2b-256 checksum How to use checksums |
51dad6c66683cec00959dfaec7b2f7c2cfe7323ad789a07d36e3ab010e537cac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|
Release files / stanhf-1.1.0-py3-none-any.whl
| Download URL | stanhf-1.1.0-py3-none-any.whl |
|---|---|
| Size | 31.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf411aa81a52df74e13d34657b738252cd66cff001f887774a856b847d38e8de
|
|
BLAKE2b-256 checksum How to use checksums |
77f74105230f77aab9dc9001965df8abb01ab338583c9ca11cf3a1f5ae44f222
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|