Dear Curiosity in the People here,
I was wondering if anyone else had the idea that MCMC could be nicely implemented using
It’s just a “hunch” on my part - but somehow (hierarchical) Bayesian modelling reminds
me of pipelines of probability flows, “throwing” dices.
This is just a hunch, but perhaps FRP/RX implements “MCMC” + hierarchical Bayesian modelling
out of the box, as a “side product”.
I get my “hunch” from the fact that FRP/RX can be easily used to integrate all sorts of Hamiltonians :
here, for example, you have a simple super mario game in 50 lines of code https://elm-lang.org/examples/mario - implemented using FRP - this integrates the “Hamiltonian” for Mario.
So if it can be used to integrate Hamiltonians then throwing in some MCMC into the mix
would not be too much extra work.
RX has the nice property that it is async and supposed to work across many computing nodes (to the best of my understanding.)
I got this idea because recently I watched a talk about https://monix.io/docs/3x/ , which is basically RX, but a bit better. It is used to handle event streams from power plants.
Anyway. Just a thought. I don’t expect this idea to go anywhere - but it might - perhaps for educational purposes, might be a short and simple way to implement hierarchical Bayesian HMC modelling from scratch - in 100 lines of code, or less.
It won’t be fast, or anything, but might be educational.
Here is a nice webpage for FRP - http://sodium.nz/ - for those who are interesting in exploring this connection.
I have some other project on which I am working now, so I won’t go into this, yet, but perhaps someone might pick this idea up, eventually :) - in a few years from now :).