foerster
Probabilistic inference in forkable worlds, for Clojure and ClojureScript.
Tutorials rendered from source;
API reference on cljdoc.
Tutorials
- Getting Started — a first model, sample and observe, SMC, the posterior
- Inference in a Running Application — a live queue, speculative application state, SMC checked against enumeration
- Choosing an Inference Algorithm — importance sampling, SMC, particle MCMC, MCMC, BBVI on known posteriors; guides; composed kernels
- Inference Methods — every inference method with a run on a known answer, its options, its cost and its papers
- Models in Worlds — canonical forks, budgets, what cannot be copied
- Blocks and HMC — numerical blocks, HMC-within-Gibbs, checking gradients
- Streaming SMC — online filtering against the Kalman filter
- Trace Programming and Custom Moves — the generative function interface, MH by selection, involutive MCMC
- Composing Inference — proposals, kernels, pairs and inference programs, plugged into each other on a known posterior
- Steering a Process — tilting a process by a reward with SMC; trajectories as training data
- Interventions and Counterfactuals — seeing, doing, and what would have been
- From Data to Counterfactual Repairs — fit mechanisms, check held-out data, quantify effect and attribution uncertainty, and compare repairs
- A Gallery of Classic Models — pencils, regression, seven scientists, label switching, branching, coal-mining disasters and eight schools, each against an exact answer
- From the PyMC Gallery — golf putting (two models, LOO) and radon (partial pooling, NUTS on 89 parameters) against exact posteriors; stochastic volatility by NUTS and a particle filter
- Marketing Mix Modeling — adstock and saturation by NUTS on a block, ROAS by counterfactual, a lift test, budget splits under risk — against a known truth
Guides
- Concepts and Reading Paths — worlds, traces, measures, populations and numerical blocks
- The Programming Model — proposals, kernels, pairs, population programs and contracts: where each plugs in
- Language — sites, addresses and explicit spin scopes
- Algorithms — entry points and their model requirements
- Posteriors — summaries, diagnostics and evidence
- Checking a Model and its Inference — predictive checks, convergence diagnostics and calibration
- Coming from Other PPLs — Stan, PyMC, Turing, Gen, Anglican and WebPPL
- Inference Programs — scoped populations, targets, weighting, moves and transport
- Incremental Trace Inference — keyed reuse, finite Gibbs and the reactive boundary
- Causal Queries and Identifiability — structural assumptions, counterfactual worlds, identification and attribution
- Amortized Inference — simulator schemas, masks, artifacts and validation limits
- Extending — distributions, policies, proposals and kernels
- Worlds — canonical worlds, lifecycle, resources and recovery
- Distributions and Reproducibility — foerster.dist, seeds and streams
- Design — savepoints, traces and numerical engines
- Literature — papers and systems foerster builds on