0% found this document useful (0 votes)
20 views

Hidden Markov Model

Uploaded by

mohanmanidharb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Hidden Markov Model

Uploaded by

mohanmanidharb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 35

Presented By : -

Atul kumar Singh


Rohit Kumar Verma
Deepak Baidya
CONTENTS

• Introduction
• Markov Model
• Hidden Markov model (HMM)
o Key components of hmm
• HMM Algorithms
•Applications of hmm Algorithm
• Advantages and disadvantages of hmm
•possible improvements
• Future direction
HİDDEN MARKOV
MODELS
MARKOV MODEL

A Markov model is a statistical model that transitions


from one state to another within a system. It assumes
that the future state depends only on the current state .
Examples: Weather predictions, stock market analysis.
HIDDEN MARKOV MODEL

• A Hidden Markov Model (HMM) is an extension of the Markov


model where the system being modeled is assumed to be a
Markov process with unobservable states. HMM introduces
'hidden' states (actual condition of the system) and 'observed'
states (what we can measure).
• Applications : Speech recognition, biological sequence
analysis, handwriting recognition.
KEY COMPONENTS OF
HMM:

1. States
2. Transition Probabilities
3. Emission Probabilities
4. INITIAL STATE DISTRIBUTION
STATES IN
HMM

• Hidden states : Internal states of the system that aren’t directly


observable.
• Observed states : Outputs that can be seen or measured.
• Example : In speech recognition, the hidden states could be
phonemes, while the observed states are sound signals
TRANSITION PROBABILITY MATRIX
• This matrix defines the probability of moving from one
hidden state to another. Each row corresponds to a
current state, and each column corresponds to a possible
next state.
• Example: Weather transitions (Sunny → Rainy) with
specific probabilities.
EMISSION PROBABILITY
MATRIX
• Defines the probability of an observed output being generated
from a hidden state.
• Example: In a speech recognition HMM, the probability of a
sound being produced by a certain phoneme.
INITIAL STATE
DISTRIBUTION

• This is the probability distribution that specifies the likelihood of


starting in each possible hidden state. Usually denoted as π.
• Example: The probability that a day starts sunny (initial condition).
MATHEMATICAL
REPRESENTATION
1. Transition Probabilities (A): The probability of moving from one hidden
state to another.
A = P(st∣​ st−1​)

2. Emission Probabilities (B): The probability of observing a certain output


given the hidden state.
B=P(ot∣​ st​)

3. Initial Probabilities (π): The probability of starting in a particular state.


π= P(s1)
Start of the Day
0.2
0.4 0.4

0.2 Sunny
Rainy
Cloudy
0.2
0.4

Future Day

Cloudy Sunny Rainy


Cloudy 0.5 0.2 0.3
Present Day
Sunny 0.4 0.4 0.2
Rainy 0.3 0.2 0.5
Cloudy Sunny Cloudy Rainy
(Event 1) (Event 2) (Event 3) (Event 4)

Future Day

P (E2 | E1)
Cloudy Sunny Rainy
Cloudy 0.5 0.2 0.3
Present Day
P (Sunny | Cloudy) Sunny 0.4 0.4 0.2
Rainy 0.3 0.2 0.5

(Probability of Sunny will happened after the cloudy


already happened)

Cloudy - > Sunny = (0.2)


Cloudy Sunny Cloudy Rainy
(Event 1) (Event 2) (Event 3) (Event 4)

Cloudy Sunny Rainy


P (E1,E2, E3, E4 )
Cloudy 0.5 0.2 0.3
Sunny 0.4 0.4 0.2
Rainy 0.3 0.2 0.5
P (init Prob. Of E1) * P(E2 | E1) * P(E3 | E2) * P(E4 | E3)

Cloudy Sunny Rainy


Probability =0.4* 0.2 * 0.4 * 0.3 0.4 0.4 0.2

Probability = 0.0096
(Event 1) (Event 2) (Event 3) (Event 4)

(Cloudy / Sunny /Rainy) (Cloudy / Sunny /Rainy) (Cloudy / Sunny /Rainy) (Cloudy / Sunny /Rainy)

1. Cloudy - > Sunny -> Rainy -> Cloudy =P1


2. Cloudy -> Rainy -> Cloudy -> Sunny =P2
.
.
.
.
.

81. Sunny -> cloudy -> Rainy -> Rainy = P 81


Start of the Day
0.2
0.4 0.4

0.2 Sunny
Rainy
Cloudy
0.2
0.4
Initial Probability Matrix
Initial Probability Cloudy Sunny Rainy
0.4 0.4 0.2

Transition Probability Matrix

Cloudy Sunny Rainy


Cloudy 0.5 0.2 0.3
Hidden States
Sunny 0.4 0.4 0.2
Rainy 0.3 0.2 0.5

Emission Probability Matrix


Umbrella Normal Raincoat
Observable States Cloudy 0.7 0.2 0.1
Sunny 0.3 0.6 0.1
Rainy 0.5 0.1 0.4
FORWARD ALGORITHM

• The forward algorithm is used to compute the probability of observing


a sequence of data given the model . The forward variable represents
the probability of observing the partial sequence and being in state at
time .
• Forward Algorithm Equation:

• Where: a(i) is the forward probability at time t in state i.


• A(ji) is the transition probability from state j.
• B(O) is the emission probability of observation given state .
BACKWARD ALGORITHM

• The backward algorithm is used to calculate the probability of the


ending part of an observation sequence from time onwards, given the
model. It works similarly to the forward algorithm, but instead of
starting from the initial state, it starts from the final state and moves
backward in time.
• Backward Algorithm Equation:

• B(i) the probability of the sequence from time t+1 to the end, given that the
system is in state i at time t .
• A(ij) is the transition probability from state i to state j .
• B(O) is the probability of observing O(t+1) from state J.
VITERBI ALGORITHM
• The Viterbi algorithm is a dynamic programming algorithm used to find
the most likely sequence of hidden states (called the Viterbi path) that
results in a given sequence of observations. It is commonly used in
applications such as speech recognition, decoding in communication
systems, and bioinformatics for sequence alignment.
• Viterbi Algorithm Equation: The algorithm computes the most probable
hidden state sequence by using the recursive relationship

• Where: δ is the highest probability of the most likely sequence of hidden


states ending in state at time .
• A(ji) is the transition probability from state to state .
• B(O) is the emission probability of observation given state.
The Algorithm Involves Three Main Steps:
1. Initialization : Set up the initial probabilities for the first
observation.

2.Recursion : Compute the most probable state for each subsequent


observation.

3.Termination : Identify the most probable final state and backtrack


to get the full hidden state sequence.

Example: In speech recognition, the Viterbi algorithm can be used to find


the most likely sequence of phonemes (hidden states) that correspond to
a given audio signal (observation sequence).
APPLICATIONS OF HMM

HMMs have widespread applications in various fields, particularly


where the data can be modeled as a sequence of observations that
are generated by some hidden processes.
KEY APPLICATIONS

 Speech Recognition : In speech recognition systems, HMMs


are used to model the sequential nature of spoken language. The
hidden states represent phonemes (the basic units of sound), while the
observations are acoustic signals.
 Finance : HMMs are used to model the behavior of stock prices,
interest rates, and other financial time series. The hidden states could
represent different market conditions (bull market, bear market, etc.),
and the observations are the actual market data.
Machine Translation : HMMs are used in some machine
translation systems to model the alignment between words in the
source language and the target language.
ADVANTAGES AND
DISADVANTAGES OF
HMM
Advantages:
1. Simplicity : HMMs provide a simple and interpretable
probabilistic framework for modeling sequential data. They are relatively
easy to implement and train.
2. Flexibility : HMMs can model both discrete and continuous
observations, making them applicable to a wide range of problems.
3. Efficiency : HMMs use efficient dynamic programming algorithms
(like the forward-backward and Viterbi algorithms) to compute
probabilities and find the most likely hidden state sequences.
ADVANTAGES AND
DISADVANTAGES OF
HMM
Disadvantages:
1. Assumption of Independence : HMMs assume that the
observations are conditionally independent given the hidden states. This
assumption is often too simplistic for real-world problems where the
observations might depend on each other.
2. Limited Memory : HMMs assume that the current hidden state
depends only on the previous hidden state (first-order Markov
assumption). This can be problematic for problems where longer-range
dependencies exist.
3. Difficulty in Training : Training HMMs can be computationally
expensive, especially when the number of hidden states is large or the
observation sequences are long. The expectation-maximization (EM)
algorithm used in training (such as the Baum-Welch algorithm) can
sometimes get stuck in local optima.
POSSIBLE
IMPROVEMENTS TO
HMM
Researchers have proposed various modifications and extensions to
traditional HMMs to address their limitations:
1. Higher-order HMMs : These models take into account more
than just the previous state when determining the next state. For
example, in a second-order HMM, the next state depends on both the
current state and the previous state.
2. Continuous HMMs : In standard HMMs, observations are
discrete. In continuous HMMs, observations are modeled using
probability density functions, such as Gaussian distributions. These
models are more suitable for real-valued data (e.g., acoustic signals in
speech recognition).
POSSIBLE
IMPROVEMENTS TO
HMM
 3. Hidden Semi-Markov Models (HSMMs) : These models
allow for variable-length state durations, which is useful for
applications where the amount of time spent in each state varies
significantly. For example, in speech recognition, some phonemes are
spoken more slowly than others.
 4. Incorporating Deep Learning : Recent advancements have
combined HMMs with deep neural networks (DNNs) to improve their
representational power. For example, hybrid HMM-DNN models are
used in state-of-the-art speech recognition systems.
FUTURE DIRECTIONS IN
HMM
The future of HMM research lies in developing more powerful models
that can handle complex real-world data and leverage modern
computational techniques:
1. Hybrid Models : Combining HMMs with deep learning
techniques such as recurrent neural networks (RNNs) and long short-term
memory (LSTM) networks could create more expressive models capable
of handling longer-range dependencies.
2. Dynamic HMMs : Time-varying HMMs, where the transition
and emission probabilities change over time, could offer more flexibility
in modeling complex systems such as financial markets or evolving
language in speech recognition.
FUTURE DIRECTIONS IN
HMM
 3. Real-time HMMs : As the demand for real-time applications
increases, developing more efficient algorithms for HMM inference and
training will be crucial for applications like real-time speech processing
and autonomous vehicles.
 4. Scalability : Scaling HMMs to handle very large datasets, possibly
using distributed or cloud-based systems, will enable their application
to big data problems in fields like bioinformatics and video analysis.
THANK YOU!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy