Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 807 Bytes

File metadata and controls

46 lines (32 loc) · 807 Bytes

statsim

StatSim — probabilistic programming and statistical computing for Python.

Install

# Basic installation
pip install statsim

# With PyMC backend
pip install statsim[pymc]

# With Stan backend
pip install statsim[stan]

# With all backends
pip install statsim[all]

Usage

from statsim import compile, run

# Compile .sm model
model = compile('''
  mu ~ Normal(0, 10)
  sigma ~ HalfNormal(5)
  y ~ Normal(mu, sigma)
''', target='pymc')

# Run inference
result = run(model, backend='pymc')

Backends

  • PyMC: Full Bayesian inference with MCMC and variational methods
  • Stan: High-performance HMC/NUTS sampling

Learn more