CS 188: Artificial Intelligence Fall 2006 Lecture 18: Decision Diagrams 10/31/2006 Dan Klein – UC Berkeley.

Slides:



Advertisements
Similar presentations
Making Simple Decisions
Advertisements

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.
Advanced Artificial Intelligence
QUIZ!!  T/F: Rejection Sampling without weighting is not consistent. FALSE  T/F: Rejection Sampling (often) converges faster than Forward Sampling. FALSE.
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.
. PGM: Tirgul 8 Markov Chains. Stochastic Sampling  In previous class, we examined methods that use independent samples to estimate P(X = x |e ) Problem:
CS 188: Artificial Intelligence Fall 2009 Lecture 17: Bayes Nets IV 10/27/2009 Dan Klein – UC Berkeley.
CS 188: Artificial Intelligence Spring 2007 Lecture 14: Bayes Nets III 3/1/2007 Srini Narayanan – ICSI and UC Berkeley.
CS 188: Artificial Intelligence Fall 2006 Lecture 17: Bayes Nets III 10/26/2006 Dan Klein – UC Berkeley.
Announcements Homework 8 is out Final Contest (Optional)
CS 188: Artificial Intelligence Fall 2009 Lecture 19: Hidden Markov Models 11/3/2009 Dan Klein – UC Berkeley.
CS 188: Artificial Intelligence Fall 2009 Lecture 18: Decision Diagrams 10/29/2009 Dan Klein – UC Berkeley.
Approximate Inference 2: Monte Carlo Markov Chain
CHAPTER 15 SECTION 3 – 4 Hidden Markov Models. Terminology.
CS 188: Artificial Intelligence Fall 2008 Lecture 18: Decision Diagrams 10/30/2008 Dan Klein – UC Berkeley 1.
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:
Recap: Reasoning Over Time  Stationary Markov models  Hidden Markov models X2X2 X1X1 X3X3 X4X4 rainsun X5X5 X2X2 E1E1 X1X1 X3X3 X4X4 E2E2 E3E3.
Making Simple Decisions
CS 188: Artificial Intelligence Fall 2008 Lecture 19: HMMs 11/4/2008 Dan Klein – UC Berkeley 1.
Introduction to Bayesian Networks
CHAPTER 15 SECTION 1 – 2 Markov Models. Outline Probabilistic Inference Bayes Rule Markov Chains.
QUIZ!!  T/F: Forward sampling is consistent. True  T/F: Rejection sampling is faster, but inconsistent. False  T/F: Rejection sampling requires less.
UIUC CS 498: Section EA Lecture #21 Reasoning in Artificial Intelligence Professor: Eyal Amir Fall Semester 2011 (Some slides from Kevin Murphy (UBC))
UBC Department of Computer Science Undergraduate Events More
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Bayes’ Nets: Sampling [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials are available.
Announcements Project 4: Ghostbusters Homework 7
CS 416 Artificial Intelligence Lecture 17 Reasoning over Time Chapter 15 Lecture 17 Reasoning over Time Chapter 15.
CHAPTER 8 DISCRIMINATIVE CLASSIFIERS HIDDEN MARKOV MODELS.
The famous “sprinkler” example (J. Pearl, Probabilistic Reasoning in Intelligent Systems, 1988)
QUIZ!!  In HMMs...  T/F:... the emissions are hidden. FALSE  T/F:... observations are independent given no evidence. FALSE  T/F:... each variable X.
Probabilistic models Jouni Tuomisto THL. Outline Deterministic models with probabilistic parameters Hierarchical Bayesian models Bayesian belief nets.
Bayesian networks and their application in circuit reliability estimation Erin Taylor.
CS 188: Artificial Intelligence Bayes Nets: Approximate Inference Instructor: Stuart Russell--- University of California, Berkeley.
Advanced Artificial Intelligence Lecture 5: Probabilistic Inference.
Quick Warm-Up Suppose we have a biased coin that comes up heads with some unknown probability p; how can we use it to produce random bits with probabilities.
1 CMSC 671 Fall 2001 Class #20 – Thursday, November 8.
CS 416 Artificial Intelligence Lecture 15 Uncertainty Chapter 14 Lecture 15 Uncertainty Chapter 14.
Reasoning over Time  Often, we want to reason about a sequence of observations  Speech recognition  Robot localization  User attention  Medical monitoring.
CS 188: Artificial Intelligence Spring 2009 Lecture 20: Decision Networks 4/2/2009 John DeNero – UC Berkeley Slides adapted from Dan Klein.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
QUIZ!!  T/F: You can always (theoretically) do BNs inference by enumeration. TRUE  T/F: In VE, always first marginalize, then join. FALSE  T/F: VE is.
CS 541: Artificial Intelligence Lecture VII: Inference in Bayesian Networks.
CS498-EA Reasoning in AI Lecture #19 Professor: Eyal Amir Fall Semester 2011.
CS 188: Artificial Intelligence Spring 2006
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 12
Probabilistic reasoning over time
Probabilistic Reasoning
Artificial Intelligence
CS 4/527: Artificial Intelligence
CAP 5636 – Advanced Artificial Intelligence
Probabilistic Reasoning
CS 188: Artificial Intelligence Spring 2007
Advanced Artificial Intelligence
Inference Inference: calculating some useful quantity from a joint probability distribution Examples: Posterior probability: Most likely explanation: B.
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 12
Instructors: Fei Fang (This Lecture) and Dave Touretzky
CS 188: Artificial Intelligence
Probabilistic Reasoning
Probabilistic Reasoning
Class #19 – Tuesday, November 3
CS 188: Artificial Intelligence Fall 2008
Hidden Markov Models (cont.) Markov Decision Processes
Hidden Markov Models Lirong Xia.
CS 188: Artificial Intelligence Fall 2007
Announcements Assignments HW10 Due Wed 4/17 HW11
Probabilistic reasoning over time
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 12
Presentation transcript:

CS 188: Artificial Intelligence Fall 2006 Lecture 18: Decision Diagrams 10/31/2006 Dan Klein – UC Berkeley

Announcements  Optional midterm  On Tuesday 11/21 in class unless conflicts  We will count the midterms and final as 1 / 1 / 2, and drop the lowest (or halve the final weight)  Will also run grades as if this midterm did not happen  You will get the better of the two grades  Projects  3.2 up today, grades on previous projects ASAP  Total of 3 checkpoints left (including 3.2)

Recap: Sampling  Exact inference can be slow  Basic idea: sampling  Draw N samples from a sampling distribution S  Compute an approximate posterior probability  Show this converges to the true probability P  Benefits:  Easy to implement  You can get an (approximate) answer fast  Last time:  Rejection sampling: reject samples disagreeing with evidence  Likelihood weighting: use evidence to weight samples

Likelihood Weighting  Problem with rejection sampling:  If evidence is unlikely, you reject a lot of samples  You don’t exploit your evidence as you sample  Consider P(B | A=true)  Idea: fix evidence variables and sample the rest  Problem: sample distribution not consistent!  Solution: weight by probability of evidence given parents BurglaryAlarm BurglaryAlarm

Likelihood Sampling Cloudy Sprinkler Rain WetGrass Cloudy Sprinkler Rain WetGrass

Likelihood Weighting  Sampling distribution if z sampled and e fixed evidence  Now, samples have weights  Together, weighted sampling distribution is consistent Cloudy Rain C S R W

Likelihood Weighting  Note that likelihood weighting doesn’t solve all our problems  Rare evidence is taken into account for downstream variables, but not upstream ones  A better solution is Markov-chain Monte Carlo (MCMC), more advanced  We’ll return to sampling for robot localization and tracking in dynamic BNs Cloudy Rain C S R W

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) Weather Report Umbrella U

Decision Networks  Action selection:  Instantiate all evidence  Calculate posterior over parents of utility node  Set action node each possible way  Calculate expected utility for each action  Choose maximizing action Weather Report Umbrella U

Example: Decision Networks Weather Umbrella U WP(W) sun0.7 rain0.3 AWU(A,W) leavesun100 leaverain0 takesun20 takerain70

Example: Decision Networks Weather Report Umbrella U AWU(A,W) leavesun100 leaverain0 takesun20 takerain70 WP(W) sun0.7 rain0.3 RP(R|rain) clear0.2 cloud0.8 RP(R|sun) clear0.5 cloudy0.5

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?  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 OilLoc DrillLoc U

General Formula  Current evidence E=e, possible utility inputs 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)

VPI Properties  Nonnegative in expectation  Nonadditive ---consider, e.g., obtaining E j twice  Order-independent

VPI Example Weather Report Umbrella U

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. Little – info likely to change our action but not our utility A lot – either could be much better

Reasoning over Time  Often, we want to reason about a sequence of observations  Speech recognition  Robot localization  User attention  Need to introduce time into our models  Basic approach: hidden Markov models (HMMs)  More general: dynamic Bayes’ nets

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:  Parameters: called transition probabilities, specify how the state evolves over time (also, initial probs) X2X2 X1X1 X3X3 X4X4

Conditional Independence  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 X2X2 X1X1 X3X3 X4X4

Example  Weather:  States: X = {rain, sun}  Transitions:  Initial distribution: 1.0 sun  What’s the probability distribution after one step? rainsun 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  Better answer: cached incremental belief update Forward simulation

Example  From initial observation of sun  From initial observation of rain P(X 1 )P(X 2 )P(X 3 )P(X  ) P(X 1 )P(X 2 )P(X 3 )P(X  )

Stationary Distributions  If we simulate the chain long enough:  What 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

Web Link Analysis  PageRank over a web graph  Each web page is a state  Initial distribution: uniform over pages  Transitions:  With prob. c, uniform jump to a random page (solid lines)  With prob. 1-c, follow a random outlink (dotted lines)  Stationary distribution  Will 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 pages containing your keywords in decreasing rank, now all search engines use link analysis along with many other factors