Hidden Markov Models Adapted from Dr Catherine Sweeney-Reed’s slides.

Slides:



Advertisements
Similar presentations
Hidden Markov Models (HMM) Rabiner’s Paper
Advertisements

Angelo Dalli Department of Intelligent Computing Systems
Hidden Markov Models. A Hidden Markov Model consists of 1.A sequence of states {X t |t  T } = {X 1, X 2,..., X T }, and 2.A sequence of observations.
Introduction to Hidden Markov Models
Hidden Markov Models Eine Einführung.
Hidden Markov Models Bonnie Dorr Christof Monz CMSC 723: Introduction to Computational Linguistics Lecture 5 October 6, 2004.
2004/11/161 A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition LAWRENCE R. RABINER, FELLOW, IEEE Presented by: Chi-Chun.
Page 1 Hidden Markov Models for Automatic Speech Recognition Dr. Mike Johnson Marquette University, EECE Dept.
An Introduction to Hidden Markov Models and Gesture Recognition Troy L. McDaniel Research Assistant Center for Cognitive Ubiquitous Computing Arizona State.
Ch 9. Markov Models 고려대학교 자연어처리연구실 한 경 수
Statistical NLP: Lecture 11
Ch-9: Markov Models Prepared by Qaiser Abbas ( )
Hidden Markov Models Theory By Johan Walters (SR 2003)
Statistical NLP: Hidden Markov Models Updated 8/12/2005.
1 Hidden Markov Models (HMMs) Probabilistic Automata Ubiquitous in Speech/Speaker Recognition/Verification Suitable for modelling phenomena which are dynamic.
Hidden Markov Models Fundamentals and applications to bioinformatics.
Hidden Markov Models in NLP
Lecture 15 Hidden Markov Models Dr. Jianjun Hu mleg.cse.sc.edu/edu/csce833 CSCE833 Machine Learning University of South Carolina Department of Computer.
Apaydin slides with a several modifications and additions by Christoph Eick.
INTRODUCTION TO Machine Learning 3rd Edition
Part II. Statistical NLP Advanced Artificial Intelligence (Hidden) Markov Models Wolfram Burgard, Luc De Raedt, Bernhard Nebel, Lars Schmidt-Thieme Most.
… Hidden Markov Models Markov assumption: Transition model:
ETHEM ALPAYDIN © The MIT Press, Lecture Slides for.
Hidden Markov Model 11/28/07. Bayes Rule The posterior distribution Select k with the largest posterior distribution. Minimizes the average misclassification.
Hidden Markov Models Pairwise Alignments. Hidden Markov Models Finite state automata with multiple states as a convenient description of complex dynamic.
Ch 13. Sequential Data (1/2) Pattern Recognition and Machine Learning, C. M. Bishop, Summarized by Kim Jin-young Biointelligence Laboratory, Seoul.
Hidden Markov Models I Biology 162 Computational Genetics Todd Vision 14 Sep 2004.
Part 4 b Forward-Backward Algorithm & Viterbi Algorithm CSE717, SPRING 2008 CUBS, Univ at Buffalo.
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.
Hidden Markov Models K 1 … 2. Outline Hidden Markov Models – Formalism The Three Basic Problems of HMMs Solutions Applications of HMMs for Automatic Speech.
1 Hidden Markov Model Instructor : Saeed Shiry  CHAPTER 13 ETHEM ALPAYDIN © The MIT Press, 2004.
. Hidden Markov Models with slides from Lise Getoor, Sebastian Thrun, William Cohen, and Yair Weiss.
Chapter 3 (part 3): Maximum-Likelihood and Bayesian Parameter Estimation Hidden Markov Model: Extension of Markov Chains All materials used in this course.
Hidden Markov Models 戴玉書
Learning HMM parameters Sushmita Roy BMI/CS 576 Oct 21 st, 2014.
INTRODUCTION TO Machine Learning ETHEM ALPAYDIN © The MIT Press, Lecture Slides for.
Visual Recognition Tutorial1 Markov models Hidden Markov models Forward/Backward algorithm Viterbi algorithm Baum-Welch estimation algorithm Hidden.
ETHEM ALPAYDIN © The MIT Press, Lecture Slides for.
Ch10 HMM Model 10.1 Discrete-Time Markov Process 10.2 Hidden Markov Models 10.3 The three Basic Problems for HMMS and the solutions 10.4 Types of HMMS.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 21- Forward Probabilities and Robotic Action Sequences.
THE HIDDEN MARKOV MODEL (HMM)
7-Speech Recognition Speech Recognition Concepts
HMM - Basics.
Fundamentals of Hidden Markov Model Mehmet Yunus Dönmez.
1 HMM - Part 2 Review of the last lecture The EM algorithm Continuous density HMM.
Hidden Markov Models CBB 231 / COMPSCI 261 part 2.
ECE 8443 – Pattern Recognition ECE 8527 – Introduction to Machine Learning and Pattern Recognition Objectives: Reestimation Equations Continuous Distributions.
CHAPTER 8 DISCRIMINATIVE CLASSIFIERS HIDDEN MARKOV MODELS.
1 CS 552/652 Speech Recognition with Hidden Markov Models Winter 2011 Oregon Health & Science University Center for Spoken Language Understanding John-Paul.
Algorithms in Computational Biology11Department of Mathematics & Computer Science Algorithms in Computational Biology Markov Chains and Hidden Markov Model.
1 CSE 552/652 Hidden Markov Models for Speech Recognition Spring, 2006 Oregon Health & Science University OGI School of Science & Engineering John-Paul.
1 Hidden Markov Model Observation : O1,O2,... States in time : q1, q2,... All states : s1, s2,... Si Sj.
ECE 8443 – Pattern Recognition ECE 8527 – Introduction to Machine Learning and Pattern Recognition Objectives: Elements of a Discrete Model Evaluation.
Hidden Markov Models (HMMs) –probabilistic models for learning patterns in sequences (e.g. DNA, speech, weather, cards...) (2 nd order model)
1 Hidden Markov Models Hsin-min Wang References: 1.L. R. Rabiner and B. H. Juang, (1993) Fundamentals of Speech Recognition, Chapter.
Discriminative Training and Machine Learning Approaches Machine Learning Lab, Dept. of CSIE, NCKU Chih-Pin Liao.
1 Hidden Markov Model Observation : O1,O2,... States in time : q1, q2,... All states : s1, s2,..., sN Si Sj.
EEL 6586: AUTOMATIC SPEECH PROCESSING Hidden Markov Model Lecture Mark D. Skowronski Computational Neuro-Engineering Lab University of Florida March 31,
CPSC 7373: Artificial Intelligence Lecture 12: Hidden Markov Models and Filters Jiang Bian, Fall 2012 University of Arkansas at Little Rock.
ECE 8443 – Pattern Recognition ECE 8527 – Introduction to Machine Learning and Pattern Recognition Objectives: Reestimation Equations Continuous Distributions.
Hidden Markov Model Parameter Estimation BMI/CS 576 Colin Dewey Fall 2015.
Hidden Markov Models. A Hidden Markov Model consists of 1.A sequence of states {X t |t  T } = {X 1, X 2,..., X T }, and 2.A sequence of observations.
Definition of the Hidden Markov Model A Seminar Speech Recognition presentation A Seminar Speech Recognition presentation October 24 th 2002 Pieter Bas.
Other Models for Time Series. The Hidden Markov Model (HMM)
Visual Recognition Tutorial1 Markov models Hidden Markov models Forward/Backward algorithm Viterbi algorithm Baum-Welch estimation algorithm Hidden.
Hidden Markov Models HMM Hassanin M. Al-Barhamtoshy
Hidden Markov Models - Training
Hidden Markov Models Part 2: Algorithms
Hassanin M. Al-Barhamtoshy
Introduction to HMM (cont)
Presentation transcript:

Hidden Markov Models Adapted from Dr Catherine Sweeney-Reed’s slides

Summary Introduction Description Central problems in HMM modelling Extensions Demonstration

Specification of an HMM N - number of states  Q = {q 1 ; q 2 ; : : : ;q T } - set of states M - the number of symbols (observables)  O = {o 1 ; o 2 ; : : : ;o T } - set of symbols Description

Specification of an HMM A - the state transition probability matrix  aij = P(q t+1 = j|q t = i) B- observation probability distribution  b j (k) = P(o t = k|q t = j) i ≤ k ≤ M π - the initial state distribution Description

Specification of an HMM Full HMM is thus specified as a triplet:  λ = (A,B,π) Description

Central problems in HMM modelling Problem 1 Evaluation:  Probability of occurrence of a particular observation sequence, O = {o 1,…,o k }, given the model  P(O|λ)  Complicated – hidden states  Useful in sequence classification Central problems

Central problems in HMM modelling Problem 2 Decoding:  Optimal state sequence to produce given observations, O = {o 1,…,o k }, given model  Optimality criterion  Useful in recognition problems Central problems

Central problems in HMM modelling Problem 3 Learning:  Determine optimum model, given a training set of observations  Find λ, such that P(O|λ) is maximal Central problems

Problem 1: Naïve solution State sequence Q = (q 1,…q T ) Assume independent observations: Central problems NB Observations are mutually independent, given the hidden states. (Joint distribution of independent variables factorises into marginal distributions of the independent variables.)

Problem 1: Naïve solution Observe that : And that: Central problems

Problem 1: Naïve solution Finally get: Central problems NB: -The above sum is over all state paths -There are N T states paths, each ‘costing’ O(T) calculations, leading to O(TN T ) time complexity.

Problem 1: Efficient solution Define auxiliary forward variable α: Central problems α t (i) is the probability of observing a partial sequence of observables o 1,…o t such that at time t, state q t =i Forward algorithm:

Problem 1: Efficient solution Recursive algorithm:  Initialise:  Calculate:  Obtain: Central problems Complexity is O(N 2 T) (Partial obs seq to t AND state i at t) x (transition to j at t+1) x (sensor) Sum of different ways of getting obs seq Sum, as can reach j from any preceding state  incorporates partial obs seq to t

Problem 1: Alternative solution Define auxiliary forward variable β: Central problems Backward algorithm:  t (i) – the probability of observing a sequence of observables o t+1,…,o T given state q t =i at time t, and

Problem 1: Alternative solution Recursive algorithm:  Initialise:  Calculate:  Terminate: Central problems Complexity is O(N 2 T)

Problem 2: Decoding Choose state sequence to maximise probability of observation sequence Viterbi algorithm - inductive algorithm that keeps the best state sequence at each instance Central problems

Problem 2: Decoding State sequence to maximise P(O,Q| ): Define auxiliary variable δ : Viterbi algorithm: Central problems δ t (i) – the probability of the most probable path ending in state q t =i

Problem 2: Decoding Recurrent property: Algorithm:  1. Initialise: Central problems To get state seq, need to keep track of argument to maximise this, for each t and j. Done via the array ψ t (j).

Problem 2: Decoding  2. Recursion:  3. Terminate: Central problems P* gives the state-optimised probability Q* is the optimal state sequence (Q* = {q1*,q2*,…,qT*})

Problem 2: Decoding  4. Backtrack state sequence: O(N 2 T) time complexity Central problems

Problem 3: Learning Training HMM to encode obs seq such that HMM should identify a similar obs seq in future Find λ=(A,B,π), maximising P(O|λ) General algorithm:  Initialise: λ 0  Compute new model λ, using λ 0 and observed sequence O  Then  Repeat steps 2 and 3 until: Central problems

Problem 3: Learning Let ξ(i,j) be a probability of being in state i at time t and at state j at time t+1, given λ and O seq Central problems Step 1 of Baum-Welch algorithm:

Problem 3: Learning Central problems Operations required for the computation of the joint event that the system is in state Si and time t and State Sj at time t+1

Problem 3: Learning Let be a probability of being in state i at time t, given O - expected no. of transitions from state i - expected no. of transitions Central problems

Problem 3: Learning the expected frequency of state i at time t=1 ratio of expected no. of transitions from state i to j over expected no. of transitions from state i ratio of expected no. of times in state j observing symbol k over expected no. of times in state j Central problems Step 2 of Baum-Welch algorithm:

Problem 3: Learning Baum-Welch algorithm uses the forward and backward algorithms to calculate the auxiliary variables α,β B-W algorithm is a special case of the EM algorithm:  E-step: calculation of  and   M-step: iterative calculation of,, Practical issues:  Can get stuck in local maxima  Numerical problems – log and scaling Central problems

Extensions Problem-specific:  Left to right HMM (speech recognition)  Profile HMM (bioinformatics) Extensions

General machine learning:  Factorial HMM  Coupled HMM  Hierarchical HMM  Input-output HMM  Switching state systems  Hybrid HMM (HMM +NN)  Special case of graphical models Bayesian nets Dynamical Bayesian nets Extensions

Examples Extensions Coupled HMMFactorial HMM

HMMs – Sleep Staging Flexer, Sykacek, Rezek, and Dorffner (2000) Observation sequence: EEG data Fit model to data according to 3 sleep stages to produce continuous probabilities: P(wake), P(deep), and P(REM) Hidden states correspond with recognised sleep stages. 3 continuous probability plots, giving P of each at every second Demonstrations

HMMs – Sleep Staging Probability plots for the 3 stages Staging by HMM Manual scoring of sleep stages Demonstrations

Excel Demonstration of a working HMM implemented in Excel Demonstrations

Further Reading L. R. Rabiner, "A tutorial on Hidden Markov Models and selected applications in speech recognition," Proceedings of the IEEE, vol. 77, pp , R. Dugad and U. B. Desai, "A tutorial on Hidden Markov models," Signal Processing and Artifical Neural Networks Laboratory, Dept of Electrical Engineering, Indian Institute of Technology, Bombay Technical Report No.: SPANN-96.1, W.H. Laverty, M.J. Miket, and I.W. Kelly, “Simulation of Hidden Markov Models with EXCEL”, The Statistician, vol. 51, Part 1, pp , 2002