🌀 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 | Provenance | Actions |
|---|---|---|---|---|
| stanhf-1.1.0.tar.gz | 31.1 kB | Without provenance | Details for stanhf-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stanhf-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for stanhf-1.1.0-py3-none-any.whl |
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
|
Security for stanhf 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.