HMM: Particle filters Lirong Xia. HMM: Particle filters Lirong Xia.

Slides:



Advertisements
Similar presentations
Particle Filtering Sometimes |X| is too big to use exact inference
Advertisements

State Estimation and Kalman Filtering CS B659 Spring 2013 Kris Hauser.
HMM II: Parameter Estimation. Reminder: Hidden Markov Model Markov Chain transition probabilities: p(S i+1 = t|S i = s) = a st Emission probabilities:
Lirong Xia Probabilistic reasoning over time Tue, March 25, 2014.
Lirong Xia Hidden Markov Models Tue, March 28, 2014.
Lirong Xia Approximate inference: Particle filter Tue, April 1, 2014.
Hidden Markov Models Reading: Russell and Norvig, Chapter 15, Sections
Chapter 15 Probabilistic Reasoning over Time. Chapter 15, Sections 1-5 Outline Time and uncertainty Inference: ltering, prediction, smoothing Hidden Markov.
Advanced Artificial Intelligence
HMMs Tamara Berg CS Artificial Intelligence Many slides throughout the course adapted from Svetlana Lazebnik, Dan Klein, Stuart Russell, Andrew.
… Hidden Markov Models Markov assumption: Transition model:
CS 188: Artificial Intelligence Fall 2009 Lecture 20: Particle Filtering 11/5/2009 Dan Klein – UC Berkeley TexPoint fonts used in EMF. Read the TexPoint.
SLAM: Simultaneous Localization and Mapping: Part I Chang Young Kim These slides are based on: Probabilistic Robotics, S. Thrun, W. Burgard, D. Fox, MIT.
Hidden Markov Models. Hidden Markov Model In some Markov processes, we may not be able to observe the states directly.
CS 188: Artificial Intelligence Fall 2009 Lecture 19: Hidden Markov Models 11/3/2009 Dan Klein – UC Berkeley.
Particle Filtering. Sensors and Uncertainty Real world sensors are noisy and suffer from missing data (e.g., occlusions, GPS blackouts) Use sensor models.
CHAPTER 15 SECTION 3 – 4 Hidden Markov Models. Terminology.
QUIZ!!  T/F: The forward algorithm is really variable elimination, over time. TRUE  T/F: Particle Filtering is really sampling, over time. TRUE  T/F:
CSE 573: Artificial Intelligence Autumn 2012
Simultaneous Localization and Mapping Presented by Lihan He Apr. 21, 2006.
Recap: Reasoning Over Time  Stationary Markov models  Hidden Markov models X2X2 X1X1 X3X3 X4X4 rainsun X5X5 X2X2 E1E1 X1X1 X3X3 X4X4 E2E2 E3E3.
CS 188: Artificial Intelligence Fall 2008 Lecture 19: HMMs 11/4/2008 Dan Klein – UC Berkeley 1.
UIUC CS 498: Section EA Lecture #21 Reasoning in Artificial Intelligence Professor: Eyal Amir Fall Semester 2011 (Some slides from Kevin Murphy (UBC))
Announcements  Project 3 will be posted ASAP: hunting ghosts with sonar.
Processing Sequential Sensor Data The “John Krumm perspective” Thomas Plötz November 29 th, 2011.
Maximum a posteriori sequence estimation using Monte Carlo particle filters S. J. Godsill, A. Doucet, and M. West Annals of the Institute of Statistical.
CS 416 Artificial Intelligence Lecture 17 Reasoning over Time Chapter 15 Lecture 17 Reasoning over Time Chapter 15.
CS Statistical Machine learning Lecture 24
CSE 473: Artificial Intelligence Spring 2012 Reasoning about Uncertainty & Hidden Markov Models Daniel Weld Many slides adapted from Dan Klein, Stuart.
QUIZ!!  In HMMs...  T/F:... the emissions are hidden. FALSE  T/F:... observations are independent given no evidence. FALSE  T/F:... each variable X.
1 Chapter 15 Probabilistic Reasoning over Time. 2 Outline Time and UncertaintyTime and Uncertainty Inference: Filtering, Prediction, SmoothingInference:
Bayes Nets & HMMs Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Svetlana Lazebnik, Dan Klein, Stuart Russell,
CS Statistical Machine learning Lecture 25 Yuan (Alan) Qi Purdue CS Nov
Reasoning over Time  Often, we want to reason about a sequence of observations  Speech recognition  Robot localization  User attention  Medical monitoring.
CSE 473: Artificial Intelligence Spring 2012 Reasoning about Uncertainty & Hidden Markov Models Daniel Weld Many slides adapted from Dan Klein, Stuart.
CSE 573: Artificial Intelligence Autumn 2012 Particle Filters for Hidden Markov Models Daniel Weld Many slides adapted from Dan Klein, Stuart Russell,
Autonomous Mobile Robots Autonomous Systems Lab Zürich Probabilistic Map Based Localization "Position" Global Map PerceptionMotion Control Cognition Real.
CSE 473: Artificial Intelligence Spring 2012 Reasoning about Uncertainty & Hidden Markov Models Daniel Weld Many slides adapted from Dan Klein, Stuart.
CS 541: Artificial Intelligence Lecture VIII: Temporal Probability Models.
CS 541: Artificial Intelligence Lecture VIII: Temporal Probability Models.
CS498-EA Reasoning in AI Lecture #23 Instructor: Eyal Amir Fall Semester 2011.
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 16
Probabilistic reasoning over time
Probabilistic Robotics
Markov ó Kalman Filter Localization
Probabilistic Reasoning Over Time
Introduction to particle filter
CAP 5636 – Advanced Artificial Intelligence
Probabilistic Reasoning over Time
Probabilistic Reasoning over Time
Visual Tracking CMPUT 615 Nilanjan Ray.
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 16
CS 188: Artificial Intelligence Spring 2007
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 16
CS 188: Artificial Intelligence Fall 2008
Introduction to particle filter
Instructors: Fei Fang (This Lecture) and Dave Touretzky
Particle Filtering.
Probabilistic Map Based Localization
Hidden Markov Models Markov chains not so useful for most agents
Chapter14-cont..
Hidden Markov Models Lirong Xia.
Speech recognition, machine learning
Announcements Assignments HW10 Due Wed 4/17 HW11
HMM: Particle filters Lirong Xia. HMM: Particle filters Lirong Xia.
Probabilistic reasoning over time
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 7
Speech recognition, machine learning
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 7
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 14
Presentation transcript:

HMM: Particle filters Lirong Xia

Recap: Reasoning over Time Markov models p(X1) p(X|X-1) p(E|X) Hidden Markov models X E p rain umbrella 0.9 no umbrella 0.1 sun 0.2 0.8 Filtering: Given time t and evidences e1,…,et, compute p(Xt|e1:t)

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)

Today Particle filtering Viterbi algorithm

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

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,2) (2,1)

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)

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

Particle Filtering: Resample Old Particles: (3,3) w=0.1 (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 New Particles: (2,1) w=1 (3,2) w=1 (2,2) w=1 (1,1) w=1 (3,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

Forward algorithm vs. 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

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

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

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

State Path X1 X2 … XN 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 X1 X2 … XN

Viterbi Algorithm

Example X E p +r +u 0.9 -u 0.1 -r 0.2 0.8