https://github.com/diyer22/distribution_playground
2D Probability Distribution "Playground" for Generative Models.
https://github.com/diyer22/distribution_playground
density-estimation generative-model probability-distribution
Last synced: 5 months ago
JSON representation
2D Probability Distribution "Playground" for Generative Models.
- Host: GitHub
- URL: https://github.com/diyer22/distribution_playground
- Owner: DIYer22
- Created: 2023-09-11T13:38:56.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-05-25T12:55:36.000Z (8 months ago)
- Last Synced: 2025-08-29T20:08:46.840Z (5 months ago)
- Topics: density-estimation, generative-model, probability-distribution
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# distribution_playground
### **2D Probability Distribution "Playground" for Generative Models**
## ▮ Features
- Various preset 2D distributions, from simple to complex
- Accurate and efficient sampling from probability density maps
- Calculate various divergence metrics between sampled data and probability density maps
- Good visualization
- Support for custom probability density maps from arbitrary images
- Complete sample code for generative model experiments, including creation of cool "optimization process GIFs"
*[Experiments](https://discrete-distribution-networks.github.io/) completed using `distribution_playground`:*
## ▮ Tutorials
**Demo**
```bash
# Installation
pip install distribution_playground
# View all density_maps
python -m distribution_playground.density_maps
# Sample data from distributions and calculate divergence metrics with density maps
python -m distribution_playground.source_distribution
```
**Sample Code**
See [toy_exp.py](https://github.com/DIYer22/sddn/blob/master/toy_exp.py), which includes:
- Training generative models to fit probability densities
- Recording divergence metrics between sampling results and GT density maps
- Saving visualization images of final sampling results
- Creating cool "optimization process GIFs"
# Reference
- [Probability Playground - Buffalo](https://www.acsu.buffalo.edu/~adamcunn/probability/normal.html)
- [DDPM - dataflowr](https://github.com/dataflowr/notebooks/tree/master/Module18)