https://github.com/arviz-devs/simuk
Simulation based calibration and generation of synthetic data.
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 6 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
1 of 12 committers (8.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.1%) to scientific vocabulary
Keywords from Contributors
Repository
Simulation based calibration and generation of synthetic data.
Basic Info
- Host: GitHub
- Owner: arviz-devs
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://simuk.readthedocs.io
- Size: 553 KB
Statistics
- Stars: 55
- Watchers: 4
- Forks: 9
- Open Issues: 6
- Releases: 4
Metadata Files
README.md
Simuk
Simuk is a Python library for simulation-based calibration (SBC) and the generation of synthetic data. Simulation-Based Calibration is a method for validating Bayesian inference by checking whether the posterior distributions align with the expected theoretical results derived from the prior.
Simuk works with PyMC, Bambi and NumPyro models.
Installation
May be pip installed from github:
bash
pip install simuk
Quickstart
Define a PyMC or Bambi model. For example, the centered eight schools model:
```python import numpy as np import pymc as pm from arvizplots import plotecdf_pit
data = np.array([28.0, 8.0, -3.0, 7.0, -1.0, 1.0, 18.0, 12.0]) sigma = np.array([15.0, 10.0, 16.0, 11.0, 9.0, 11.0, 10.0, 18.0])
with pm.Model() as centeredeight: mu = pm.Normal('mu', mu=0, sigma=5) tau = pm.HalfCauchy('tau', beta=5) theta = pm.Normal('theta', mu=mu, sigma=tau, shape=8) yobs = pm.Normal('y', mu=theta, sigma=sigma, observed=data) ```
Pass the model to the
SBCclass, and run the simulations. This will take a while, as it is running the model many times. ```python sbc = SBC(centeredeight, numsimulations=100, # ideally this should be higher, like 1000 sample_kwargs={'draws': 25, 'tune': 50})sbc.run_simulations()
python 79%|███████▉ | 79/100 [05:36<01:29, 4.27s/it] ```Plot the empirical CDF for the difference between prior and posterior. The lines should be close to uniform and within the oval envelope.
python plot_ecdf_pit(sbc.simulations, visuals={"xlabel":False}, );

References
- Talts, S., Betancourt, M., Simpson, D., Vehtari A., and Gelman A. (2018). Validating Bayesian Inference Algorithms with Simulation-Based Calibration.
- Modrák, M., Moon, A, Kim, S., Bürkner, P., Huurre, N., Faltejsková, K., Gelman A and Vehtari, A.(2023). Simulation-based calibration checking for Bayesian computation: The choice of test quantities shapes sensitivity. Bayesian Analysis.
- Säilynoja, T., Marvin Schmitt, Paul-Christian Bürkner and Aki Vehtari (2025). Posterior SBC: Simulation-Based Calibration Checking Conditional on Data.
Owner
- Name: ArviZ
- Login: arviz-devs
- Kind: organization
- Website: https://www.arviz.org
- Twitter: arviz_devs
- Repositories: 31
- Profile: https://github.com/arviz-devs
GitHub Events
Total
- Create event: 13
- Issues event: 11
- Release event: 5
- Watch event: 12
- Delete event: 14
- Issue comment event: 35
- Push event: 33
- Pull request review event: 19
- Pull request review comment event: 23
- Pull request event: 38
- Fork event: 3
Last Year
- Create event: 13
- Issues event: 11
- Release event: 5
- Watch event: 12
- Delete event: 14
- Issue comment event: 35
- Push event: 33
- Pull request review event: 19
- Pull request review comment event: 23
- Pull request event: 38
- Fork event: 3
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| aloctavodia | a****a@g****m | 39 |
| rohanbabbar04 | r****8@g****m | 19 |
| Curro Campuzano | c****o@g****m | 7 |
| aloctavodia | a****a@u****m | 5 |
| Advait Gaur | b****4@i****n | 4 |
| Colin Carroll | c****l@g****m | 2 |
| Colin | C****l@u****m | 2 |
| Curro Campuzano | 6****m@u****m | 1 |
| Juan Orduz | j****z@g****m | 1 |
| Peter Steinbach | p****h@h****e | 1 |
| rohanbabbar04 | r****8@y****m | 1 |
| springcoil | p****e@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 12
- Total pull requests: 39
- Average time to close issues: 11 days
- Average time to close pull requests: 2 days
- Total issue authors: 6
- Total pull request authors: 7
- Average comments per issue: 1.42
- Average comments per pull request: 0.85
- Merged pull requests: 38
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 12
- Pull requests: 36
- Average time to close issues: 11 days
- Average time to close pull requests: about 20 hours
- Issue authors: 6
- Pull request authors: 5
- Average comments per issue: 1.42
- Average comments per pull request: 0.75
- Merged pull requests: 35
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- aloctavodia (5)
- juanitorduz (2)
- GwangWooKim (2)
- rohanbabbar04 (1)
- TeemuSailynoja (1)
- SamuelBrand1 (1)
Pull Request Authors
- aloctavodia (26)
- rohanbabbar04 (7)
- Advaitgaur004 (2)
- psteinb (1)
- springcoil (1)
- juanitorduz (1)
- currocam (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 20 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 3
pypi.org: simuk
Simulation based calibration and generation of synthetic data.
- Documentation: https://simuk.readthedocs.io/
- License: Apache Software License
-
Latest release: 0.2.0
published about 1 year ago
Rankings
Maintainers (3)
Dependencies
- pymc3 *