Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some bugs found in 12-Particle-Filters.ipynb #481

Open
L53317 opened this issue Oct 11, 2023 · 0 comments
Open

Some bugs found in 12-Particle-Filters.ipynb #481

L53317 opened this issue Oct 11, 2023 · 0 comments

Comments

@L53317
Copy link

L53317 commented Oct 11, 2023

Hi,
Thanks for such a nice project. If my understanding is correct, then there are some bugs for coding in the 'Resampling Methods' section of '12-Particle-Filters.ipynb'. And if I am wrong, please ignore and close it.
(1) In Residual Resampling:
'residual = w - num_copies'
should be
'residual = N*np.asarray(weights) - num_copies'
in the residual_resample() function.

(2) Should there be a line as
'cumulative_sum[-1] = 1. # ensures sum is exactly one'
to avoid round-off errors in the implementation of the 'Stratified Resampling' and the 'Systematic Resampling' parts?

(3) How about using 'np.random.rand()' OR 'np.random.random()' to replace random()?

Best,
Xh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant