Probability and Time: Hidden Markov Models (HMMs)

Similar documents
Introduction to Artificial Intelligence (AI)

Introduction to Artificial Intelligence (AI)

Reasoning under Uncertainty: Intro to Probability

Reasoning under Uncertainty: Intro to Probability

Department of Computer Science Undergraduate Events More

CS 188: Artificial Intelligence Spring 2009

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

Intelligent Systems (AI-2)

Intelligent Systems (AI-2)

Intelligent Systems (AI-2)

Decision Theory: Markov Decision Processes

CS 5522: Artificial Intelligence II

CS 5522: Artificial Intelligence II

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Spring Announcements

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

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

Markov Chains and Hidden Markov Models

Reasoning Under Uncertainty: More on BNets structure and construction

CSEP 573: Artificial Intelligence

CS 343: Artificial Intelligence

Reasoning Under Uncertainty: More on BNets structure and construction

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

CS 188: Artificial Intelligence Fall Recap: Inference Example

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

Reasoning Under Uncertainty: Bayesian networks intro

Bayesian Models for Sequences

Decision Theory Intro: Preferences and Utility

Approximate Inference

Intelligent Systems (AI-2)

Reasoning Under Uncertainty: Conditioning, Bayes Rule & the Chain Rule

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

CSE 473: Artificial Intelligence

Decision Theory: Q-Learning

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

Computer Science CPSC 322. Lecture 18 Marginalization, Conditioning

Markov Models and Hidden Markov Models

CS 343: Artificial Intelligence

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

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

CS 5522: Artificial Intelligence II

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

CS 5522: Artificial Intelligence II

Reasoning Under Uncertainty: Belief Network Inference

CS 188: Artificial Intelligence

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

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

Final Exam December 12, 2017

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

Logic: Intro & Propositional Definite Clause Logic

Course 495: Advanced Statistical Machine Learning/Pattern Recognition

CS 188: Artificial Intelligence Spring Announcements

Introduction to Machine Learning CMU-10701

Artificial Intelligence Markov Chains

Computer Science CPSC 322. Lecture 23 Planning Under Uncertainty and Decision Networks

Hidden Markov Models. George Konidaris

Bayesian Networks BY: MOHAMAD ALSABBAGH

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

Lecture 18: Reinforcement Learning Sanjeev Arora Elad Hazan

Markov Decision Processes

Final Exam December 12, 2017

Why do we care? Measurements. Handling uncertainty over time: predicting, estimating, recognizing, learning. Dealing with time

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

Learning from Sequential and Time-Series Data

COMS 4771 Probabilistic Reasoning via Graphical Models. Nakul Verma

CS 343: Artificial Intelligence

Bayesian Networks: Construction, Inference, Learning and Causal Interpretation. Volker Tresp Summer 2014

Our Status in CSE 5522

10/17/04. Today s Main Points

Machine Learning for OR & FE

Probabilistic Graphical Models

CSE 473: Artificial Intelligence Spring 2014

Bayesian Networks: Construction, Inference, Learning and Causal Interpretation. Volker Tresp Summer 2016

Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs

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

CAP Plan, Activity, and Intent Recognition

CS 4649/7649 Robot Intelligence: Planning

COMP90051 Statistical Machine Learning

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

Why do we care? Examples. Bayes Rule. What room am I in? Handling uncertainty over time: predicting, estimating, recognizing, learning

CS 188: Artificial Intelligence. Our Status in CS188

Probabilistic Robotics

Kalman filtering and friends: Inference in time series models. Herke van Hoof slides mostly by Michael Rubinstein

Supervised Learning Hidden Markov Models. Some of these slides were inspired by the tutorials of Andrew Moore

CS 188: Artificial Intelligence

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

Hidden Markov models 1

Course Introduction. Probabilistic Modelling and Reasoning. Relationships between courses. Dealing with Uncertainty. Chris Williams.

CS 5522: Artificial Intelligence II

Machine Learning for Data Science (CS4786) Lecture 19

Logic, Knowledge Representation and Bayesian Decision Theory

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

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

CS532, Winter 2010 Hidden Markov Models

Reasoning Under Uncertainty: Introduction to Probability

Template-Based Representations. Sargur Srihari

CSC321 Lecture 7 Neural language models

Probability. CS 3793/5233 Artificial Intelligence Probability 1

CS 540: Machine Learning Lecture 1: Introduction

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

Transcription:

Probability and Time: Hidden Markov Models (HMMs) Computer Science cpsc322, Lecture 32 (Textbook Chpt 6.5.2) Nov, 25, 2013 CPSC 322, Lecture 32 Slide 1

Lecture Overview Recap Markov Models Markov Chain Hidden Markov Models CPSC 322, Lecture 32 Slide 2

Answering Queries under Uncertainty Probability Theory Static Belief Network & Variable Elimination Monitoring (e.g credit cards) Diagnostic Systems (e.g., medicine) Email spam filters Dynamic Bayesian Network Hidden Markov Models BioInformatics Natural Language Processing Robotics Markov Chains Student Tracing in tutoring Systems CPSC 322, Lecture 32 Slide 3

Stationary Markov Chain (SMC) A stationary Markov Chain : for all t >0 P (S t+1 S 0,,S t ) = P (S t +1 We only need to specify Simple Model, easy to specify Often the natural model and The network can extend indefinitely and Variations of SMC are at the core of most Natural Language Processing (NLP) applications! CPSC 322, Lecture 32 Slide 4

Lecture Overview Recap Markov Models Markov Chain Hidden Markov Models CPSC 322, Lecture 32 Slide 5

How can we minimally extend Markov Chains? Maintaining the Markov and stationary assumptions? A useful situation to model is the one in which: the reasoning system does not have access to the states but can make observations that give some information about the current state CPSC 322, Lecture 32 Slide 6

A. 2 x h B. h x h C. k x h D. k x k CPSC 322, Lecture 32 Slide 7

Hidden Markov Model A Hidden Markov Model (HMM) starts with a Markov chain, and adds a noisy observation about the state at each time step: domain(s) = k domain(o) = h P (S 0 ) specifies initial conditions P (S t+1 S t ) specifies the dynamics A. 2 x h B. h x h P (O t S ) t specifies the sensor model C. k x h CPSC 322, Lecture 32 Slide 8 D. k x k

Hidden Markov Model A Hidden Markov Model (HMM) starts with a Markov chain, and adds a noisy observation about the state at each time step: domain(s) = k domain(o) = h P (S 0 ) specifies initial conditions P (S t+1 S t ) specifies the dynamics P (O t S t ) specifies the sensor model CPSC 322, Lecture 32 Slide 9

xample: Localization for Pushed around Robot Localization (where am I?) is a fundamental problem in robotics Suppose a robot is in a circular corridor with 16 locations There are four doors at positions: 2, 4, 7, 11 The Robot initially doesn t know where it is The Robot is pushed around. After a push it can stay in the same location, move left or right. The Robot has a Noisy sensor telling whether it is in front of a door CPSC 322, Lecture 32 Slide 10

This scenario can be represented as Example Stochastic Dynamics: when pushed, it stays in the same location p=0.2, moves one step left or right with equal probability P(Loc t + 1 Loc t ) A. Loc t = 10 B. C.

This scenario can be represented as Example Stochastic Dynamics: when pushed, it stays in the same location p=0.2, moves left or right with equal probability P(Loc t + 1 Loc t ) P(Loc 1 ) CPSC 322, Lecture 32 Slide 12

This scenario can be represented as Example of Noisy sensor telling whether it is in front of a door. If it is in front of a door P(O t = T) =.8 If not in front of a door P(O t = T) =.1 P(O t Loc t ) CPSC 322, Lecture 32 Slide 13

Useful inference in HMMs Localization: Robot starts at an unknown location and it is pushed around t times. It wants to determine where it is In general: compute the posterior distribution over the current state given all evidence to date P(S t O 0 O t ) CPSC 322, Lecture 32 Slide 14

Example : Robot Localization Suppose a robot wants to determine its location based on its actions and its sensor readings Three actions: goright, goleft, Stay This can be represented by an augmented HMM CPSC 322, Lecture 32 Slide 15

Robot Localization Sensor and Dynamics Model Sample Sensor Model (assume same as for pushed around) Sample Stochastic Dynamics: P(Loc t + 1 Action t, Loc t ) P(Loc t + 1 = L Action t = goright, Loc t = L) = 0.1 P(Loc t + 1 = L+1 Action t = goright, Loc t = L) = 0.8 P(Loc t + 1 = L + 2 Action t = goright, Loc t = L) = 0.074 P(Loc t + 1 = L Action t = goright, Loc t = L) = 0.002 for all other locations L All location arithmetic is modulo 16 The action goleft works the same but to the left CPSC 322, Lecture 32 Slide 16

Dynamics Model More Details Sample Stochastic Dynamics: P(Loc t + 1 Action, Loc t ) P(Loc t + 1 = L Action t = goright, Loc t = L) = 0.1 P(Loc t + 1 = L+1 Action t = goright, Loc t = L) = 0.8 P(Loc t + 1 = L + 2 Action t = goright, Loc t = L) = 0.074 P(Loc t + 1 = L Action t = goright, Loc t = L) = 0.002 for all other locations L CPSC 322, Lecture 32 Slide 17

Robot Localization additional sensor Additional Light Sensor: there is light coming through an opening at location 10 P (L t Loc t ) Info from the two sensors is combined : Sensor Fusion CPSC 322, Lecture 32 Slide 18

The Robot starts at an unknown location and must determine where it is The model appears to be too ambiguous Sensors are too noisy Dynamics are too stochastic to infer anything But inference actually works pretty well. Let s check: http://www.cs.ubc.ca/spider/poole/demos/localization /localization.html You can use standard Bnet inference. However you typically take advantage of the fact that time moves forward (not in 322) CPSC 322, Lecture 32 Slide 19

Sample scenario to explore in demo Keep making observations without moving. What happens? Then keep moving without making observations. What happens? Assume you are at a certain position alternate moves and observations. CPSC 322, Lecture 32 Slide 20

HMMs have many other applications. Natural Language Processing: e.g., Speech Recognition States: phoneme \ word Observations: acoustic signal \ phoneme Bioinformatics: Gene Finding States: coding / non-coding region Observations: DNA Sequences For these problems the critical inference is: find the most likely sequence of states given a sequence of observations CPSC 322, Lecture 32 Slide 21

Markov Models Markov Chains Simplest Possible Dynamic Bnet Hidden Markov Model Add noisy Observations about the state at time t Add Actions and Values (Rewards) Markov Decision Processes (MDPs) CPSC 322, Lecture 32 Slide 22

You can: Learning Goals for today s class Specify the components of an Hidden Markov Model (HMM) Justify and apply HMMs to Robot Localization Clarification on second LG for last class You can: Justify and apply Markov Chains to compute the probability of a Natural Language sentence (NOT to estimate the conditional probs- slide 18) CPSC 322, Lecture 32 Slide 23

Next week Problem Static Query Sequential Planning Deterministic Arc Consistency Constraint Search Vars + Satisfaction Constraints SLS Representation Reasoning Technique Logics Search STRIPS Search Environment Stochastic Belief Nets Var. Elimination Markov Chains and HMMs Decision Nets Var. Elimination Markov Decision Processes Value Iteration CPSC 322, Lecture 32 Slide 24

Next Class One-off decisions(textbook 9.2) Single Stage Decision networks ( 9.2.1) CPSC 322, Lecture 32 Slide 25

Instructor People Giuseppe Carenini ( carenini@cs.ubc.ca; office CICSR 105) Teaching Assistants Kamyar Ardekani kamyar.ardekany@gmail.com Tatsuro Oya toya@cs.ubc.ca Xin Ru (Nancy) Wang nancywang1991@yahoo.ca CPSC 322, Lecture 1 Slide 26