CS 188: Artificial Intelligence Fall Recap: Inference Example

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

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

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

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

Approximate Inference

CS 188: Artificial Intelligence Spring Announcements

Markov Chains and Hidden Markov Models

CS 343: Artificial Intelligence

CS 188: Artificial Intelligence

CSEP 573: Artificial Intelligence

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

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

CS 5522: Artificial Intelligence II

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

CS 188: Artificial Intelligence

CS 343: Artificial Intelligence

CSE 473: Artificial Intelligence

CSE 473: Ar+ficial Intelligence

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

CSE 473: Artificial Intelligence Spring 2014

CS 5522: Artificial Intelligence II

CS 5522: Artificial Intelligence II

CS 188: Artificial Intelligence Fall 2011

CS 343: Artificial Intelligence

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

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

CS 343: Artificial Intelligence

Announcements. CS 188: Artificial Intelligence Fall Causality? Example: Traffic. Topology Limits Distributions. Example: Reverse Traffic

Bayesian Networks BY: MOHAMAD ALSABBAGH

CS 343: Artificial Intelligence

Introduction to Artificial Intelligence (AI)

Hidden Markov models 1

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

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

CSE 473: Artificial Intelligence

CS 5522: Artificial Intelligence II

Introduction to Artificial Intelligence (AI)

CS 5522: Artificial Intelligence II

Bayes Nets III: Inference

CS 188: Artificial Intelligence Fall 2008

CS 188: Artificial Intelligence Fall 2009

CS 188: Artificial Intelligence. Our Status in CS188

CS 188: Artificial Intelligence Spring Announcements

Bayes Nets: Sampling

Hidden Markov Models (recap BNs)

CS532, Winter 2010 Hidden Markov Models

CS 188: Artificial Intelligence. Bayes Nets

CS 188: Artificial Intelligence Spring Announcements

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

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

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

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

Reasoning Under Uncertainty: Bayesian networks intro

Markov Models and Hidden Markov Models

COMS 4771 Probabilistic Reasoning via Graphical Models. Nakul Verma

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

Our Status in CSE 5522

Probability and Time: Hidden Markov Models (HMMs)

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

CS 343: Artificial Intelligence

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

Machine Learning for Data Science (CS4786) Lecture 19

Artificial Intelligence Bayes Nets: Independence

Reinforcement Learning Wrap-up

Last update: April 15, Rational decisions. CMSC 421: Chapter 16. CMSC 421: Chapter 16 1

CS 188: Artificial Intelligence Fall 2009

CS 188: Artificial Intelligence Spring Announcements

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

Midterm 2 V1. Introduction to Artificial Intelligence. CS 188 Spring 2015

Decision Networks. CS 188: Artificial Intelligence Fall Example: Decision Networks. Decision Networks. Decisions as Outcome Trees

Intelligent Systems (AI-2)

CSEP 573: Artificial Intelligence

Introduction to Machine Learning CMU-10701

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

Forward algorithm vs. particle filtering

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

Reasoning under Uncertainty: Intro to Probability

Rational preferences. Rational decisions. Outline. Rational preferences contd. Maximizing expected utility. Preferences

STA 4273H: Statistical Machine Learning

CS Lecture 3. More Bayesian Networks

CS 188: Artificial Intelligence Fall 2010

Rapid Introduction to Machine Learning/ Deep Learning

CS 4100 // artificial intelligence. Recap/midterm review!

CS 188: Artificial Intelligence Fall 2011

CS 5522: Artificial Intelligence II

STA 414/2104: Machine Learning

Discrete Probability and State Estimation

Probabilistic Models

Lecture 14: Introduction to Decision Making

CS 5522: Artificial Intelligence II

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

PROBABILISTIC REASONING OVER TIME

Hidden Markov Models. George Konidaris

Probability. CS 3793/5233 Artificial Intelligence Probability 1

LEARNING DYNAMIC SYSTEMS: MARKOV MODELS

Approximate Q-Learning. Dan Weld / University of Washington

Page 1. References. Hidden Markov models and multiple sequence alignment. Markov chains. Probability review. Example. Markovian sequence

Announcements. CS 188: Artificial Intelligence Spring Bayes Net Semantics. Probabilities in BNs. All Conditional Independences

Linear Dynamical Systems

Transcription:

CS 188: Artificial Intelligence Fall 2007 Lecture 19: Decision Diagrams 11/01/2007 Dan Klein UC Berkeley Recap: Inference Example Find P( F=bad) Restrict all factors P() P(F=bad ) P() 0.7 0.3 eather 0.7 0.3 0.2 0.9 F good P(F ) 0.8 No hidden vars to eliminate (this time!) Just join and normalize bad F good bad 0.2 P(F ) 0.1 0.9 Forecast P(,F=bad) P( F=bad) 0.14 0.34 0.27 0.66 1

Decision Networks MEU: choose the action which maximizes the expected utility given the evidence Can directly operationalize this with decision diagrams Bayes nets with nodes for utility and actions Lets us calculate the expected utility for each action New node types: Chance nodes (just like BNs) Actions (rectangles, must be parents, act as observed evidence) Utilities (depend on action and chance nodes) Umbrella eather Forecast U Decision Networks Action selection: Instantiate all evidence Calculate posterior joint over parents of utility node Set action node each possible way Calculate expected utility for each action Choose maximizing action Umbrella eather Forecast U 2

Example: Decision Networks Umbrella = leave Umbrella U Umbrella = take eather Optimal decision = leave P() 0.7 0.3 A leave leave take take U(A,) 100 0 20 70 Example: Decision Networks Umbrella = leave Umbrella P( F=bad) 0.34 0.66 U Umbrella = take eather A U(A,) Optimal decision = take Forecast =bad leave leave take take 100 0 20 70 3

Value of Information Idea: compute value of acquiring each possible piece of evidence Can be done directly from decision network Example: buying oil drilling rights Two blocks A and B, exactly one has oil, worth k Prior probabilities 0.5 each, mutually exclusive Current price of each block is k/2 Probe gives accurate survey of A. Fair price? DrillLoc OilLoc U Solution: compute value of information = expected value of best action given the information minus expected value of best action without information Survey may say oil in A or no oil in A, prob 0.5 each = [0.5 * value of buy A given oil in A ] + [0.5 * value of buy B given no oil in A ] 0 = [0.5 * k/2] + [0.5 * k/2] - 0 = k/2 Value of Information Current evidence E=e, utility depends on S=s Potential new evidence E : suppose we knew E = e BUT E is a random variable whose value is currently unknown, so: Must compute expected gain over all possible values (VPI = value of perfect information) 4

VPI Example MEU with no evidence Umbrella MEU if forecast is bad eather A U U MEU if forecast is good Forecast distribution Forecast leave leave take take 100 0 20 70 F good bad P(F) 0.59 0.41 VPI Properties Nonnegative in expectation Nonadditive ---consider, e.g., obtaining E j twice Order-independent 5

VPI Scenarios Imagine actions 1 and 2, for which U 1 > U 2 How much will information about E j be worth? Little we re sure action 1 is better. A lot either could be much better Little info likely to change our action but not our utility Reasoning over Time Often, we want to reason about a sequence of observations Speech recognition Robot localization User attention Medical monitoring Need to introduce time into our models Basic approach: hidden Markov models (HMMs) More general: dynamic Bayes nets 6

Markov Models A Markov model is a chain-structured BN Each node is identically distributed (stationarity) Value of X at a given time is called the state As a BN: X 1 X 2 X 3 X 4 Parameters: called transition probabilities or dynamics, specify how the state evolves over time (also, initial probs) Conditional Independence X 1 X 2 X 3 X 4 Basic conditional independence: Past and future independent of the present Each time step only depends on the previous This is called the (first order) Markov property Note that the chain is just a (growing) BN e can always use generic BN reasoning on it (if we truncate the chain) 7

Example: Markov Chain eather: States: X = {, } Transitions: 0.1 0.9 0.9 Initial distribution: 1.0 hat s the probability distribution after one step? 0.1 This is a CPT, not a BN! Mini-Forward Algorithm Question: probability of being in state x at time t? Slow answer: Enumerate all sequences of length t which end in s Add up their probabilities 8

Mini-Forward Algorithm Better way: cached incremental belief updates Forward simulation Example From initial observation of P(X 1 ) P(X 2 ) P(X 3 ) P(X ) From initial observation of P(X 1 ) P(X 2 ) P(X 3 ) P(X ) 9

Stationary Distributions If we simulate the chain long enough: hat happens? Uncertainty accumulates Eventually, we have no idea what the state is! Stationary distributions: For most chains, the distribution we end up in is independent of the initial distribution Called the stationary distribution of the chain Usually, can only predict a short time out eb Link Analysis PageRank over a web graph Each web page is a state Initial distribution: uniform over pages Transitions: ith prob. c, uniform jump to a random page (dotted lines) ith prob. 1-c, follow a random outlink (solid lines) Stationary distribution ill spend more time on highly reachable pages E.g. many ways to get to the Acrobat Reader download page! Somewhat robust to link spam Google 1.0 returned the set of pages containing all your keywords in decreasing rank, now all search engines use link analysis along with many other factors 10

Most Likely Explanation Question: most likely sequence ending in x at t? E.g. if on day 4, what s the most likely sequence? Intuitively: probably all four days Slow answer: enumerate and score Mini-Viterbi Algorithm Better answer: cached incremental updates Define: Read best sequence off of m and a vectors 11

Mini-Viterbi Example 12

Example Example 13

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

Example An HMM is Initial distribution: Transitions: Emissions: 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 X 5 E 1 E 2 E 3 E 4 E 5 Quiz: does this mean that observations are independent given no evidence? [No, correlated by the hidden state] 15

Forward Algorithm Can ask the same questions for HMMs as Markov chains Given current belief state, how to update with evidence? This is called monitoring or filtering Formally, we want: Example 16

Viterbi Algorithm Question: what is the most likely state sequence given the observations? Slow answer: enumerate all possibilities Better answer: cached incremental version Example 17

Real HMM Examples Speech recognition HMMs: Observations are acoustic signals (continuous valued) States are specific positions in specific words (so, tens of thousands) Machine translation HMMs: Observations are words (tens of thousands) States are translation positions (dozens) Robot tracking: Observations are range readings (continuous) States are positions on a map (continuous) 18