Probability and Time: Markov Models

Slides:



Advertisements
Similar presentations
Decision Theory: Sequential Decisions Computer Science cpsc322, Lecture 34 (Textbook Chpt 9.3) Nov, 28, 2012.
Advertisements

Department of Computer Science Undergraduate Events More
CPSC 322, Lecture 2Slide 1 Representational Dimensions Computer Science cpsc322, Lecture 2 (Textbook Chpt1) Sept, 6, 2013.
CPSC 322, Lecture 26Slide 1 Reasoning Under Uncertainty: Belief Networks Computer Science cpsc322, Lecture 27 (Textbook Chpt 6.3) March, 16, 2009.
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
Decision Theory: Single Stage Decisions Computer Science cpsc322, Lecture 33 (Textbook Chpt 9.2) March, 30, 2009.
CPSC 322, Lecture 37Slide 1 Finish Markov Decision Processes Last Class Computer Science cpsc322, Lecture 37 (Textbook Chpt 9.5) April, 8, 2009.
CPSC 322, Lecture 4Slide 1 Search: Intro Computer Science cpsc322, Lecture 4 (Textbook Chpt ) January, 12, 2009.
CPSC 322, Lecture 18Slide 1 Planning: Heuristics and CSP Planning Computer Science cpsc322, Lecture 18 (Textbook Chpt 8) February, 12, 2010.
Probabilistic reasoning over time So far, we’ve mostly dealt with episodic environments –One exception: games with multiple moves In particular, the Bayesian.
CPSC 322, Lecture 30Slide 1 Reasoning Under Uncertainty: Variable elimination Computer Science cpsc322, Lecture 30 (Textbook Chpt 6.4) March, 23, 2009.
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
Big Ideas in Cmput366. Search Blind Search Iterative deepening Heuristic Search A* Local and Stochastic Search Randomized algorithm Constraint satisfaction.
CPSC 322, Lecture 17Slide 1 Planning: Representation and Forward Search Computer Science cpsc322, Lecture 17 (Textbook Chpt 8.1 (Skip )- 8.2) February,
CPSC 322, Lecture 17Slide 1 Planning: Representation and Forward Search Computer Science cpsc322, Lecture 17 (Textbook Chpt 8.1 (Skip )- 8.2) February,
CPSC 322, Lecture 31Slide 1 Probability and Time: Markov Models Computer Science cpsc322, Lecture 31 (Textbook Chpt 6.5) March, 25, 2009.
CPSC 322, Lecture 22Slide 1 Logic: Domain Modeling /Proofs + Top-Down Proofs Computer Science cpsc322, Lecture 22 (Textbook Chpt 5.2) March, 8, 2010.
CPSC 322, Lecture 32Slide 1 Probability and Time: Hidden Markov Models (HMMs) Computer Science cpsc322, Lecture 32 (Textbook Chpt 6.5) March, 27, 2009.
CPSC 422, Lecture 14Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 14 Feb, 4, 2015 Slide credit: some slides adapted from Stuart.
CPSC 322, Lecture 35Slide 1 Value of Information and Control Computer Science cpsc322, Lecture 35 (Textbook Chpt 9.4) April, 14, 2010.
CPSC 322, Lecture 24Slide 1 Reasoning under Uncertainty: Intro to Probability Computer Science cpsc322, Lecture 24 (Textbook Chpt 6.1, 6.1.1) March, 15,
CPSC 322, Lecture 22Slide 1 Logic: Domain Modeling /Proofs + Top-Down Proofs Computer Science cpsc322, Lecture 22 (Textbook Chpt 5.2) Oct, 26, 2010.
Department of Computer Science Undergraduate Events More
CPSC 322, Lecture 32Slide 1 Probability and Time: Hidden Markov Models (HMMs) Computer Science cpsc322, Lecture 32 (Textbook Chpt 6.5.2) Nov, 25, 2013.
CPSC 322, Lecture 4Slide 1 Search: Intro Computer Science cpsc322, Lecture 4 (Textbook Chpt ) Sept, 12, 2012.
Probability and Time. Overview  Modelling Evolving Worlds with Dynamic Baysian Networks  Simplifying Assumptions Stationary Processes, Markov Assumption.
CPSC 322, Lecture 2Slide 1 Representational Dimensions Computer Science cpsc322, Lecture 2 (Textbook Chpt1) Sept, 7, 2012.
CPSC 322, Lecture 26Slide 1 Reasoning Under Uncertainty: Belief Networks Computer Science cpsc322, Lecture 27 (Textbook Chpt 6.3) Nov, 13, 2013.
CPSC 322, Lecture 22Slide 1 Logic: Domain Modeling /Proofs + Top-Down Proofs Computer Science cpsc322, Lecture 22 (Textbook Chpt 5.2) Oct, 30, 2013.
Constraint Satisfaction Problems (CSPs) Introduction
Please Also Complete Teaching Evaluations
Probability and Time: Hidden Markov Models (HMMs)
Reasoning Under Uncertainty: Belief Networks
Reasoning Under Uncertainty: More on BNets structure and construction
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 2
Sequential Stochastic Models
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Planning: Forward Planning and CSP Planning
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 7
Reasoning Under Uncertainty: More on BNets structure and construction
Reasoning Under Uncertainty: Conditioning, Bayes Rule & Chain Rule
Planning: Representation and Forward Search
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 14
Decision Theory: Single Stage Decisions
Planning: Heuristics and CSP Planning
Planning: Heuristics and CSP Planning
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Planning: Representation and Forward Search
Probabilistic Reasoning over Time
Probability and Time: Markov Models
Reasoning Under Uncertainty: Bnet Inference
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 2
Planning: Heuristics and CSP Planning
Decision Theory: Sequential Decisions
Decision Theory: Single Stage Decisions
Probability and Time: Markov Models
Please Also Complete Teaching Evaluations
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 14
Logic: Domain Modeling /Proofs + Computer Science cpsc322, Lecture 22
Probability and Time: Markov Models
CPSC 503 Computational Linguistics
Reasoning Under Uncertainty: Variable elimination
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 7
Planning: Representation and Forward Search
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 3
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 7
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 14
Presentation transcript:

Probability and Time: Markov Models Computer Science cpsc322, Lecture 31 (Textbook Chpt 6.5.1) Nov, 22, 2013 CPSC 322, Lecture 31

Temporal Probabilistic Models Start Markov Models Lecture Overview Recap Temporal Probabilistic Models Start Markov Models Markov Chain Markov Chains in Natural Language Processing CPSC 322, Lecture 30

Big Picture: R&R systems Environment Stochastic Deterministic Problem Arc Consistency Search Constraint Satisfaction Vars + Constraints SLS Static Belief Nets Logics Query Var. Elimination Search R&R Sys Representation and reasoning Systems Each cell is a R&R system STRIPS actions preconditions and effects Sequential Decision Nets STRIPS Var. Elimination Planning Search Markov Processes Representation Value Iteration Reasoning Technique CPSC 322, Lecture 2

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

Temporal Probabilistic Models Start Markov Models Lecture Overview Recap Temporal Probabilistic Models Start Markov Models Markov Chain Markov Chains in Natural Language Processing CPSC 322, Lecture 30

Modelling static Environments So far we have used Bnets to perform inference in static environments For instance, the system keeps collecting evidence to diagnose the cause of a fault in a system (e.g., a car). The environment (values of the evidence, the true cause) does not change as I gather new evidence What does change? So far we have only studied probabilistically models (Bnets) of static world what changes is my belief over the possible causes. The system’s beliefs over possible causes

Modeling Evolving Environments Often we need to make inferences about evolving environments. Represent the state of the world at each specific point in time via a series of snapshots, or time slices, Knows-Subtraction t-1 Morale t-1 Morale t SolveProblem t-1 SolveProblemt Knows-Subtraction t DBN are an extension of Bayesian networks devised for reasoning under uncertainty in dynamic environments This assumes discrete time; step size depends on problem Notation: Xa:b = Xa , Xa+1,…, Xb-1 , Xb Tutoring system tracing student knowledge and morale 7

Temporal Probabilistic Models Start Markov Models Lecture Overview Recap Temporal Probabilistic Models Start Markov Models Markov Chain Markov Chains in Natural Language Processing CPSC 322, Lecture 30

Simplest Possible DBN One random variable for each time slice: let’s assume St represents the state at time t. with domain {v1 …vn } Each random variable depends only on the previous one Thus Intuitively St conveys all of the information about the history that can affect the future states. “The future is independent of the past given the present.” P (St+1| S0,…,St) = P (St+1|S0) CPSC 322, Lecture 30

Simplest Possible DBN (cont’) How many CPTs do we need to specify? A. 1 C . 2 D. 3 B. 4 Stationary process assumption: the mechanism that regulates how state variables change overtime is stationary, that is it can be described by a single transition model P(St|St-1) 10

Stationary Markov Chain (SMC) A stationary Markov Chain : for all t >0 P (St+1| S0,…,St) = P (St+1|St) and P (St +1|St) is the same We only need to specify and Simple Model, easy to specify Often the natural model The network can extend indefinitely Variations of SMC are at the core of most Natural Language Processing (NLP) applications! 11

Stationary Markov Chain (SMC) A stationary Markov Chain : for all t >0 P (St+1| S0,…,St) = P (St+1|St) and P (St +1|St) is the same So we only need to specify? A. P (St +1 |St) and P (S0) B. P (S0) C . P (St +1|St) D. P (St |St+1 ) 12

Stationary Markov-Chain: Example q .6 .4 p a h e Domain of variable Si is {t , q, p, a, h, e} Probability of initial state P (S0) Stochastic Transition Matrix P (St+1|St) Which of these two is a possible STM? t q p 1 .3 a h e .2 t q p .3 .4 .6 1 a h e A.Left one only B. Right one only C . Both D. None

Stationary Markov-Chain: Example Domain of variable Si is {t , q, p, a, h, e} We only need to specify… t q .6 .4 p a h e P (S0) Probability of initial state Stochastic Transition Matrix t q p .3 .4 .6 1 a h e P (St+1|St) CPSC 322, Lecture 30

Markov-Chain: Inference Probability of a sequence of states S0 … ST P (St+1|St) t q p .3 .4 .6 1 a h e P (S0) t q .6 .4 p a h e Example: CPSC 322, Lecture 30

Temporal Probabilistic Models Markov Models Lecture Overview Recap Temporal Probabilistic Models Markov Models Markov Chain Markov Chains in Natural Language Processing CPSC 322, Lecture 30

Key problems in NLP “Book me a room near UBC” Impossible to estimate  Assign a probability to a sentence Part-of-speech tagging Word-sense disambiguation, Probabilistic Parsing Predict the next word Speech recognition Hand-writing recognition Augmentative communication for the disabled Summarization, Machine Translation…..... Room in a bldg. Room space Room scope / opportunity He is rooming with my friend Impossible to estimate  11/24/2018 CPSC503 Winter 2008

Impossible to estimate! Assuming 105 words and average sentence contains 10 words ……. Google language repository (22 Sept. 2006) contained “only”: 95,119,665,584 sentences Most sentences/sequences will not appear or appear only once  At least your corpus should be >> than your sample space Most sentences will not appear or appear only once  11/24/2018 CPSC503 Winter 2008

What can we do? Make a strong simplifying assumption! Sentences are generated by a Markov Chain P(The big red dog barks)= P(The|<S>) * Most sentences/sequences will not appear or appear only once  Standard Solution: decompose in a set of probabilities that are easier to estimate So the probability of a sequence is 11/24/2018 CPSC503 Winter 2008

Estimates for Bigrams Silly language repositories with only two sentences: “<S>The big red dog barks against the big pink dog” “<S>The big pink dog is much smaller” N-pairs in a corpus is equal to the N-words in the corpus 11/24/2018 CPSC503 Winter 2008

Bigrams in practice… If you have 105 words in your dictionary will contain this many numbers…. ?? A.2 *105 B. 1010 C. 5 * 105 D.2 *1010 N-pairs in a corpus is equal to the N-words in the corpus

Learning Goals for today’s class You can: Specify a Markov Chain and compute the probability of a sequence of states Justify and apply Markov Chains to compute the probability of a Natural Language sentence CPSC 322, Lecture 4

Markov Models Simplest Possible Dynamic Bnet Markov Chains We cannot observe directly what we care about Hidden Markov Model Add Actions and Values (Rewards) Markov Decision Processes (MDPs) CPSC 322, Lecture 30

Next Class Course Elements Office Hours today 2-3 => 3-4 Finish Probability and Time: Hidden Markov Models (HMM) (TextBook 6.5.2) Start Decision networks (TextBook chpt 9) Course Elements Assignment 4 is available on Connect Due on Dec the 2nd . Office Hours today 2-3 => 3-4 11/24/2018 CPSC322 Winter 2012