Crates.io | modppl |
lib.rs | modppl |
version | 0.3.0 |
source | src |
created_at | 2024-07-25 18:49:38.486836 |
updated_at | 2024-07-25 18:49:38.486836 |
description | a experimental library for probabilistic programming in Rust. |
homepage | |
repository | https://github.com/agarret7/modppl |
max_upload_size | |
id | 1315345 |
size | 133,368 |
⚠ ️This is evolving software. The API may change.
modppl
is probabilistic programming written natively in Rust. Modularity is conferred through a trait interface that separates modeling and inference, called GenFn
.
Importance Sampling and Resampling
Proposal-based and Regenerative Metropolis-Hastings
Particle Filtering
Dynamically-typed DynGenFn
and effects-based DynGenFnHandler
dyngen!
modeling language (sample with %=
, trace with /=
)
Dynamic Unfold Kernel
Check out some examples
Generate visualizations to visualizations
with:
python -m venv venv && source venv/bin/activate && pip install matplotlib
cargo test --release && python visualization/visualizer.py
modppl
was inspired by the Generative Function Interface (GFI) as described in the Gen.jl whitepaper.
Gen: A General-Purpose Probabilistic Programming System with Programmable Inference. Cusumano-Towner, M. F.; Saad, F. A.; Lew, A.; and Mansinghka, V. K. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ‘19). (pdf) (bibtex).
modppl
does not exactly implement the GFI. More precisely, it does not support retdiff or choice gradients.