CS621: Artificial Intelligence

Slides:



Advertisements
Similar presentations
CS344 : Introduction to Artificial Intelligence
Advertisements

CS626: NLP, Speech and the Web
Hidden Markov Models (HMM) Rabiner’s Paper
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 10– Club and Circuit Examples.
Large Vocabulary Unconstrained Handwriting Recognition J Subrahmonia Pen Technologies IBM T J Watson Research Center.
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture– 4, 5, 6: A* properties 9 th,10 th and 12 th January,
Hidden Markov Models Fundamentals and applications to bioinformatics.
Lecture 15 Hidden Markov Models Dr. Jianjun Hu mleg.cse.sc.edu/edu/csce833 CSCE833 Machine Learning University of South Carolina Department of Computer.
Pattern Classification All materials in these slides were taken from Pattern Classification (2nd ed) by R. O. Duda, P. E. Hart and D. G. Stork, John Wiley.
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 13– Search.
1.7 Arrays academy.zariba.com 1. Lecture Content 1.Basic Operations with Arrays 2.Console Input & Output of Arrays 3.Iterating Over Arrays 4.List 5.Cloning.
Combined Lecture CS621: Artificial Intelligence (lecture 25) CS626/449: Speech-NLP-Web/Topics-in- AI (lecture 26) Pushpak Bhattacharyya Computer Science.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 21- Forward Probabilities and Robotic Action Sequences.
Fundamentals of Hidden Markov Model Mehmet Yunus Dönmez.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 5: Monotonicity 13 th Jan, 2011.
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 3 (10/01/06) Prof. Pushpak Bhattacharyya IIT Bombay Statistical Formulation.
CS : Speech, NLP and the Web/Topics in AI Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture-17: Probabilistic parsing; inside- outside probabilities.
CS344: Introduction to Artificial Intelligence (associated lab: CS386)
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 35–HMM; Forward and Backward Probabilities 19 th Oct, 2010.
CS460/626 : Natural Language Processing/Speech, NLP and the Web (Lecture 26– Recap HMM; Probabilistic Parsing cntd) Pushpak Bhattacharyya CSE Dept., IIT.
CS621: Artificial Intelligence
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 3 - Search.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 5: Power of Heuristic; non- conventional search.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 13– Search 17 th August, 2010.
CS621 : Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 3 - Search.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 33,34– HMM, Viterbi, 14 th Oct, 18 th Oct, 2010.
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 17– Theorems in A* (admissibility, Better performance.
CS621: Artificial Intelligence Pushpak Bhattacharyya Computer Science and Engineering Department IIT Bombay Lecture 19: Hidden Markov Models.
CS : NLP, Speech and Web-Topics-in-AI Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 38-39: Baum Welch Algorithm; HMM training.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lectures 18, 19, 20– A* Monotonicity 2 nd, 6 th and 7 th September, 2010.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 23- Forward probability and Robot Plan; start of plan.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 6-7: Hidden Markov Model 18.
Definition of the Hidden Markov Model A Seminar Speech Recognition presentation A Seminar Speech Recognition presentation October 24 th 2002 Pieter Bas.
Prof. Pushpak Bhattacharyya, IIT Bombay1 CS 621 Artificial Intelligence Lecture 12 – 30/08/05 Prof. Pushpak Bhattacharyya Fundamentals of Information.
CS621: Artificial Intelligence
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 3: Search, A*
CS : Speech, NLP and the Web/Topics in AI Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 11: Evidence for Deeper Structure; Top Down Parsing.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 4- Logic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–6: Propositional calculus, Semantic Tableau, formal System 2 nd August,
Lecture 16, CS5671 Hidden Markov Models (“Carnivals with High Walls”) States (“Stalls”) Emission probabilities (“Odds”) Transitions (“Routes”) Sequences.
CS621 : Artificial Intelligence
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 5- Deduction Theorem.
CS344: Introduction to Artificial Intelligence (associated lab: CS386)
Pushpak Bhattacharyya CSE Dept., IIT Bombay
Combined Lecture CS621: Artificial Intelligence (lecture 19) CS626/449: Speech-NLP-Web/Topics-in-AI (lecture 20) Hidden Markov Models Pushpak Bhattacharyya.
CS : Speech, NLP and the Web/Topics in AI
CS344 : Introduction to Artificial Intelligence
CS : Speech, NLP and the Web/Topics in AI
CS621: Artificial Intelligence
Artificial Intelligence
CS344 : Introduction to Artificial Intelligence
Hidden Markov Model LR Rabiner
CS621: Artificial Intelligence
Artificial Intelligence
CS344 : Introduction to Artificial Intelligence
CS621: Artificial Intelligence
CS344 : Introduction to Artificial Intelligence
CS621: Artificial Intelligence
CS621: Artificial Intelligence
Algorithms of POS Tagging
Artificial Intelligence
CS621: Artificial Intelligence
CS : NLP, Speech and Web-Topics-in-AI
Hidden Markov Models By Manish Shrivastava.
CS621 : Artificial Intelligence
CS621: Artificial Intelligence
CSCI 5582 Artificial Intelligence
Prof. Pushpak Bhattacharyya, IIT Bombay
CS 621 Artificial Intelligence Lecture /09/05 Prof
CS621: Artificial Intelligence Lecture 18: Feedforward network contd
Presentation transcript:

CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 32-33: HMM and Viterbi (combined AI and NLP class)

Working with an Example S1 S2 (a2:0.2) (a1:0.2) (a2:0.2) (a2:0.3) The question here is: “what is the most likely state sequence given the output sequence seen”

Developing the tree € a1 a2 Start 1.0 0.0 S1 S2 0.1 0.3 0.2 0.3 S1 . 1*0.1=0.1 0.3 0.0 0.0 0.2 0.2 0.4 0.3 a2 . . S1 S2 S1 S2 0.1*0.2=0.02 0.1*0.4=0.04 0.3*0.3=0.09 0.3*0.2=0.06 Choose the winning sequence per state per iteration

Tree structure contd… a1 a2 0.09 0.06 S1 S2 a1 0.1 0.3 0.2 0.3 S1 S2 . S1 . S2 0.09*0.1=0.009 0.027 0.012 0.018 0.3 0.2 0.2 0.4 a2 S1 S2 S1 S2 . 0.0081 0.0054 0.0024 0.0048 The problem being addressed by this tree is a1-a2-a1-a2 is the output sequence and μ the model or the machine

Problem statement: Find the best possible sequence Path found: (working backward) a1 a2 a1 a2 Problem statement: Find the best possible sequence Start symbol State collection Alphabet set Transitions T is defined as

Tabular representation of the tree € a1 a2 S1 1.0 (1.0*0.1,0.0*0.2)=(0.1,0.0) (0.02, 0.09) (0.009, 0.012) (0.0024, 0.0081) S2 0.0 (1.0*0.3,0.0*0.3)=(0.3,0.0) (0.04,0.06) (0.027,0.018) (0.0048,0.0054) Latest symbol observed Ending state Note: Every cell records the winning probability ending in that state Final winner The bold faced values in each cell shows the sequence probability ending in that state. Going backward from final winner sequence which ends in state S2 (indicated By the 2nd tuple), we recover the sequence.

Algorithm (following James Alan, Natural Language Understanding (2nd edition), Benjamin Cummins (pub.), 1995 Given: The HMM, which means: Start State: S1 Alphabet: A = {a1, a2, … ap} Set of States: S = {S1, S2, … Sn} Transition probability which is equal to The output string a1a2…aT To find: The most likely sequence of states C1C2…CT which produces the given output sequence, i.e., C1C2…CT =

Algorithm contd… Data Structure: A N*T array called SEQSCORE to maintain the winner sequence always (N=#states, T=length of o/p sequence) Another N*T array called BACKPTR to recover the path. Three distinct steps in the Viterbi implementation Initialization Iteration Sequence Identification

Initialization Iteration SEQSCORE(1,1)=1.0 BACKPTR(1,1)=0 For(i=2 to N) do SEQSCORE(i,1)=0.0 [expressing the fact that first state is S1] Iteration For(t=2 to T) do For(i=1 to N) do SEQSCORE(i,t) = Max(j=1,N) BACKPTR(I,t) = index j that gives the MAX above

Seq. Identification C(T) = i that maximizes SEQSCORE(i,T) For i from (T-1) to 1 do C(i) = BACKPTR[C(i+1),(i+1)] Optimizations possible: BACKPTR can be 1*T SEQSCORE can be T*2 Homework:- Compare this with A*, Beam Search [Homework] Reason for this comparison: Both of them work for finding and recovering sequence