SlideShare a Scribd company logo
Matlab Simulations of
Markov Models
Yu Meng
Department of Computer Science and Engineering
Southern Methodist University
Outlines
Markov models
/process/chain/property/HMM
Matlab simulations
Applications
Advantages and Limitations
Conclusions.
Markov Process
Markov process is a simple stochastic
process in which the distribution of
future states depends only on the
present state and not on how it arrived
in the present state.
Markov Models
– A finite state representation
Markov Property
Many systems in real world have the
property that given present state, the
past states have no influence on the
future. This property is called Markov
property.
State Space and Time Space
State Space
Time Space
Discrete Continuous
Discrete
(Markov
chain)
X
Continuous
X X
Markov Chain
Let {Xt : t is in T} be a stochastic process with
discrete-state space S and discrete-time space
T satisfying Markov property
P(Xn+1 = j|Xn = i, Xn-1 = in-1, · · ·,X0 = i0)
= P(Xn+1 = j|Xn = i)
for any set of state i0, i1, · · · , in-1, i, j in S and
n ≥ 0 is called a Markov Chain.
Hidden Markov Models (HMM)
In an hidden Markov Model(HMM), we don’t
know the state sequence. However we know
some probabilistic function of it.
In plain English, Markov model can be viewed
as a probabilistic finite state engine. The
state is changing over time. But we have no
way to determine the exact changes of the
state. We are able to observe some fuzzy
reflections of the change. Our objective is to
estimate the states of the machine via the
(possibly fuzzy) observations.
Markov Model example
The weather in Dallas of past 26 days
STATES = { pretty, pretty, pretty, pretty, pretty, pretty, pretty,
pretty, pretty, pretty, rainy, rainy, rainy, rainy, rainy, pretty,
pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty,
pretty, pretty }
Markov Model example
The weather in Dallas of past 26 days
STATES = { pretty, pretty, pretty, pretty, pretty, pretty, pretty,
pretty, pretty, pretty, rainy, rainy, rainy, rainy, rainy, pretty,
pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty,
pretty, pretty }
Tomorrow’s weather
Today’s
Weather
Pretty Rainy
Pretty 0.95 0.05
Rainy 0.2 0.8
Markov Model example (2)
Pretty
Rainy
0.95
0.8
0.05
0.2
Markov Model example (2)
Pretty
Rainy
0.95
0.8
0.05
0.2
Markov Model example(3)
Hidden model.
Many time we don’t have a direct observation of the
change of the states. Therefore we say the model is
hidden. However we are still able to observe an emission
of the state changes, and the emission could be fuzzy.
For example, you are isolated in a closed room during the
experiment. In the room, you have no direct observation
of how weather changes. Everyday, an assistant delivers
meals for you once a day. The only way you have clue of
the weather is to observe the how the guy’s dress
changes.
Markov Model example(4)
In the room, you might observe that your
assistant dresses with regular coat (CT), rain
coat(RN), or brings an umbrella (UM). Your
observation sequence may be
SEQ = {CT, CT , CT , UM, CT , CT , CT , CT , CT , CT
, CT , RN , CT , RN , UM , CT , CT, CT, RN, CT, CT, CT
, CT, CT, CT , CT}
Markov Model example(5)
Regular Coat Rain Coat Umbrella
Pretty 5/6 1/12 1/12
Rainy 1/3 1/3 1/3
Markov Model example(5)
Regular Coat Rain Coat Umbrella
Pretty 5/6 1/12 1/12
Rainy 1/3 1/3 1/3
Mathematical Elements
A set of states over time, denoted by STATES
A set of emissions, or observations over time,
denoted by SEQ
An M-by-M transition matrix TRANS whose
entry(i,j) is the probability of a transition from
state i to state j.
An M-by-N emission matrix EMIS whose i,k
entry gives the probability of emitting symbol
sk given that the model is in state i. EMIS
Outlines
Markov models
/process/chain/property/HMM
Matlab simulations
Applications
Advantages and Limitations
Conclusions.
Why Matlab?
Matlab is a tool for doing numerical
computations with matrices and
vectors. It can also display information
graphically.
Combined with numerous mathematical
libraries, Matlab has become one of the
few tools that can catch up with my
ideas.
Why Matlab?
MATLAB Compiler translates MATLAB code to
ANSI standard C code. With the MATLAB
Compiler, we will be able to automatically
generate optimized C and C++ code. By
translating MATLAB code to C and C++, the
compiler can significantly speed up MATLAB
applications and development.
>> mcc -t -L C myfun1 % yields myfun1.c
mcc -t -L C myfun2 % yields myfun2.c
mcc -W main -L C myfun1 myfun2 libmmfile.mlib
% yields myfun1_main.c
Matlab simulations
Matlab Statistics Toolbox 4.1
(Released in May 2003)
hmmdecode
hmmgenerate
hmmestimate
hmmtrain
hmmviterbi
Matlab simulations
Matlab scripts demo.m in Matlab
6.5 environment
Outlines
Markov models
/process/chain/property/HMM
Matlab simulations
Applications
Advantages and Limitations
Conclusions.
Applications of Markov Models
Speech recognition,
Modeling of coding/noncoding regions in
DNA,
Protein binding sites in DNA,
Protein folding,
Protein superfamilies,
Multiple sequence alignment,
Flood predictions,
Ion channel recordings,
Optical character recognition.
Outlines
Markov models
/process/chain/property/HMM
Matlab simulations
Applications
Advantages and Limitations
Conclusions.
Advantages of Markov Models
MMs and HMMs have proved effective in a number of
domains.
The basic theory of HMMs is very elegant and easy to
understand. This makes it easier to analyse and
implement, with the help of Matlab.
Because MM uses only positive data, their scalability
is very good. Dr. Dunham’s research group is
investigating an incremental extension algorithm of
Markov chain, which fits for dynamic data processing.
It is complementary of other non-linear models such
as neural networks and time-series analysis.
Limitations of Markov Models
It is a data hog.
Markov property.
Conclusions
http://www-
2.cs.cmu.edu/~awm/tutorials/
Any Questions?

More Related Content

PPT
Hidden Markov Models with applications to speech recognition
PPT
Hidden Markov Models with applications to speech recognition
PPTX
Machine learning fundamental concepts in detail
PPTX
PDF
12 Machine Learning Supervised Hidden Markov Chains
PPTX
Hidden markov model
PPTX
6.Hidden Markov Model.pptx
PPTX
6.Hidden Markov Model
Hidden Markov Models with applications to speech recognition
Hidden Markov Models with applications to speech recognition
Machine learning fundamental concepts in detail
12 Machine Learning Supervised Hidden Markov Chains
Hidden markov model
6.Hidden Markov Model.pptx
6.Hidden Markov Model

Similar to meng.ppt (20)

PDF
Probabilistic Models of Time Series and Sequences
PPTX
Hidden markov model
PPT
HMM (Hidden Markov Model)
PPTX
Machine Learning basics and various models.pptx
PPTX
Hidden Markov Model
PPTX
The markovchain package use r2016
PPTX
Markov presentation
PPTX
6 hmm by kannan
PPTX
Markov chain
PPTX
Markov Model chains
PPTX
Lecture 6 - Marcov Chain introduction.pptx
PPTX
Hidden Markov Model presentation project.pptx
PPT
HIDDEN MARKOV MODEL AND ITS APPLICATION
PPTX
Artificial Intelligence_MARKOV MODEL.pptx
PPTX
Presentationhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh1.pptx
PPT
HMM DAY-3.ppt
PDF
Data Science - Part XIII - Hidden Markov Models
PPTX
PPT
Hidden Markov and Graphical Models presentation
PPTX
Stat 2153 Stochastic Process and Markov chain
Probabilistic Models of Time Series and Sequences
Hidden markov model
HMM (Hidden Markov Model)
Machine Learning basics and various models.pptx
Hidden Markov Model
The markovchain package use r2016
Markov presentation
6 hmm by kannan
Markov chain
Markov Model chains
Lecture 6 - Marcov Chain introduction.pptx
Hidden Markov Model presentation project.pptx
HIDDEN MARKOV MODEL AND ITS APPLICATION
Artificial Intelligence_MARKOV MODEL.pptx
Presentationhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh1.pptx
HMM DAY-3.ppt
Data Science - Part XIII - Hidden Markov Models
Hidden Markov and Graphical Models presentation
Stat 2153 Stochastic Process and Markov chain
Ad

More from aozcan1 (15)

PPT
6920161.ppt
PPT
ge6075-unit-2.ppt
PPT
bgp.ppt
PPTX
ELG2911Modul2EthicalPractice.pptx
PPT
estimation.ppt
PPT
Teregowda.ppt
PPT
16223434.ppt
PPT
application-layer.ppt
PPT
ftp.07f.ppt
PPT
lect2a.ppt
PPT
02mathematics.ppt
PPT
01introduction.ppt
PPTX
Angel6E01.pptx
PPTX
Computer_Graphics_chapter-1.pptx
PPT
901350_S01.ppt
6920161.ppt
ge6075-unit-2.ppt
bgp.ppt
ELG2911Modul2EthicalPractice.pptx
estimation.ppt
Teregowda.ppt
16223434.ppt
application-layer.ppt
ftp.07f.ppt
lect2a.ppt
02mathematics.ppt
01introduction.ppt
Angel6E01.pptx
Computer_Graphics_chapter-1.pptx
901350_S01.ppt
Ad

Recently uploaded (20)

PDF
Item # 5 - 5307 Broadway St final review
PDF
Creating Memorable Moments_ Personalized Plant Gifts.pdf
PPTX
Chapter 1: Philippines constitution laws
PDF
Items # 6&7 - 900 Cambridge Oval Right-of-Way
PPTX
Presentatio koos kokos koko ossssn5.pptx
PDF
PPT Item # 5 - 5307 Broadway St (Final Review).pdf
PPT
The Central Civil Services (Leave Travel Concession) Rules, 1988, govern the ...
PDF
eVerify Overview and Detailed Instructions to Set up an account
PDF
Item # 4 -- 328 Albany St. compt. review
PDF
UNEP/ UNEA Plastic Treaty Negotiations Report of Inc 5.2 Geneva
PDF
The Detrimental Impacts of Hydraulic Fracturing for Oil and Gas_ A Researched...
PDF
Population Estimates 2025 Regional Snapshot 08.11.25
PPTX
True Fruits_ reportcccccccccccccccc.pptx
PDF
PPT - Primary Rules of Interpretation (1).pdf
PDF
CXPA Finland Webinar: Rated 5 Stars - Delivering Service That Customers Truly...
PDF
About Karen Miner-Romanoff - Academic & nonprofit consultant
PPTX
dawasoncitcommunityroolingadsAug 11_25.pptx
PPTX
SOMANJAN PRAMANIK_3500032 2042.pptx
PDF
CXPA Finland Webinar - Modern Components of Service Quality - Alec Dalton - ...
PPTX
Neurons.pptx and the family in London are you chatgpt
Item # 5 - 5307 Broadway St final review
Creating Memorable Moments_ Personalized Plant Gifts.pdf
Chapter 1: Philippines constitution laws
Items # 6&7 - 900 Cambridge Oval Right-of-Way
Presentatio koos kokos koko ossssn5.pptx
PPT Item # 5 - 5307 Broadway St (Final Review).pdf
The Central Civil Services (Leave Travel Concession) Rules, 1988, govern the ...
eVerify Overview and Detailed Instructions to Set up an account
Item # 4 -- 328 Albany St. compt. review
UNEP/ UNEA Plastic Treaty Negotiations Report of Inc 5.2 Geneva
The Detrimental Impacts of Hydraulic Fracturing for Oil and Gas_ A Researched...
Population Estimates 2025 Regional Snapshot 08.11.25
True Fruits_ reportcccccccccccccccc.pptx
PPT - Primary Rules of Interpretation (1).pdf
CXPA Finland Webinar: Rated 5 Stars - Delivering Service That Customers Truly...
About Karen Miner-Romanoff - Academic & nonprofit consultant
dawasoncitcommunityroolingadsAug 11_25.pptx
SOMANJAN PRAMANIK_3500032 2042.pptx
CXPA Finland Webinar - Modern Components of Service Quality - Alec Dalton - ...
Neurons.pptx and the family in London are you chatgpt

meng.ppt

  • 1. Matlab Simulations of Markov Models Yu Meng Department of Computer Science and Engineering Southern Methodist University
  • 3. Markov Process Markov process is a simple stochastic process in which the distribution of future states depends only on the present state and not on how it arrived in the present state.
  • 4. Markov Models – A finite state representation
  • 5. Markov Property Many systems in real world have the property that given present state, the past states have no influence on the future. This property is called Markov property.
  • 6. State Space and Time Space State Space Time Space Discrete Continuous Discrete (Markov chain) X Continuous X X
  • 7. Markov Chain Let {Xt : t is in T} be a stochastic process with discrete-state space S and discrete-time space T satisfying Markov property P(Xn+1 = j|Xn = i, Xn-1 = in-1, · · ·,X0 = i0) = P(Xn+1 = j|Xn = i) for any set of state i0, i1, · · · , in-1, i, j in S and n ≥ 0 is called a Markov Chain.
  • 8. Hidden Markov Models (HMM) In an hidden Markov Model(HMM), we don’t know the state sequence. However we know some probabilistic function of it. In plain English, Markov model can be viewed as a probabilistic finite state engine. The state is changing over time. But we have no way to determine the exact changes of the state. We are able to observe some fuzzy reflections of the change. Our objective is to estimate the states of the machine via the (possibly fuzzy) observations.
  • 9. Markov Model example The weather in Dallas of past 26 days STATES = { pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty, rainy, rainy, rainy, rainy, rainy, pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty }
  • 10. Markov Model example The weather in Dallas of past 26 days STATES = { pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty, rainy, rainy, rainy, rainy, rainy, pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty, pretty } Tomorrow’s weather Today’s Weather Pretty Rainy Pretty 0.95 0.05 Rainy 0.2 0.8
  • 11. Markov Model example (2) Pretty Rainy 0.95 0.8 0.05 0.2
  • 12. Markov Model example (2) Pretty Rainy 0.95 0.8 0.05 0.2
  • 13. Markov Model example(3) Hidden model. Many time we don’t have a direct observation of the change of the states. Therefore we say the model is hidden. However we are still able to observe an emission of the state changes, and the emission could be fuzzy. For example, you are isolated in a closed room during the experiment. In the room, you have no direct observation of how weather changes. Everyday, an assistant delivers meals for you once a day. The only way you have clue of the weather is to observe the how the guy’s dress changes.
  • 14. Markov Model example(4) In the room, you might observe that your assistant dresses with regular coat (CT), rain coat(RN), or brings an umbrella (UM). Your observation sequence may be SEQ = {CT, CT , CT , UM, CT , CT , CT , CT , CT , CT , CT , RN , CT , RN , UM , CT , CT, CT, RN, CT, CT, CT , CT, CT, CT , CT}
  • 15. Markov Model example(5) Regular Coat Rain Coat Umbrella Pretty 5/6 1/12 1/12 Rainy 1/3 1/3 1/3
  • 16. Markov Model example(5) Regular Coat Rain Coat Umbrella Pretty 5/6 1/12 1/12 Rainy 1/3 1/3 1/3
  • 17. Mathematical Elements A set of states over time, denoted by STATES A set of emissions, or observations over time, denoted by SEQ An M-by-M transition matrix TRANS whose entry(i,j) is the probability of a transition from state i to state j. An M-by-N emission matrix EMIS whose i,k entry gives the probability of emitting symbol sk given that the model is in state i. EMIS
  • 19. Why Matlab? Matlab is a tool for doing numerical computations with matrices and vectors. It can also display information graphically. Combined with numerous mathematical libraries, Matlab has become one of the few tools that can catch up with my ideas.
  • 20. Why Matlab? MATLAB Compiler translates MATLAB code to ANSI standard C code. With the MATLAB Compiler, we will be able to automatically generate optimized C and C++ code. By translating MATLAB code to C and C++, the compiler can significantly speed up MATLAB applications and development. >> mcc -t -L C myfun1 % yields myfun1.c mcc -t -L C myfun2 % yields myfun2.c mcc -W main -L C myfun1 myfun2 libmmfile.mlib % yields myfun1_main.c
  • 21. Matlab simulations Matlab Statistics Toolbox 4.1 (Released in May 2003) hmmdecode hmmgenerate hmmestimate hmmtrain hmmviterbi
  • 22. Matlab simulations Matlab scripts demo.m in Matlab 6.5 environment
  • 24. Applications of Markov Models Speech recognition, Modeling of coding/noncoding regions in DNA, Protein binding sites in DNA, Protein folding, Protein superfamilies, Multiple sequence alignment, Flood predictions, Ion channel recordings, Optical character recognition.
  • 26. Advantages of Markov Models MMs and HMMs have proved effective in a number of domains. The basic theory of HMMs is very elegant and easy to understand. This makes it easier to analyse and implement, with the help of Matlab. Because MM uses only positive data, their scalability is very good. Dr. Dunham’s research group is investigating an incremental extension algorithm of Markov chain, which fits for dynamic data processing. It is complementary of other non-linear models such as neural networks and time-series analysis.
  • 27. Limitations of Markov Models It is a data hog. Markov property.