HIDDEN MARKOV Stanley Chang MODEL OPLAB Agenda Introduction
HIDDEN MARKOV Stanley Chang MODEL OPLAB
Agenda � Introduction �Hidden Markov Model (HMM) �Markov Process � Hidden Markov Model � Applications of Hidden Markov Model 2020/11/24 OPLAB 2
Introduction 2020/11/24 OPLAB 3
Hidden Markov Model (intro. ) A statistical model � First described in a series of statistical papers by Leonard E. Baum and other authors in 1960 s � The system being modeled is assumed to be a Markov process with unknown parameters � The challenge is to determine the hidden parameters from the observable parameters � 2020/11/24 OPLAB 4
Markov Process � An Example: Stock Market Index 0. 2 0. 6 0. 3 Bull Bear 0. 5 up down 0. 2 0. 4 0. 1 0. 2 Even 0. 5 2020/11/24 OPLAB unchanged 5
Markov Process (cont. ) � Three states: �Bull, Bear and Even � Three index observations: �Up, Down and Unchanged � The model is a Finite State Machine �With probabilistic transitions between states � Up-Down → Bull-Bear �the probability of the sequence is simply the product of the transitions, 0. 2 × 0. 3 2020/11/24 OPLAB 6
Markov Process (cont. ) � Formal Definition: �A random process: ○ state at time t is X(t), for t > 0 ○ history of states is given by x(s) for times s < t is a Markov process if: �Future state is independent of its past states 2020/11/24 OPLAB 7
Hidden Markov Model 2020/11/24 OPLAB 8
Hidden Markov Model Example � Extend previous model into HMM: 0. 2 0. 6 0. 3 up down 0. 7 0. 1 0. 2 Bull 0. 1 Bear 0. 6 0. 3 0. 5 unchanged up down unchanged 0. 2 0. 4 0. 1 0. 2 Even 0. 5 0. 3 0. 4 up down unchanged 2020/11/24 OPLAB 9
Hidden Markov Model Example (cont. ) � Same 2020/11/24 model: Bull Bear Even up down unchanged OPLAB 10
Hidden Markov Model Example (cont. ) � Key difference: �if we have the observation sequence up-down… �we cannot say exactly what state sequence produced these observations �thus the state sequence is ‘hidden’ 2020/11/24 OPLAB 11
Hidden Markov Model � General architecture: �x(t) is the hidden state at time t �random variable y(t) is the observation at time t …… 2020/11/24 x(t-1) x(t+1) y(t-1) y(t+1) OPLAB …… 12
Hidden Markov Model (cont. ) � the value of the hidden variable x(t) only depends on the value of the hidden variable x(t − 1) �The values at time t − 2 and before have no influence the value of the observed variable y(t) only depends on the value of the hidden variable x(t) Markov property 2020/11/24 OPLAB 13
Hidden Markov Model (cont. ) � Formal definition: λ = (A, B, π) �State set: S = (s 1, s 2, · · · , s. N) �Observation set: V = (v 1, v 2, · · · , v. M) �Define Q to be a fixed state sequence of length T, and corresponding observations O ○ Q = q 1, q 2, · · · , q T ○ O = o 1, o 2, · · · , o T 2020/11/24 OPLAB 14
Hidden Markov Model (cont. ) � Transition array A, storing the probability of state j following state i �A = [aij ] , aij = P(qt = sj | qt− 1 = si) � Observation array B, storing the probability of observation k being produced from the state j �B = [bi(k)] , bi(k) = P(xt = vk | qt = si) � Initial probability array π �π = [πi] , πi = P(q 1 = si) 2020/11/24 OPLAB 15
Hidden Markov Model (cont. ) Two assumptions are made by the model: � Markov assumption: �the current state is dependent only on the previous state �P(qt | q 1 t-1) = P(qt | qt-1) � independence assumption: �the output observation at time t is dependent only on the current state, it is independent of previous observations and states �P(ot | o 1 t-1, q 1 t) = P(ot | qt) 2020/11/24 OPLAB 16
Variation of HMM Problem -1 Given: parameters of the model � Compute: � � probability of a particular output sequence � probabilities of the hidden state values given that output sequence � Solved by the forward-backward algorithm 2020/11/24 OPLAB 17
Variation of HMM Problem 2 � Given: parameters of the model � Find: the most likely sequence of hidden states that could have generated a given output sequence � Solved by the Viterbi algorithm 2020/11/24 OPLAB 18
Variation of HMM Problem 3 � Given: output sequence (or a set of such sequences) � Find: the most likely set of state transition and output probabilities � Given a dataset of sequences, discover the parameters of the HMM � solved by the Baum-Welch algorithm 2020/11/24 OPLAB 19
Applications of Hidden Markov Model 2020/11/24 OPLAB 20
Applications of HMM Speech recognition (1970 s) � Cryptanalysis � Machine translation � Partial discharge � Gene prediction � 行動通訊中節點移動的樣式 � 網路攻擊模式 � 殭屍網路流量行為之早期偵測 � …… � 2020/11/24 OPLAB 21
THANKS FOR YOUR LISTENING! OPLAB
- Slides: 22