Hidden Markov chain models (state space model)

Slides:



Advertisements
Similar presentations
Motivating Markov Chain Monte Carlo for Multiple Target Tracking
Advertisements

Modeling of Data. Basic Bayes theorem Bayes theorem relates the conditional probabilities of two events A, and B: A might be a hypothesis and B might.
State Space Models. Let { x t :t T} and { y t :t T} denote two vector valued time series that satisfy the system of equations: y t = A t x t + v t (The.
Probabilistic Reasoning over Time
State Estimation and Kalman Filtering CS B659 Spring 2013 Kris Hauser.
Modeling Uncertainty over time Time series of snapshot of the world “state” we are interested represented as a set of random variables (RVs) – Observable.
Reducing Drift in Parametric Motion Tracking
Observers and Kalman Filters
Hidden Markov Models (HMMs) Steven Salzberg CMSC 828H, Univ. of Maryland Fall 2010.
Visual Recognition Tutorial
Motion Tracking. Image Processing and Computer Vision: 82 Introduction Finding how objects have moved in an image sequence Movement in space Movement.
Economics 20 - Prof. Anderson1 Multiple Regression Analysis y =  0 +  1 x 1 +  2 x  k x k + u 2. Inference.
Kernel Methods Part 2 Bing Han June 26, Local Likelihood Logistic Regression.
© 2003 by Davi GeigerComputer Vision November 2003 L1.1 Tracking We are given a contour   with coordinates   ={x 1, x 2, …, x N } at the initial frame.
EC Prof. Buckles1 Multiple Regression Analysis y =  0 +  1 x 1 +  2 x  k x k + u 2. Inference.
Tracking with Linear Dynamic Models. Introduction Tracking is the problem of generating an inference about the motion of an object given a sequence of.
Computer vision: models, learning and inference Chapter 19 Temporal models.
Lab 4 1.Get an image into a ROS node 2.Find all the orange pixels (suggest HSV) 3.Identify the midpoint of all the orange pixels 4.Explore the findContours.
Computer vision: models, learning and inference Chapter 19 Temporal models.
Computer Vision - A Modern Approach Set: Tracking Slides by D.A. Forsyth The three main issues in tracking.
Probabilistic Robotics Bayes Filter Implementations.
Chapter 5.6 From DeGroot & Schervish. Uniform Distribution.
Mobile Robot Localization (ch. 7)
Processing Sequential Sensor Data The “John Krumm perspective” Thomas Plötz November 29 th, 2011.
CS Statistical Machine learning Lecture 24
State Estimation and Kalman Filtering
Sequential Monte-Carlo Method -Introduction, implementation and application Fan, Xin
Trond Reitan (Division of statistics and insurance mathematics, Department of Mathematics, University of Oslo) Statistical modelling and latent variables.
Kalman Filtering And Smoothing
State Estimation and Kalman Filtering Zeeshan Ali Sayyed.
Tracking with dynamics
Hidden Markov Models. A Hidden Markov Model consists of 1.A sequence of states {X t |t  T } = {X 1, X 2,..., X T }, and 2.A sequence of observations.
Probabilistic Robotics Bayes Filter Implementations Gaussian filters.
STA302/1001 week 11 Regression Models - Introduction In regression models, two types of variables that are studied:  A dependent variable, Y, also called.
Data Modeling Patrice Koehl Department of Biological Sciences
Sampling and Sampling Distributions
STATISTICS POINT ESTIMATION
HMM: Particle filters Lirong Xia. HMM: Particle filters Lirong Xia.
水分子不時受撞,跳格子(c.p. 車行) 投骰子 (最穩定) 股票 (價格是不穏定,但報酬過程略穩定) 地震的次數 (不穩定)
Tracking We are given a contour G1 with coordinates G1={x1 , x2 , … , xN} at the initial frame t=1, were the image is It=1 . We are interested in tracking.
CH 5: Multivariate Methods
Inference for the mean vector
Particle Filtering for Geometric Active Contours
Probabilistic Robotics
Sample Mean Distributions
PSG College of Technology
Markov ó Kalman Filter Localization
Course: Autonomous Machine Learning
Lecture 10: Observers and Kalman Filters
Propagating Uncertainty In POMDP Value Iteration with Gaussian Process
Hidden Markov Models Part 2: Algorithms
Hidden Markov Autoregressive Models
CONCEPTS OF ESTIMATION
Wavelet-Based Denoising Using Hidden Markov Models
Filtering and State Estimation: Basic Concepts
Wavelet-Based Denoising Using Hidden Markov Models
10701 / Machine Learning Today: - Cross validation,
Particle Filters for Event Detection
A Short Introduction to the Bayes Filter and Related Models
Hidden Markov Models (HMMs)
Addition of Independent Normal Random Variables
Lecture 17 Kalman Filter.
Probabilistic Map Based Localization
Bayes and Kalman Filter
State Space Models.
Kalman Filtering COS 323.
Chapter14-cont..
Biointelligence Laboratory, Seoul National University
Both involve matrix algebra, carry same names, similar meanings
HMM: Particle filters Lirong Xia. HMM: Particle filters Lirong Xia.
Presentation transcript:

Hidden Markov chain models (state space model) General problem: have a set of noisy measurements of a process. I.e. two components: A real-world process. Measurements that give some information about the state of the process at a given time. Assumptions: Process is Markovian (previous state summarizes all relevant history). Observational noise is independent. This is the data we’ve got. Z1 Z2 Z3 Zk Zk+1 Zn This is what we’re interested in. (The process) X1 . . . . . . X2 X3 Xk Xk+1 Xn

Hidden Markov model specification We have two components in a hidden Markov chain model: A hidden process which is Markovian: 𝑓 𝑋 1 , 𝑋 2 , 𝑋 3 ,⋯, 𝑋 𝑘−1 , 𝑋 𝑘 ,⋯, 𝑋 𝑛 =𝑓( 𝑋 1 ) 𝑘=2 𝑛 𝑓( 𝑋 𝑘 | 𝑋 𝑘−1 ) For each time point, what is needed is the dependency of the process state on the previous state: 𝑓( 𝑋 𝑘 | 𝑋 𝑘−1 ). This distribution will contain all process-related parameters and is called the system equation. (Dependency on process parameters have been suppressed.) The dependency of each measurement on the process state at the given time: 𝑓( 𝑍 𝑘 | 𝑋 𝑘 ). This is called the observational equation and contains all the observation-related parameters. PS: Both process and measurements can be vectors. The number of components in the measurements can vary and do not need to match the number of components in the process! This is the data we’ve got. Z1 Z2 Z3 Zk-1 Zk Zn X1 . . . . . . X2 X3 Xk-1 Xk Xn This is the process we’re interested in.

Hidden Markov model specification What we want from the process: Inference about the state of the process at a given time The likelihood! If we have the likelihood, we can do inference on the parameters of the process (and the observations), as well as do model selection! 𝐿 𝜃 ≡𝑓( 𝑍 1 , 𝑍 2 , 𝑍 3 ,⋯, 𝑍 𝑘−1 , 𝑍 𝑘 ,⋯, 𝑍 𝑛 )= 𝑓( 𝑍 1 )𝑓( 𝑍 2 |𝑍 1 )𝑓( 𝑍 3 |𝑍 1 ,𝑍 2 )⋯ 𝑓( 𝑍 𝑘 |𝑍 1 ,𝑍 2 , 𝑍 3 ,⋯, 𝑍 𝑘−1 ) ⋯ 𝑓( 𝑍 𝑛 |𝑍 1 ,𝑍 2 , 𝑍 3 ,⋯, 𝑍 𝑛−1 ) PS: This is completely general! This is the data we’ve got. Z1 Z2 Z3 Zk-1 Zk Zn X1 . . . . . . X2 X3 Xk-1 Xk Xn This is the process we’re interested in.

Doing inference on hidden times series models - filtering Data Z1 Z2 Z3 Zk-1 Zk Zn X1 . . . . . . X2 X3 Xk-1 Xk Xn Process Procedure: Go stepwise through the observations from 1 to n. For observation k-1, assume you have the state inference conditioned on all data up to that observation: f(Xk-1|Zk-1,…,Z1). Then: Predict next system state: Use the state equation and the law of total probability calculate f(Xk|Zk-1,…,Z1). Predict next observation: Use the observational equation and the law of total probability to get f(Zk|Zk-1,…,Z1). Update process state with current observation: Use Bayes’ formula to calculate f(Xk|Zk, Zk-1, …,Z1). (You need f(Xk|Zk-1,…,Z1). , f(Zk|Zk-1,…,Z1) and the observational equation 𝑓( 𝑍 𝑘 | 𝑋 𝑘 ) to do this). Go back to step 1, now for Xk+1. Likelihood: Lf(Z1,…, Zn|)=f(Z1) f(Z2|Z1)…f(Zk|Zk-1)... f(Zn|Zn-1).

The Kalman filter Steps i and ii can usually not be performed analytically for continuous states and measurements! However, if the system and observational equations are both linear and normal, this can be done! System equation: 𝑋 𝑘 = 𝐹 𝑘 𝑋 𝑘−1 + 𝑢 𝑘 + 𝜀 𝑘 , where 𝜀 𝑘 ~𝑁 0 , 𝑄 𝑘 Observational equation: 𝑍 𝑘 = 𝐻 𝑘 𝑋 𝑘 + 𝛿 𝑘 , where 𝛿 𝑘 ~𝑁 0 , 𝑅 𝑘 We only need to keep track of the mean and the variance, since everything is normal. Let 𝑥 𝑘|𝑘−1 and 𝑥 𝑘|𝑘 the mean of the distribution of 𝑋 𝑘 given all measurements up to k-1 and k, respectively. Similarly 𝑃 𝑘|𝑘−1 and 𝑃 𝑘|𝑘 denotes the variance of 𝑋 𝑘 given all measurements up to k-1 and k, respectively. Let 𝑧 𝑘|𝑘−1 and 𝑆 𝑘|𝑘−1 denoted the mean and variance of 𝑍 𝑘 given all measurement up to k-1. Predict system: 𝑥 𝑘|𝑘−1 = 𝐹 𝑘 𝑥 𝑘−1|𝑘−1 + 𝑢 𝑘 , 𝑃 𝑘|𝑘−1 = 𝐹 𝑘 𝑃 𝑘−1|𝑘−1 𝐹′ 𝑘 + 𝑄 𝑘 Predict observation: 𝑧 𝑘|𝑘−1 = 𝐻 𝑘 𝑥 𝑘|𝑘−1 , 𝑆 𝑘|𝑘−1 = 𝐻 𝑘 𝑃 𝑘|𝑘−1 𝐻′ 𝑘 + 𝑅 𝑘 Update with current observation: 𝑥 𝑘|𝑘 = 𝑥 𝑘|𝑘−1 + 𝑃 𝑘|𝑘−1 𝐻′ 𝑘 𝑆 𝑘|𝑘−1 −1 ( 𝑍 𝑘 − 𝑧 𝑘|𝑘−1 ), 𝑃 𝑘|𝑘 =(𝐼− 𝑃 𝑘|𝑘−1 𝐻′ 𝑘 𝑆 𝑘|𝑘−1 −1 𝐻 𝑘 ) 𝑃 𝑘|𝑘−1 Go back to step 1, now for Xk+1. 𝐿= 𝑘=1 𝑁 𝑓 𝑁 ( 𝑍 𝑘 |𝑚𝑒𝑎𝑛= 𝐻 𝑘 𝑥 𝑘|𝑘−1 , 𝑣𝑎𝑟= 𝑆 𝑘|𝑘−1 )

Kalman smoother We might also be interested in the inferring the state given *all* the measurements. This can also be done analytically for a linear normal system, using the Kalman smoother. Start with 𝑥 𝑛|𝑛 and 𝑃 𝑘|𝑘 , i.e. inference for the last state given all measurements. Run backwards, using Bayes equation to incorporate the extra measurements step by step: Let 𝐶 𝑘 ≡ 𝑃 𝑘|𝑘 𝐹 ′ 𝑘+1 𝑃 𝑘+1|𝑘 −1 𝑥 𝑘|𝑛 = 𝑥 𝑘|𝑘 + 𝐶 𝑘 𝑥 𝑘+1|𝑛 − 𝑢 𝑘+1 − 𝐹 𝑘+1 𝑥 𝑘|𝑘 𝑃 𝑘|𝑛 = 𝑃 𝑘|𝑘 + 𝐶 𝑘 ( 𝑃 𝑘+1|𝑛 − 𝑃 𝑘+1|𝑘 ) 𝐶′ 𝑘 Go from k to k-1. Typically the uncertainty of this state inference will «bubble up» where you have bad/no observations and narrow down where you have good/many observations.