declarative: DIY Markov Chains.
DIY Markov Chains.
Build composite Markov transition operators from existing ones for fun and profit.
A useful strategy is to hedge one's sampling risk by occasionally interleaving a computationally-expensive transition (such as a gradient-based algorithm like Hamiltonian Monte Carlo or NUTS) with cheap Metropolis transitions.
transition = frequency [
(9, metropolis 1.0)
, (1, hamiltonian 0.05 20)
]Alternatively: sample consecutively using the same algorithm, but over a range of different proposal distributions.
transition = concatAllT [
slice 0.5
, slice 1.0
, slice 2.0
]Or just mix and match and see what happens!
transition =
sampleT
(sampleT (metropolis 0.5) (slice 0.1))
(sampleT (hamiltonian 0.01 20) (metropolis 2.0))Check the test suite for example usage.
Downloads
- declarative-0.1.0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0, 0.1.0.1, 0.2.1, 0.2.2, 0.2.3, 0.3.3, 0.3.4, 0.4.0, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4 |
|---|---|
| Dependencies | base (<5), hasty-hamiltonian (>=1.1.1), lens (>=4 && <5), mcmc-types (>=1.0.1), mighty-metropolis (>=1.0.1), mwc-probability (>=1.0.1), pipes (>=4 && <5), primitive, speedy-slice (>=0.1.2), transformers [details] |
| License | MIT |
| Author | Jared Tobin |
| Maintainer | jared@jtobin.ca |
| Uploaded | by JaredTobin at 2015-10-09T11:39:20Z |
| Category | Math |
| Home page | http://github.com/jtobin/declarative |
| Source repo | head: git clone http://github.com/jtobin/declarative.git |
| Distributions | LTSHaskell:0.5.4, NixOS:0.5.4, Stackage:0.5.4 |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 8571 total (38 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2015-10-10 [all 1 reports] |