elvout / cs393r

CS 393R Graduate Autonomous Robots, Fall 2021 | Autobots
0 stars 0 forks source link

Resample particles based on their weights #38

Closed elvout closed 2 years ago

elvout commented 3 years ago

In class he mentioned a problem with loss of diversity and sample variance when resampling. I figured that we might as well just implement low-variance sampling since it's about the same amount of work.

Regular sampling involves generating N random numbers in [0, 1]. In low-variance sampling, we instead generate a random number r in [0, 1 / N) and then use {r + 1 / N ... r + (N - 1) / N} as the rest of the samples.

slide (TODO: there's a better side in a different deck that hasn't been made public yet)

The class outlined in #37 allows us to map an arbitrary CDF value in [0, 1] to a particle.