Python interface to CmdStan
Project description
pycmdstan
Python interface to CmdStan.
Usage
After installing, pip install -U pycmdstan
, a contrived example would be
from pycmdstan import Model, Run
model = Model('''
data { vector[20] x; real mu; }
parameters { real sig; }
model { x ~ normal(mu, sig); }
''')
assert model.sample(data={'mu': 5.0, x: randn(20)}, chains=4).R_hat.max() < 1.2
See the docs for more.
Contributing
Contributions are welcome, please start in the issue tracker. Use YAPF to format the code. The Dockerfile can ease local development,
docker build -t pycmdstan .
docker run --rm -it pycmdstan pytest -n4 pycmdstan/tests.py
Acknowledgements
- PSIS code is by Aki Vehtari & Tuomas Sivula (BSD licensed, repo here)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pycmdstan-0.7.tar.gz
(14.0 kB
view details)
Built Distribution
pycmdstan-0.7-py3-none-any.whl
(16.0 kB
view details)
File details
Details for the file pycmdstan-0.7.tar.gz
.
File metadata
- Download URL: pycmdstan-0.7.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7976c65f7eeca8cf7ff24c94a5988867c3621a59c8e22f39ecd7c3e3e56d86b5 |
|
MD5 | 5159c6bda583420a0f2a398c20f24add |
|
BLAKE2b-256 | 9cf1143c56d2c876348955ed51b0612c08531d04677764ec01e80756d5fc75f3 |
File details
Details for the file pycmdstan-0.7-py3-none-any.whl
.
File metadata
- Download URL: pycmdstan-0.7-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60c6acf82f294c9ae00db9f123812add9c6530bc7695525bcb3632a349f56a12 |
|
MD5 | 849a78fff3fe16450343d2c20b5d731a |
|
BLAKE2b-256 | 8bf3c0081177d66eeb922ea2fe342223c0cc6525273d183056921223c553d1a3 |