Using the Random Walk Metropolis algorithm to sample from a cow surface distribution
HTML-код
- Опубликовано: 7 сен 2024
- This video explains how to use the Random Walk Metropolis algorithm to sample from a distribution, with a probability density function related to the perpendicular distance of a point from the surface of a cow.
This video is part of a lecture course which closely follows the material covered in the book, "A Student's Guide to Bayesian Statistics", published by Sage, which is available to order on Amazon here: www.amazon.co....
For more information on all things Bayesian, have a look at: ben-lambert.co.... The playlist for the lecture course is here: • A Student's Guide to B...
Thanks, this video showed me how cool and useful Metropolis is, on paper without examples it didn't mean a lot to me!
Phenomenal example!
That stained-glass cow is very pretty.
An itch to point out a typo: the symbol ⊥ is used for perpendicular? At 0:23 you say perpendicular, but used the notation for parallel: ||. But your illustration is clear enough to understand what you meant. Thanks so much!
And they said pure mathematics has no real world applications
@3:30 You can not only rotate a cow in your mind, but now youc an also do it in Mathematica!
Hi Ben, Thanks for your illustrative explanation! Just a quick question: from my point of view, anyway, you need to numerically calculate the distance to the "cow" and then its probability, what is the point of using such a sampling strategy? With such calculations, you can always do a sampling of the entire x-y-z space and calculating the probability, then get the same result. Is it because the Metropolis algorithm needs far fewer sampling points?
cow distribution lol can u give us the data and codes?
this one is really cool
Hi Ben, this might be a silly question. At 1:27, you said you don't know the function f, but then you said you can still calculate d with given x, y, z. Are those contradictory? And what do you mean by you can calculate it numerically?
Hi, thanks for your message and apologies for any confusion. I mean that the function f - that denotes the perpendicular distance from a point to the cow's surface - is not a function I can write down since the cow's surface is complicated to represent mathematically. I can, however, numerically (guided by theory of ray tracing and Mathematica's inbuilt functions) calculate the distance of a point from the computational cow's boundaries. Hope that makes sense? Best, Ben
@@SpartacanUsuals Thanks for your prompt response! Yes, that makes sense now. Thanks!
@@SpartacanUsuals So would it be safe to say that that the cow-function is known, but not analytically tractable, and that is the motivation behind using the random walk metropolis algorithm to sample from it?
@@RaviShankar-de5kb not only that but in order to normalize the distribution you would have to integrate it which is basically impossible. with that method however the normalization step is not necessary (as far as i understood).
And God alone knows best.