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)
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.9.tar.gz
(14.4 kB
view details)
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
pycmdstan-0.9-py3-none-any.whl
(16.3 kB
view details)
File details
Details for the file pycmdstan-0.9.tar.gz.
File metadata
- Download URL: pycmdstan-0.9.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d354b58820ae5af060270b9ba1f0d2a6d7eed90ebd9396515f6cc47cd7d833bd
|
|
| MD5 |
13c7f87fd8f4487610e0f4b0c18ede17
|
|
| BLAKE2b-256 |
074f016417b22677b5c6cb3429568229412162b867d9dd4b4304e2adcd1bcd7b
|
File details
Details for the file pycmdstan-0.9-py3-none-any.whl.
File metadata
- Download URL: pycmdstan-0.9-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
073f90eeefb3bd87ade72c10ee2992091781e50eed9d42313f01fa4409f4e0c1
|
|
| MD5 |
d0f6026432cf57428a46e9eb92e53173
|
|
| BLAKE2b-256 |
3d8b9ad738ee7e83325d2a3eebd6dd45774a9f0994a4e25e13c18eba2af4aea0
|