CS 188: Artificial Intelligence

Similar documents
CS 5522: Artificial Intelligence II

CS 343: Artificial Intelligence

Markov Chains and Hidden Markov Models

CS 188: Artificial Intelligence Spring 2009

Approximate Inference

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

CS 188: Artificial Intelligence

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Fall Recap: Inference Example

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.

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

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

CSE 473: Ar+ficial Intelligence

CSEP 573: Artificial Intelligence

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

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

CSE 473: Artificial Intelligence

CS 188: Artificial Intelligence. Our Status in CS188

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

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

CS 343: Artificial Intelligence

CS 5522: Artificial Intelligence II

CS 5522: Artificial Intelligence II

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

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

CS 188: Artificial Intelligence Spring Announcements

Artificial Intelligence Bayes Nets: Independence

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Fall 2011

Product rule. Chain rule

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

CS 343: Artificial Intelligence

CS188 Outline. CS 188: Artificial Intelligence. Today. Inference in Ghostbusters. Probability. 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

CS 188: Artificial Intelligence Fall 2009

Markov Models and Hidden Markov Models

CSE 473: Artificial Intelligence

CS 343: Artificial Intelligence

CS 5522: Artificial Intelligence II

Bayes Nets: Independence

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

Probabilistic Models. Models describe how (a portion of) the world works

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Fall 2008

CS 343: Artificial Intelligence

CS 188: Artificial Intelligence Fall 2009

CS 5522: Artificial Intelligence II

CS 343: Artificial Intelligence

Reinforcement Learning Wrap-up

Bayesian Networks. Vibhav Gogate The University of Texas at Dallas

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

Our Status in CSE 5522

Bayesian Networks. Vibhav Gogate The University of Texas at Dallas

CSE 473: Artificial Intelligence Autumn 2011

CS 188: Artificial Intelligence Fall 2011

CS 5522: Artificial Intelligence II

CS 5522: Artificial Intelligence II

CSE 473: Artificial Intelligence Spring 2014

CS 188: Artificial Intelligence. Bayes Nets

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

Bayes Nets: Sampling

CSEP 573: Artificial Intelligence

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

Recap: Bayes Nets. CS 473: Artificial Intelligence Bayes Nets: Independence. Conditional Independence. Bayes Nets. Independence in a BN

Approximate Q-Learning. Dan Weld / University of Washington

Bayesian networks. Soleymani. CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2018

Non-Linearity. CS 188: Artificial Intelligence. Non-Linear Separators. Non-Linear Separators. Deep Learning I

Bayes Nets III: Inference

Random Variables. A random variable is some aspect of the world about which we (may) have uncertainty

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

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Announcements

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

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

Introduction to Artificial Intelligence (AI)

CS 188: Artificial Intelligence. Outline

Probabilistic Models

CS 343: Artificial Intelligence

Announcements. CS 188: Artificial Intelligence Spring Classification. Today. Classification overview. Case-Based Reasoning

Bayesian networks (1) Lirong Xia

Statistical Problem. . We may have an underlying evolving system. (new state) = f(old state, noise) Input data: series of observations X 1, X 2 X t

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

COMS 4771 Probabilistic Reasoning via Graphical Models. Nakul Verma

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

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

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

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

CS 343: Artificial Intelligence

CS532, Winter 2010 Hidden Markov Models

CS 343: Artificial Intelligence

Learning: Binary Perceptron. Examples: Perceptron. Separable Case. In the space of feature vectors

CS 188: Artificial Intelligence. Machine Learning

Introduction to Artificial Intelligence (AI)

Intelligent Systems (AI-2)

CS Lecture 3. More Bayesian Networks

Machine Learning for Data Science (CS4786) Lecture 19

CSE 473: Artificial Intelligence Autumn Topics

CS 188: Artificial Intelligence

Lecture 12: Link Analysis for Web Retrieval

Transcription:

CS 188: Artificial Intelligence Markov Models Instructors: Dan Klein and Pieter Abbeel --- University of California, Berkeley [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials are available at

Independence Two variables are independent in a joint distribution if: Says the joint distribution factors into a product of two simple ones Usually variables aren t independent! Can use independence as a modeling assumption Independence can be a simplifying assumption Empirical joint distributions: at best close to independent What could we assume for {Weather, Traffic, Cavity}? Independence is like something from CSPs: what?

Example: Independence? T P hot 0.5 cold 0.5 T W P hot sun 0.4 hot rain 0.1 cold sun 0.2 cold rain 0.3 W P sun 0.6 rain 0.4 T W P hot sun 0.3 hot rain 0.2 cold sun 0.3 cold rain 0.2

Example: Independence N fair, independent coin flips: H 0.5 T 0.5 H 0.5 T 0.5 H 0.5 T 0.5

Probability Recap Conditional probability Product rule Chain rule X, Y independent if and only if: X and Y are conditionally independent given Z if and only if:

Reasoning over Time or Space Often, we want to reason about a sequence of observations Speech recognition Robot localization User attention Medical monitoring Need to introduce time (or space) into our models

Markov Models Value of X at a given time is called the state X 1 X 2 X 3 X 4 Parameters: called transition probabilities or dynamics, specify how the state evolves over time (also, initial state probabilities) Stationarity assumption: transition probabilities the same at all times Same as MDP transition model, but no choice of action

Joint Distribution of a Markov Model X 1 X 2 X 3 X 4 Joint distribution: More generally: Questions to be resolved: Does this indeed define a joint distribution? Can every joint distribution be factored this way, or are we making some assumptions about the joint distribution by using this factorization?

Chain Rule and Markov Models X 1 X 2 X 3 X 4 From the chain rule, every joint distribution over can be written as: Assuming that and results in the expression posited on the previous slide:

Chain Rule and Markov Models X 1 X 2 X 3 X 4 From the chain rule, every joint distribution over can be written as: Assuming that for all t: gives us the expression posited on the earlier slide:

Implied Conditional Independencies X 1 X 2 X 3 X 4 We assumed: and Do we also have? Yes! Proof:

Markov Models Recap Explicit assumption for all t : Consequence, joint distribution can be written as: Implied conditional independencies: (try to prove this!) Past variables independent of future variables given the present i.e., if or then: Additional explicit assumption: is the same for all t

Example Markov Chain: Weather States: X = {rain, sun} Initial distribution: 1.0 sun CPT P(X t X t-1 ): X t-1 X t P(X t X t-1 ) sun sun 0.9 sun rain 0.1 rain sun 0.3 rain rain 0.7 Two new ways of representing the same CPT 0.3 rain sun 0.7 0.1 0.9 sun 0.9 0.1 0.3 sun rain 0.7 rain

Example Markov Chain: Weather Initial distribution: 1.0 sun rain 0. 3 sun 0. 9 What is the probability distribution after one step? 0. 7 0. 1

Mini-Forward Algorithm Question: What s P(X) on some day t? X 1 X 2 X 3 X 4 Forward simulation

Example Run of Mini-Forward Algorithm From initial observation of sun P(X 1 ) P(X 2 ) P(X 3 ) P(X 4 ) P(X ) From initial observation of rain P(X 1 ) P(X 2 ) P(X 3 ) P(X 4 ) P(X ) From yet another initial distribution P(X 1 ): P(X 1 ) P(X )

Stationary Distributions For most chains: Influence of the initial distribution gets less and less over time. The distribution we end up in is independent of the initial distribution Stationary distribution: The distribution we end up with is called the stationary distribution of the chain It satisfies

Example: Stationary Distributions Question: What s P(X) at time t = infinity? X 1 X 2 X 3 X 4 X t-1 X t P(X t X t-1 ) sun sun 0.9 sun rain 0.1 Also: rain sun 0.3 rain rain 0.7

Application of Stationary Distribution: 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 (dotted lines, not all shown) With prob. 1-c, follow a random outlink (solid 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 the set of pages containing all your keywords in decreasing rank, now all search engines use link analysis along with many other factors (rank actually getting less important over time)

Next Time: Hidden Markov Models!