1 / 16

Lirong Xia

HMM: Particle filters. Lirong Xia. Recap: Reasoning over Time. Markov models. p( X 1 ) p( X|X -1 ). p(E |X ). Hidden Markov models. Filtering: Given time t and evidences e 1 ,…,e t , compute p(X t |e 1:t ). Filtering algorithm. Notation B(X t-1 )=p(X t-1 |e 1:t-1 )

clawson
Download Presentation

Lirong Xia

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HMM: Particle filters Lirong Xia

  2. Recap: Reasoning over Time • Markov models p(X1) p(X|X-1) p(E|X) • Hidden Markov models • Filtering: Given time t and evidences e1,…,et, compute p(Xt|e1:t)

  3. Filtering algorithm • Notation • B(Xt-1)=p(Xt-1|e1:t-1) • B’(Xt)=p(Xt|e1:t-1) • Each time step, we start with p(Xt-1 | previous evidence): • Elapse of time B’(Xt)=Σxt-1p(Xt|xt-1)B(xt-1) • Observe B(Xt) ∝p(et|Xt)B’(Xt) • Renormalize B(Xt)

  4. Today • Particle filtering • Viterbi algorithm

  5. Particle Filtering • Sometimes |X| is too big to use exact inference • |X| may be too big to even store B(X) • E.g. X is continuous • Solution: approximate inference • Track samples of X, not all values • Samples are called particles • Time per step is linear in the number of samples • But: number needed may be large • In memory: list of particles • This is how robot localization works in practice

  6. Representation: Particles • p(X) is now represented by a list of N particles (samples) • Generally, N << |X| • Storing map from X to counts would defeat the point • p(x) approximated by number of particles with value x • Many x will have p(x)=0 • More particles, more accuracy • For now, all particles have a weight of 1 Particles: (3,3) (2,3) (3,3) (3,2) (3,3) (3,2) (2,1) (3,3) (3,3) (2,1)

  7. Particle Filtering: Elapse Time • Each particle is moved by sampling its next position from the transition model x’= sample(p(X’|x)) • Samples’ frequencies reflect the transition probabilities • This captures the passage of time • If we have enough samples, close to the exact values before and after (consistent)

  8. Particle Filtering: Observe • Slightly trickier: • Likelihood weighting • Note that, as before, the probabilities don’t sum to one, since most have been downweighted

  9. Particle Filtering: Resample Old Particles: (3,3) w=0.1 (2,1) w=0.9 (2,1) w=0.9 (3,1) w=0.4 (3,2) w=0.3 (2,2) w=0.4 (1,1) w=0.4 (3,1) w=0.4 (2,1) w=0.9 (3,2) w=0.3 New Particles: (2,1) w=1 (2,1) w=1 (2,1) w=1 (3,2) w=1 (2,2) w=1 (2,1) w=1 (1,1) w=1 (3,1) w=1 (2,1) w=1 (1,1) w=1 • Rather than tracking weighted samples, we resample • N times, we choose from our weighted sample distribution (i.e. draw with replacement) • This is analogous to renormalizing the distribution • Now the update is complete for this time step, continue with the next one

  10. Forward algorithm vs. particle filtering Forward algorithm Particle filtering • Elapse of time B’(Xt)=Σxt-1p(Xt|xt-1)B(xt-1) • Observe B(Xt) ∝p(et|Xt)B’(Xt) • Renormalize B(xt) sum up to 1 • Elapse of time x--->x’ • Observe w(x’)=p(et|x’) • Resample resample N particles

  11. Robot Localization • In robot localization: • We know the map, but not the robot’s position • Observations may be vectors of range finder readings • State space and readings are typically continuous (works basically like a very fine grid) and so we cannot store B(X) • Particle filtering is a main technique

  12. SLAM • SLAM = Simultaneous Localization And Mapping • We do not know the map or our location • Our belief state is over maps and positions! • Main techniques: • Kalman filtering (Gaussian HMMs) • particle methods • http://www.cs.duke.edu/~parr/dpslam/D-Wing.html

  13. HMMs: MLE Queries • HMMs defined by: • States X • Observations E • Initial distribution: p(X1) • Transitions: p(X|X-1) • Emissions: p(E|X) • Query: most likely explanation:

  14. State Path • Graph of states and transitions over time • Each arc represents some transition xt-1→xt • Each arc has weight p(xt|xt-1)p(et|xt) • Each path is a sequence of states • The product of weights on a path is the seq’s probability • Forward algorithm • computing the sum of all paths • Viterbi algorithm • computing the best paths X1X2…XN

  15. Viterbi Algorithm

  16. Example

More Related