You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function pf_resample_limit implements the adaptive particle number for the particle filter, following Dieter Fox' paper "KLD-Sampling: Adaptive Particle Filters".
It takes as input a number k of supported bins, and computes the number of required particles, basically following eq. (7) from the paper. However, the equation cannot calculate a valid value for k=1 (because of division by k-1).
In the code, the case k=1 is handled specifically, returning max_samples.
I don't think that is a good handling of that case. For k>1, the calculated particle limit increases with k. k=1 actually means the lowest possible uncertainty estimate. It doesn't seem to make any sense to use the lowest number of particles for k=2 supported bins, but when the number of supported bins is further reduced to 1, suddenly the filter increases the number of particles to max.
Since the formula cannot handle a value of k=1, my suggestion would be to calculate with k=2 when the input parameter k is given as 1. That would seem like a slight overestimation of uncertainty, but much less than just returning max_samples.
The text was updated successfully, but these errors were encountered:
The function pf_resample_limit implements the adaptive particle number for the particle filter, following Dieter Fox' paper "KLD-Sampling: Adaptive Particle Filters".
It takes as input a number k of supported bins, and computes the number of required particles, basically following eq. (7) from the paper. However, the equation cannot calculate a valid value for k=1 (because of division by k-1).
In the code, the case k=1 is handled specifically, returning max_samples.
I don't think that is a good handling of that case. For k>1, the calculated particle limit increases with k. k=1 actually means the lowest possible uncertainty estimate. It doesn't seem to make any sense to use the lowest number of particles for k=2 supported bins, but when the number of supported bins is further reduced to 1, suddenly the filter increases the number of particles to max.
Since the formula cannot handle a value of k=1, my suggestion would be to calculate with k=2 when the input parameter k is given as 1. That would seem like a slight overestimation of uncertainty, but much less than just returning max_samples.
The text was updated successfully, but these errors were encountered: