Skip to main content

Python interface to CmdStan

Project description

pycmdstan

pipeline status coverage report PyPI package version Documentation Status

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.8.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

pycmdstan-0.8-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file pycmdstan-0.8.tar.gz.

File metadata

  • Download URL: pycmdstan-0.8.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pycmdstan-0.8.tar.gz
Algorithm Hash digest
SHA256 55880250418c969d70b7e7b09114832c186ebed59e6929a7bfbae580385e9bfa
MD5 e9dde9345ce25291d9bb1b28ec8f2269
BLAKE2b-256 8f7ccde5532bf657fc2ac023f065bc2b6cec3d1cbe98b05056220838f0255c68

See more details on using hashes here.

File details

Details for the file pycmdstan-0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for pycmdstan-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 49a6eb91b3fb86bf062accd639361fe6b0125033617eecac2d240d3336672b20
MD5 3e28b0017e184013a69802664c7dde58
BLAKE2b-256 2a6aa05452fd8e76ac5d5b0b335538c40af8b0334c76ed06d83d6d7e1e634fa7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page