Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thjashin/mirror-stein-samplers
Sampling with Mirrored Stein Operators
https://github.com/thjashin/mirror-stein-samplers
Last synced: 27 days ago
JSON representation
Sampling with Mirrored Stein Operators
- Host: GitHub
- URL: https://github.com/thjashin/mirror-stein-samplers
- Owner: thjashin
- Created: 2021-06-17T20:23:40.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-14T00:48:16.000Z (over 1 year ago)
- Last Synced: 2024-02-20T14:00:32.234Z (4 months ago)
- Language: Jupyter Notebook
- Size: 20 MB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Lists
- awesome-stars - thjashin/mirror-stein-samplers - Sampling with Mirrored Stein Operators (Jupyter Notebook)
README
# Sampling with Mirrored Stein Operators
Code for reproducing the experimental results in [https://arxiv.org/abs/2106.12506](https://arxiv.org/abs/2106.12506)
---
### Update (2023/2/13):
We added a new example of sampling from a uniform distribution in a $[-1, 1]^d$ rectangle in [uniform.ipynb](/uniform.ipynb).
---
## Requirements
- R >= 4.0.4 (only needed for the non-toy post-selection inference experiments)
- python >= 3.8
```
rpy2 >= 3.4.4
tensorflow >= 2.4.0
tensorflow_probability >= 0.12
numpy >= 1.19.5
scipy >= 1.6.3
matplotlib >= 3.4.1
pandas >= 1.2.4
seaborn >= 0.11.1
scikit-learn >= 0.24.2
tqdm
absl-py
```## Experiments
### Approximation quality on the simplex
* Sparse Dirichlet: [dirichlet.ipynb](/dirichlet.ipynb)
* Quadratic: [quad.ipynb](/quad.ipynb)### Confidence intervals for post-selection inference
Note: The `R_HOME` variable must be set correctly before running the scripts.
- Simulation
- 2D example: [selective_inf.ipynb](/selective_inf.ipynb)
- Nominal coverage vs. actual coverage: [coverage.py](/coverage.py)
- Coverage vs. number of samples: [coverage_wrt_k.py](/coverage_wrt_k.py)
- Plotting: [plot_coverage.ipynb](/plot_coverage.ipynb)
- HIV drug resistance: [hiv.ipynb](/hiv.ipynb)### Large-scale posterior inference with non-Euclidean geometry
- Run script: [lr.py](/lr.py)
- Plotting: [plot_lr.ipynb](/plot_lr.ipynb)## Citation
If you find this repository useful, please cite:
```
@article{shi2021sampling,
title={Sampling with Mirrored {S}tein Operators},
author={Jiaxin Shi and Chang Liu and Lester Mackey},
journal={International Conference on Learning Representations},
year={2022}
}
```