tweag / monad-bayes

A library for probabilistic programming in Haskell.
MIT License
407 stars 62 forks source link

Notebooks: SMC.ipynb #225

Closed mknorps closed 1 year ago

mknorps commented 1 year ago

This PR regards updating SMC.ipynb notebook with explanation the idea behind Sequential Monte Carlo based on present random walk example.

I aim at shifting the weight of the notebook from the random walk example to SMC and its implementation in monad-bayes.

netlify[bot] commented 1 year ago

Deploy Preview for monad-bayes-site ready!

Name Link
Latest commit aa22bf2d2357ac1fd7804e10fce75771395fcb79
Latest deploy log https://app.netlify.com/sites/monad-bayes-site/deploys/635ba6837526f9000969b665
Deploy Preview https://deploy-preview-225--monad-bayes-site.netlify.app/smc
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] commented 1 year ago

Deploy Preview for monad-bayes canceled.

Name Link
Latest commit aa22bf2d2357ac1fd7804e10fce75771395fcb79
Latest deploy log https://app.netlify.com/sites/monad-bayes/deploys/635ba6834ea7f600086d6c58
mknorps commented 1 year ago

@reubenharry could you help me explain the last plot (copy below) image

I thought it will be better to show prior alongside with observed. Inferred is the result of SMC simulations. How can we interpret influence of observed to change prior in this picture?

reubenharry commented 1 year ago

I thought it will be better to show prior alongside with observed. Inferred is the result of SMC simulations. How can we interpret influence of observed to change prior in this picture?

This is an example of a Bayes filter, I believe. "Prior" represents a prior, not over individual points, but over an entire trajectory. "Inferred" represents the (estimated) posterior over this trajectory, given the observation of an "observed" trajectory. Let me know if that's useful, if not I can say more.

reubenharry commented 1 year ago

I think explaining the implementation of SMC makes sense, but I do like that these tutorials can be read as user-facing documents too, for people who want to use SMC but not understand how it works.

mknorps commented 1 year ago

OK. In that case I will not be putting a more description there. I linked Adam Scibor's article.