aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
Going through chapter 5 I found it weird that there was no implementation of the optimal solution for the Dark Worlds problem, i.e. find the best guess that minimizes the estimated loss function over the posterior distribution. It also wasn't left as an exercise.
This solution does indeed lead to a much better score than using the posterior means for the halo positions. However, it's very slow so if anyone has a suggestion to optimize it so it could be included in the book that would be great.
This snippet only works after fixing the main_score function which is currently wrong for multiple halos see #411
Going through chapter 5 I found it weird that there was no implementation of the optimal solution for the Dark Worlds problem, i.e. find the best guess that minimizes the estimated loss function over the posterior distribution. It also wasn't left as an exercise.
I had a go at doing it myself with this code
This solution does indeed lead to a much better score than using the posterior means for the halo positions. However, it's very slow so if anyone has a suggestion to optimize it so it could be included in the book that would be great.
This snippet only works after fixing the main_score function which is currently wrong for multiple halos see #411