No project description provided
Project description
🌀 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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stanhf-1.0.0.tar.gz.
File metadata
- Download URL: stanhf-1.0.0.tar.gz
- Upload date:
- Size: 31.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0b078123b93432b6eb0180123532be56c611098e00268861e46370a802ba716
|
|
| MD5 |
65b7606830f0021f7d5d9769639f5de5
|
|
| BLAKE2b-256 |
f0ea3edfe4dc0282f7464aef248743822a78c34053f6f72ac931a9d0626be3e4
|
File details
Details for the file stanhf-1.0.0-py3-none-any.whl.
File metadata
- Download URL: stanhf-1.0.0-py3-none-any.whl
- Upload date:
- Size: 31.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24366ceda2ba67e549608483629b134243c59c2e56e589e1f312c90b8de7270b
|
|
| MD5 |
ed60d439030481a516dda6019a11ea4d
|
|
| BLAKE2b-256 |
24bd05e156c75fd2ea62a6c3c33f5c768025417be0f1ee39679801db3d614329
|