jelfring / particle-filter-tutorial

MIT License
117 stars 30 forks source link

Error in APF update #6

Closed bsugerman closed 3 years ago

bsugerman commented 3 years ago

Thanks for your great paper and this repo. Looks like you made a type-o in the APF update step at

https://github.com/jelfring/particle-filter-tutorial/blob/16142c850fcbbef67ebcfb7d895a617514f59357/core/particle_filters/auxiliary_particle_filter.py#L78

by multiplying the compute_likelihood by the previous weight par[0] to form the current tmp_likelihood estimate. As such, your temporary weight uses $w{k-1}^2$ and your final weight is (with simplified notation) $\frac{p(x|y)}{w{k-1}p(\mu|y}$.

jelfring commented 3 years ago

Yes, you are right. The multiplication with par[0] is currently present twice and can be removed in line 78. Thanks for noticing. It would be great if you can create a pull request for fixing the typo.

bsugerman commented 3 years ago

I pushed the change to a local fork and make a pull request.