CSE 473: Artificial Intelligence Spring 2014

Similar documents
CSE 473: Artificial Intelligence

CSEP 573: Artificial Intelligence

CS 188: Artificial Intelligence Spring Announcements

Announcements. CS 188: Artificial Intelligence Fall Markov Models. Example: Markov Chain. Mini-Forward Algorithm. Example

CS 188: Artificial Intelligence Spring 2009

Hidden Markov Models. Hal Daumé III. Computer Science University of Maryland CS 421: Introduction to Artificial Intelligence 19 Apr 2012

CS 5522: Artificial Intelligence II

CS 5522: Artificial Intelligence II

Hidden Markov Models. Vibhav Gogate The University of Texas at Dallas

Markov Chains and Hidden Markov Models

Markov Models. CS 188: Artificial Intelligence Fall Example. Mini-Forward Algorithm. Stationary Distributions.

CS 343: Artificial Intelligence

CSE 473: Ar+ficial Intelligence. Probability Recap. Markov Models - II. Condi+onal probability. Product rule. Chain rule.

Announcements. CS 188: Artificial Intelligence Fall VPI Example. VPI Properties. Reasoning over Time. Markov Models. Lecture 19: HMMs 11/4/2008

Approximate Inference

Outline. CSE 573: Artificial Intelligence Autumn Agent. Partial Observability. Markov Decision Process (MDP) 10/31/2012

Probability, Markov models and HMMs. Vibhav Gogate The University of Texas at Dallas

CSE 473: Ar+ficial Intelligence. Example. Par+cle Filters for HMMs. An HMM is defined by: Ini+al distribu+on: Transi+ons: Emissions:

CSE 473: Ar+ficial Intelligence

CS188 Outline. We re done with Part I: Search and Planning! Part II: Probabilistic Reasoning. Part III: Machine Learning

CSE 473: Artificial Intelligence Probability Review à Markov Models. Outline

Mini-project 2 (really) due today! Turn in a printout of your work at the end of the class

CS 188: Artificial Intelligence Fall Recap: Inference Example

CSE 473: Artificial Intelligence

CS 343: Artificial Intelligence

CS 188: Artificial Intelligence

CS 343: Artificial Intelligence

CS 188: Artificial Intelligence. Our Status in CS188

Our Status in CSE 5522

CS 343: Artificial Intelligence

CSE 473: Artificial Intelligence Spring 2014

CS 188: Artificial Intelligence Spring Announcements

CS 5522: Artificial Intelligence II

Our Status. We re done with Part I Search and Planning!

CS 5522: Artificial Intelligence II

Hidden Markov Models. AIMA Chapter 15, Sections 1 5. AIMA Chapter 15, Sections 1 5 1

CS188 Outline. CS 188: Artificial Intelligence. Today. Inference in Ghostbusters. Probability. We re done with Part I: Search and Planning!

Bayesian Networks BY: MOHAMAD ALSABBAGH

CS 188: Artificial Intelligence Fall 2011

CSEP 573: Artificial Intelligence

Markov Models and Hidden Markov Models

Hidden Markov models 1

CS 188: Artificial Intelligence

CSE 473: Ar+ficial Intelligence. Hidden Markov Models. Bayes Nets. Two random variable at each +me step Hidden state, X i Observa+on, E i

CSCI 360 Introduc/on to Ar/ficial Intelligence Week 2: Problem Solving and Op/miza/on. Professor Wei-Min Shen Week 8.1 and 8.2

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Fall 2011

Outline. CSE 473: Artificial Intelligence Spring Bayes Nets: Big Picture. Bayes Net Semantics. Hidden Markov Models. Example Bayes Net: Car

CSE 473: Artificial Intelligence Autumn 2011

CS532, Winter 2010 Hidden Markov Models

Introduction to Mobile Robotics Probabilistic Robotics

CS 188: Artificial Intelligence Fall 2009

Outline. CSE 573: Artificial Intelligence Autumn Bayes Nets: Big Picture. Bayes Net Semantics. Hidden Markov Models. Example Bayes Net: Car

Markov localization uses an explicit, discrete representation for the probability of all position in the state space.

CS325 Artificial Intelligence Ch. 15,20 Hidden Markov Models and Particle Filtering

CS 188: Artificial Intelligence. Bayes Nets

Announcements. CS 188: Artificial Intelligence Spring Probability recap. Outline. Bayes Nets: Big Picture. Graphical Model Notation

Probabilistic Robotics

Introduction to Artificial Intelligence (AI)

Announcements. Inference. Mid-term. Inference by Enumeration. Reminder: Alarm Network. Introduction to Artificial Intelligence. V22.

Partially Observable Markov Decision Processes (POMDPs)

Human-Oriented Robotics. Temporal Reasoning. Kai Arras Social Robotics Lab, University of Freiburg

Bayesian Networks. Vibhav Gogate The University of Texas at Dallas

Final Exam December 12, 2017

Bayesian Networks. Vibhav Gogate The University of Texas at Dallas

Introduction to Artificial Intelligence (AI)

Probabilistic Robotics

Hidden Markov Models. George Konidaris

CS 188: Artificial Intelligence Spring Announcements

15-381: Artificial Intelligence. Hidden Markov Models (HMMs)

Hidden Markov Models (recap BNs)

PROBABILISTIC REASONING OVER TIME

Final Exam December 12, 2017

Reasoning Under Uncertainty Over Time. CS 486/686: Introduction to Artificial Intelligence

Partially Observable Markov Decision Processes (POMDPs) Pieter Abbeel UC Berkeley EECS

Linear Dynamical Systems

Artificial Intelligence

CSE 473: Artificial Intelligence Autumn Topics

Bayes Nets III: Inference

Probability Hal Daumé III. Computer Science University of Maryland CS 421: Introduction to Artificial Intelligence 27 Mar 2012

CS 188: Artificial Intelligence Spring Today

Computer Vision Group Prof. Daniel Cremers. 14. Sampling Methods

Bayes Nets: Sampling

CS 5522: Artificial Intelligence II

8: Hidden Markov Models

Reinforcement Learning Wrap-up

Probabilistic Robotics. Slides from Autonomous Robots (Siegwart and Nourbaksh), Chapter 5 Probabilistic Robotics (S. Thurn et al.

Lecture 3: ASR: HMMs, Forward, Viterbi

We Live in Exciting Times. CSCI-567: Machine Learning (Spring 2019) Outline. Outline. ACM (an international computing research society) has named

Hidden Markov Models. Aarti Singh Slides courtesy: Eric Xing. Machine Learning / Nov 8, 2010

Chapter 05: Hidden Markov Models

CS 343: Artificial Intelligence

Bayes Net Representation. CS 188: Artificial Intelligence. Approximate Inference: Sampling. Variable Elimination. Sampling.

The Particle Filter. PD Dr. Rudolph Triebel Computer Vision Group. Machine Learning for Computer Vision

Introduction to Machine Learning CMU-10701

CS 343: Artificial Intelligence

Today s Outline. Recap: MDPs. Bellman Equations. Q-Value Iteration. Bellman Backup 5/7/2012. CSE 473: Artificial Intelligence Reinforcement Learning

Hidden Markov Models,99,100! Markov, here I come!

Computer Vision Group Prof. Daniel Cremers. 11. Sampling Methods

Hidden Markov Models. By Parisa Abedi. Slides courtesy: Eric Xing

Transcription:

CSE 473: Artificial Intelligence Spring 2014 Hidden Markov Models Hanna Hajishirzi Many slides adapted from Dan Weld, Pieter Abbeel, Dan Klein, Stuart Russell, Andrew Moore & Luke Zettlemoyer 1

Outline Probabilistic sequence models (and inference) Probability and Uncertainty Preview Markov Chains Hidden Markov Models Exact Inference Particle Filters

Going Hunting 3

Hidden Markov Models Markov chains not so useful for most agents Eventually you don t know anything anymore Need observations to update your beliefs X 1 X 2 X 3 X 4 Hidden Markov models (HMMs) Underlying Markov chain over states S You observe outputs (effects) at each time step X 1 X 2 X 3 X 4 X N 5 E 2 E 3 E 4 E N 5

Example: Weather HMM An HMM is defined by: Initial distribution: Transitions: Emissions:

Ghostbusters HMM P(X 1 ) = uniform P(X X) = usually move clockwise, but sometimes move in a random direction or stay in place P(E X) = same sensor model as before: red means close, green means far away. 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 P(X 1 ) X 1 X 2 X 3 X 4 1/6 1/6 0 1/6 1/2 0 E 3 E 4 0 0 0 P(X X=<1,2>) P(E X) P(red 3) P(orange 3) P(yellow 3) P(green 3) E 0.05 0.15 5 0.5 0.3

Hidden Markov Models X 1 X 2 X 3 X 4 X N 5 E 2 E 3 E 4 E N 5 Defines a joint probability distribution: P (X 1,,X 2,E 2,X 3,E 3 )=P (X 1 )P ( X 1 )P (X 2 X 1 )P (E 2 X 2 )P (X 3 X 2 )P (E 3 X 3 )! Ques)ons#to#be#resolved:#! Does#this#indeed#define#a#joint#distribu)on?#! Can#every#joint#distribu)on#be#factored#this#way,#or#are#we#making#some#assump)ons#about#the# joint#distribu)on#by#using#this#factoriza)on?# Y t=2

Chain#Rule#and#HMMs# X 1 X 2 X 3 E 2 E 3! From#the#chain#rule,#every#joint#distribu)on#over###########################################can#be#wriden#as:# X 1,,X 2,E 2,X 3,E 3 P (X 1,,X 2,E 2,X 3,E 3 )=P (X 1 )P ( X 1 )P (X 2 X 1, )P (E 2 X 1,,X 2 ) P (X 3 X 1,,X 2,E 2 )P (E 3 X 1,,X 2,E 2,X 3 )! Assuming#that# ## X 2? X 1, E 2? X 1, X 2, X 3? X 1,,E 2 X 2, E 3? X 1,,X 2,E 2 X 3 ##### ##### gives#us#the#expression#posited#on#the#previous#slide:## P (X 1,,X 2,E 2,X 3,E 3 )=P (X 1 )P ( X 1 )P (X 2 X 1 )P (E 2 X 2 )P (X 3 X 2 )P (E 3 X 3 ) 8

Chain#Rule#and#HMMs# X 1 X 2 X 3! From#the#chain#rule,#every#joint#distribu)on#over#########################################can#be#wriden#as:# X 1,,...,X T,E T P (X 1,,...,X T,E T )=P (X 1 )P ( X 1 ) TY P (X t X 1,,...,X t 1,E t 1 )P (E t X 1,,...,X t 1,E t 1,X t ) t=2! Assuming#that#for#all#t:##! State#independent#of#all#past#states#and#all#past#evidence#given#the#previous#state,#i.e.:## X t? X 1,,...,X t 2,E t 2,E t 1 X t 1 E 2 E 3! Evidence#is#independent#of#all#past#states#and#all#past#evidence#given#the#current#state,#i.e.:# ##### # E t? X 1,,...,X t 2,E t 2,X t 1,E t 1 X t ######gives#us#the#expression#posited#on#the#earlier#slide:## TY P (X 1,,...,X T,E T )=P(X 1 )P ( X 1 ) P (X t X t 1 )P (E t X t ) t=2 9

Implied Conditional Independencies X 1 X 2 X 3 E 2 E 3! Many#implied#condi)onal#independencies,#e.g.,#? X 2,E 2,X 3,E 3 X 1! To#prove#them#! Approach#1:#follow#similar#(algebraic)#approach#to#what#we#did#in#the# Markov#models#lecture#! Approach#2:#directly#from#the#graph#structure#(3#lectures#from#now)#! Intui)on:#If#path#between#U#and#V#goes#through#W,#then# U? V W [Some#fineprint#later]# 10

Conditional Independence HMMs have two important independence properties: Markov hidden process, future depends on past via the present Current observation independent of all else given current state X 1 X 2 X 3 X 4 E 2 E 3 E 4 Quiz: Are observations E1, E2 independent? [No, correlated by the hidden state]

Real HMM Examples Speech recognition HMMs: Observations are acoustic signals (continuous valued) States are specific positions in specific words (so, tens of thousands) X 1 X 2 X 3 X 4 E 3 E 4

Real HMM Examples Machine translation HMMs: Observations are words (tens of thousands) States are translation options X 1 X 2 X 3 X 4 E 3 E 4

Real HMM Examples Robot tracking: Observations are range readings (continuous) States are positions on a map (continuous) X 1 X 2 X 3 X 4 E 3 E 4

HMM Computations Given joint P(X 1:n,:n ) evidence :n =e 1:n X 1 X 2 X 3 X 4 E 3 E 4 X n E n Inference problems include: Filtering, find P(X t e 1:t ) for current t Smoothing, find P(X t e 1:n ) for past t

HMM Computations Given joint P(X 1:n,:n ) evidence :n =e 1:n X 1 X 2 X 3 X 4 E 3 E 4 Inference problems include: Filtering, find P(X t e 1:t ) for current t Smoothing, find P(X t e 1:n ) for past t Most probable explanation, find x* 1:n = argmaxx 1:n P(x 1:n e 1:n )

Filtering / Monitoring Filtering, or monitoring, is the task of tracking the distribution B(X)=P(X t e 1:t ) (the belief state) over time We start with B(X) in an initial setting, usually uniform As time passes, or we get observations, we update B(X) The Kalman filter was invented in the 60 s and first implemented as a method of trajectory estimation for the Apollo program

Example: Robot Localization Example from Michael Pfeiffer Prob 0 t=0 Sensor model: never more than 1 mistake Motion model: may not execute action with small prob. 1

Example: Robot Localization Prob 0 1 t=1

Example: Robot Localization Prob 0 1 t=2

Example: Robot Localization Prob 0 1 t=3

Example: Robot Localization Prob 0 1 t=4

Example: Robot Localization Prob 0 1 t=5