{"id":735,"date":"2019-01-09T06:09:06","date_gmt":"2019-01-09T06:09:06","guid":{"rendered":"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=735"},"modified":"2019-01-09T08:14:35","modified_gmt":"2019-01-09T08:14:35","slug":"markov-and-hidden-markov-models","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/chapter\/markov-and-hidden-markov-models\/","title":{"rendered":"Markov and Hidden Markov Models"},"content":{"raw":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/wuGbrguSyAM\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>Learning Objectives:<\/strong>\r\n\r\n&nbsp;\r\n\r\nThe learning objectives of this module are as follows:\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 To understand the concept of Markov Chain\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 To explain Markov Chain with an example\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 To understand the concept of Hidden Markov Model\r\n\r\n&nbsp;\r\n\r\n<strong>34.1 Markov Random Processes<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Until now, we have considered data to be i.i.d (independent and Identically distributed). Now we study sequential data such as time-series like stock market, speech, video analysis and ordered like text, genes, etc. If underlying process is unknown we can construct a model to predict the next state in sequence. In general, product rule expresses joint distribution for sequence<\/p>\r\n&nbsp;\r\n\r\n<img class=\"aligncenter size-full wp-image-739\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-166.png\" alt=\"\" width=\"380\" height=\"41\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">First-order Markov chain is described as each observation being independent of all previous observations except the most recent.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"aligncenter size-full wp-image-740\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-167.png\" alt=\"\" width=\"306\" height=\"50\" \/>\r\n\r\nIn this case the Maximum Likelihood parameter estimates are easy.\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Now we define the Markovprocessas 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. A random sequence has the Markov property if its distribution is determined solely by its current state. Any random process having this property is called a Markov random process.For observable state sequences (state is known from data), this leads to a Markov chain model.For non-observable states, this leads to a Hidden Markov Model (HMM).<\/p>\r\n&nbsp;\r\n\r\n<strong>34.1.1 Markov Model<\/strong>\r\n\r\n&nbsp;\r\n\r\nA discrete (finite) system can be described as consisting of:\r\n\r\n&nbsp;\r\n\r\n\u2013\u00a0 N distinct states.\r\n\r\n\u2013\u00a0 Begins (at time t=1) in some initial state(s).\r\n<p style=\"text-align: justify\">\u2013 At each time step (t=1,2,\u2026) the system moves from current to next state (possibly the same as the current state) according to transition probabilities associated with current state.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">This kind of system is called a fi nite, or discrete Markov model. The model has been named after Andrei Andreyevich Markov (1856 -1922).<\/p>\r\n&nbsp;\r\n\r\n<strong>34.1.2 Markov Property<\/strong>\r\n\r\n&nbsp;\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">Now let us discuss a very important property that is known as the Markov property<\/span><strong style=\"text-align: initial;font-size: 1em\">.<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">Markov Property: <\/strong><span style=\"text-align: initial;font-size: 1em\">The state of the system at time <\/span><em style=\"text-align: initial;font-size: 1em\">t<\/em><span style=\"text-align: initial;font-size: 1em\">+1 depends only on the state of the system at time <\/span><em style=\"text-align: initial;font-size: 1em\">t.<\/em><span style=\"text-align: initial;font-size: 1em\"> This property allows us to assume that the state at time <\/span><em style=\"text-align: initial;font-size: 1em\">t<\/em><span style=\"text-align: initial;font-size: 1em\">+1is independent of the states at all times before t (Figure 34.1). This is a simplifying assumption that allows us to compute the states of many sequential problems.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"aligncenter size-full wp-image-741\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-168.png\" alt=\"\" width=\"528\" height=\"81\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.1 Markov Property<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>Stationary Assumption: <\/strong>In general, a process is called stationary if transition probabilities are independent of t, namely (Figure 34.2)<\/p>\r\n<img class=\"aligncenter size-full wp-image-742\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-169.png\" alt=\"\" width=\"522\" height=\"66\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.2 Stationary Property<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">This means that if system is in state i, the probability thatthe system will next move to state j is pij , no matter whatthe value of t is.<\/p>\r\n&nbsp;\r\n\r\n<strong>34.2 Components of the Markov Model<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Markov model is a stochastic processes holding the Markov property. The Markov property is also called as memoryless property.This is because the future is independent of past given present. One step transition probability is the basis.We need the following three basic information to define a Markov model which is essentially a state space model:<\/p>\r\n\r\n<ul>\r\n \t<li>Parameter space.<\/li>\r\n \t<li>Statespace \u2013 where states represent various conditions of the System<\/li>\r\n \t<li>State transition probability -Transitions betweenstates indicateoccurrences of events<\/li>\r\n<\/ul>\r\nNow let us describe the components of the Markov Model in detail:\r\n\r\n&nbsp;\r\n\r\nFirst we have a set of states:\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"aligncenter size-full wp-image-743\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-170.png\" alt=\"\" width=\"211\" height=\"65\" \/>\r\n\r\nIn general the process moves from one state to another generating a sequence of states given as:\r\n\r\n<img class=\"aligncenter size-full wp-image-744\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-171.png\" alt=\"\" width=\"244\" height=\"61\" \/>\r\n\r\nNow according to the Markov chain property, the probability of each subsequent state depends only on what was the previous state:\r\n\r\n<img class=\"aligncenter size-full wp-image-745\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-172.png\" alt=\"\" width=\"494\" height=\"58\" \/>\r\n\r\nTo define Markov model, the following two probabilities have to be specified:\r\n\r\n&nbsp;\r\n\r\n<strong>Transition probability<\/strong>which is the probability of state Sigiven Sjand defined as:\r\n\r\n<img class=\"aligncenter size-full wp-image-746\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-173.png\" alt=\"\" width=\"209\" height=\"62\" \/>\r\n\r\nand<strong>initial probability which the probability of<\/strong> Sibeing an Initial state and given as:\r\n\r\n<img class=\"aligncenter size-full wp-image-747\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-174.png\" alt=\"\" width=\"171\" height=\"59\" \/>\r\n\r\nThe output of the process is the set of states at each instant of time .\r\n\r\n&nbsp;\r\n\r\n<strong>34.3 Markov Model \u2013 Examples<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Now let us consider an example of the Markov Model scenario where we classify weather into three states (Figure 34.3) as State 1: rain or snow, \u2013 State 2: cloudy and State 3: sunny.<\/p>\r\n<img class=\"aligncenter size-full wp-image-748\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-175.png\" alt=\"\" width=\"268\" height=\"83\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.3 Three States of the Weather Example<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">It is given that the weather of some city followed the weather change pattern given in the following table (Figure 34.5):<\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"aligncenter size-full wp-image-749\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-176.png\" alt=\"\" width=\"504\" height=\"193\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.5 Weather Change Pattern<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Here we make a major Markov assumption that tomorrow\u2019s weather depends only on today\u2019s weather. The above information can be represented as a Markov Model which is represented graphically as given in Figure 34.6.<\/p>\r\n<img class=\"aligncenter size-full wp-image-750\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-177.png\" alt=\"\" width=\"327\" height=\"198\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.6 Graphical Representation<\/strong><\/p>\r\n&nbsp;\r\n\r\nHere each state corresponds to one observation and the sum of outgoing edge weights is equal to one.\r\n\r\n&nbsp;\r\n\r\nHere we have the observable states as {1,2,\u2026.,N}\r\n\r\n&nbsp;\r\n\r\nObservable Sequence is q1, q2,\u2026\u2026.., qT. In other words these are the stateswe\r\n\r\n&nbsp;\r\n\r\nwill be observing to make a decision. Because of the 1st order Markov assumptionthe representation is as given in Figure 34.7.\r\n\r\n&nbsp;\r\n\r\n<strong>P(q<\/strong><sub><strong>t<\/strong><\/sub><strong> = j | q<\/strong><sub><strong>t<\/strong> <\/sub><strong>\u22121<\/strong><strong> = i, q<\/strong><sub><strong>t<\/strong><\/sub> <strong>\u22122<\/strong><strong>\u00a0 = k,\u2026) reduces to P(q<\/strong><sub><strong>t<\/strong><\/sub><strong> = j | q<\/strong><sub><strong>t<\/strong><\/sub> <strong>\u22121<\/strong><strong> = i)<\/strong>\r\n\r\n&nbsp;\r\n\r\n<img class=\"aligncenter size-full wp-image-751\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-178.png\" alt=\"\" width=\"481\" height=\"126\" \/>\r\n<p style=\"text-align: center\"><strong style=\"text-align: initial;font-size: 1em\">Figure 34.7 Markov Assumption<\/strong><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\nWe can consider\r\n\r\n<strong>P(q<\/strong><sub><strong>t<\/strong><\/sub><strong> = j | q<\/strong><sub><strong>t<\/strong><\/sub> <strong>\u22121<\/strong><strong> = i) = P(q<\/strong><strong><sub>t<\/sub> +l<\/strong><strong>\u00a0 = j | q<\/strong><strong><sub>t<\/sub> +l<\/strong> <strong>\u22121<\/strong><strong> = i)<\/strong>\r\n\r\nand initial state probability to be\r\n\r\n<strong>\u03c0<\/strong><strong><em>i<\/em><\/strong><strong> = <em>P<\/em> ( <em>q<\/em> <\/strong><strong>1<\/strong>\u00a0<strong>= <em>i<\/em> ),<\/strong>\u00a0\u00a0<strong>1 \u2264 <em>i<\/em> \u2264 <em>N<\/em><\/strong>\r\n\r\n&nbsp;\r\n\r\nNow let us consider Conditional probability <em>P<\/em>(<em> A<\/em>,<em> B<\/em>) =<em> P<\/em>(<em> A <\/em>|<em> B<\/em>)<em>P<\/em>(<em> B<\/em>)\r\n\r\n&nbsp;\r\n\r\nNow the sequence probability of Markov model can be represented as:\r\n\r\n<img class=\"aligncenter size-full wp-image-752\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-179.png\" alt=\"\" width=\"534\" height=\"260\" \/>\r\n\r\n<strong>Markov Model \u2013 Example 1<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Let us consider the following question: What is the probability that the weather for the next 7 days will be \u201csun-sun-rain-rain-sun-cloudy-sun\u201d when today is sunny? (Refer Figure 34.6)<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><em style=\"text-align: initial;font-size: 1em\">S<\/em><sub><span style=\"text-align: initial\">1<\/span><\/sub><span style=\"text-align: initial;font-size: 1em\">: <\/span><em style=\"text-align: initial;font-size: 1em\">rain<\/em><span style=\"text-align: initial;font-size: 1em\">,\u00a0\u00a0<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><sub><span style=\"text-align: initial\">2<\/span><\/sub><span style=\"text-align: initial;font-size: 1em\">: <\/span><em style=\"text-align: initial;font-size: 1em\">cloudy<\/em><span style=\"text-align: initial;font-size: 1em\">,\u00a0<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><sub><span style=\"text-align: initial\">3<\/span><\/sub><span style=\"text-align: initial;font-size: 1em\">: <\/span><em style=\"text-align: initial;font-size: 1em\">sunny<\/em><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">O <\/em><span style=\"text-align: initial;font-size: 1em\">| model) =<\/span><em style=\"text-align: initial;font-size: 1em\"> P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">1 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">1 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">2 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 | model)<\/span><\/p>\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">=\u00a0\u00a0 <\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ) \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 |<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ) \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 |<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ) \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">1 |<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 )<\/span><\/p>\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">\u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">1 | <\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">1 )<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 | <\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">1 )<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">2 | <\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 )<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 | <\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">2 )<\/span><\/p>\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">=\u00a0\u00a0 \u03c0 3 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">33 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">33 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">31 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">11 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">13 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">32 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">23<\/span><\/p>\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">=\u00a0\u00a0 1\u22c5 (0.8)(0.8)(0.1)(0.4)(0.3)(0.1)(0.2)<\/span><\/p>\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">=\u00a0\u00a0\u00a0 1.536X10-4<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">Markov model Matrix - Example 2<\/strong><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"aligncenter size-full wp-image-753\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-180.png\" alt=\"\" width=\"535\" height=\"230\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.8 Markov Model \u2013 Example 2<\/strong><\/p>\r\n&nbsp;\r\n\r\nWhat is the probability of 5 consecutive up days?\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Sequence is up-up-up-up-up\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 I.e., state sequence is 1-1-1-1-1\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 P(1,1,1,1,1) =\r\n\r\n\u2013\u00a0 p1a11a11a11a11 = 0.5 x (0.6)4 = 0.0648\r\n\r\n&nbsp;\r\n\r\n<strong>34.4 Hidden Markov Model<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">A Hidden Markov Model is an extension of a Markov model in which the input symbols are not the same as the states.This means we don\u2019t know which state we are in.In HMM POS-tagging for example input symbols are the words, states are the part of speech tags (Figure 34. 9)<\/p>\r\n&nbsp;\r\n\r\n<img class=\"aligncenter size-full wp-image-754\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-181.png\" alt=\"\" width=\"525\" height=\"66\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.9 POS Example<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Hidden Markov Models (HMMs) are also called as probabilistic finite state automata. However to tackle scenarios where states cannot be directly observed, we need an extension called as Hidden Markov Models.<\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"aligncenter size-full wp-image-755\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-182.png\" alt=\"\" width=\"523\" height=\"196\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.10 Example of Hidden Markov Model<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">In Figure 34.10, a<strong>ij<\/strong> are state transition probabilities and b<strong>ik<\/strong> are observation (output) probabilities. Please note that for the observed phenomenonb<sub><strong>11<\/strong><\/sub> + b<sub><strong>12<\/strong><\/sub> + b<sub><strong>13<\/strong><\/sub> + b<sub><strong>14<\/strong><\/sub> = 1,b<sub><strong>21<\/strong><\/sub> + b<sub><strong>22<\/strong><\/sub> + b<sub><strong>23<\/strong><\/sub> + b<sub><strong>24<\/strong><\/sub> = 1, etc.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Now considering the example shown in Figure 34.8, we can extend it to become an HMM. Here every state is associated with an additional probability called emission probability to indicate the probability of the output symbols emitted by each state.<\/p>\r\n<img class=\"aligncenter size-full wp-image-756\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-183.png\" alt=\"\" width=\"530\" height=\"242\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.11 HMM Model<\/strong><\/p>\r\n&nbsp;\r\n\r\n<strong>34.5 Hidden Markov Model \u2013 The Urn Example<\/strong>\r\n\r\n<\/div>\r\n<strong><img class=\"aligncenter size-full wp-image-757\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-184.png\" alt=\"\" width=\"523\" height=\"225\" \/><\/strong>\r\n<div>\r\n<p style=\"text-align: center\"><strong>Figure 34.12 Urn Example<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">The example assumes we have N urns containing color balls of M distinct colors. Each urn can contain different number of balls of each color. Here we assume that we have 3 urns each containing 6 balls, which can be of 3 distinct colors. The HMM generation process is a sequential process (Figure 34.13) where<\/p>\r\n&nbsp;\r\n\r\n\u2013\u00a0\u00a0 Step 1: Pick initial urn according to some random process\r\n\r\n&nbsp;\r\n\r\n\u2013\u00a0\u00a0 Step 2: Randomly pick a ball from the urn and then replace it\r\n\r\n&nbsp;\r\n\r\n\u2013\u00a0\u00a0 Step 3: Select another urn according to a random selection process\r\n\r\n&nbsp;\r\n\r\n\u2013\u00a0\u00a0 Step 4: Repeat Steps 2 &amp; 3\r\n\r\n&nbsp;\r\n\r\nHere we have the Markov process as {<em>q<\/em>(<em>t<\/em>)} and the output process as {f(x|q)}.\r\n\r\n&nbsp;\r\n\r\n<img class=\"aligncenter size-full wp-image-758\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-185.png\" alt=\"\" width=\"332\" height=\"176\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.13 HMM Generation Process<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Now the next question is what is hidden. Let us assume that we can see the color of the ball selected each time but however we do not know which urn is selected or the sequence in which urn selection takes place (state transition) is hidden (Figure 34.14).<\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"aligncenter size-full wp-image-759\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-186.png\" alt=\"\" width=\"534\" height=\"197\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.14 Hidden Information<\/strong><\/p>\r\n&nbsp;\r\n\r\n<strong>HMM Assumptions:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">There are some assumptions we make regarding the HMM model. The two assumptions are:<\/p>\r\n&nbsp;\r\n\r\n\u2022\u00a0<strong>Markov assumption: <\/strong>the state transition depends only on the origin and destination states\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u2022\u00a0<strong>Output-independent assumption: <\/strong>all observation frames are dependent only on the state that generated them, not on neighbouring observation frames<\/p>\r\n&nbsp;\r\n\r\nThese assumptions allow us to now define the dependency structure of the HMM model. 1-st order Markov assumption of transition gives the following\r\n\r\n&nbsp;\r\n\r\n<em>P<\/em>(<em>q<\/em><em>t<\/em><em>\u00a0 <\/em>|<em> q<\/em><sub>1<\/sub> ,<em> q<\/em><sub>2<\/sub> ,L,<em> q<\/em><sub><em>t<\/em><\/sub> \u22121 ) =<em> P<\/em>(<em>q<\/em><sub><em>t<\/em><\/sub><em>\u00a0 <\/em>|<em> q<\/em><sub><em>t<\/em><\/sub> \u22121 )\r\n\r\n&nbsp;\r\n\r\nConditional independency of observation parameters\r\n\r\n<em>P<\/em>(<em> X <\/em><em>t<\/em><em>\u00a0 <\/em>|<em> q<\/em><sub><em>t<\/em><\/sub> ,<em> X <\/em><sub>1<\/sub> ,L,<em> X <\/em><sub><em>t<\/em><\/sub> \u22121 ,<em> q<\/em><sub>1<\/sub> ,L,<em> q<\/em><sub><em>t<\/em><\/sub> \u22121 ) =<em> P<\/em>(<em> X <\/em><sub><em>t<\/em><\/sub><em>\u00a0 <\/em>|<em> q<\/em><sub><em>t<\/em><\/sub> )\r\n\r\n&nbsp;\r\n\r\nThe output-independent assumption gives rise to the following structure (Figure 34.15).\r\n\r\n&nbsp;\r\n\r\n<img class=\"aligncenter size-full wp-image-760\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-187.png\" alt=\"\" width=\"504\" height=\"132\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.15 Bayesian Network<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Figure 34.16 outlines the definition of the HMM model. Here N indicates the total number of states in the model while M indicates the number of symbols observable in the states. Now as we can see the HMM model is defined using\u00a0<span style=\"font-size: 1em;text-align: initial\">three probabilities A, which is the state transition probability, B, which is the observation probability and P the initial state distribution.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"aligncenter size-full wp-image-762\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-189.png\" alt=\"\" width=\"487\" height=\"247\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.16 The HMM Definition<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Figure 34.17 shows the HMM formalism. Here {<em>S, K<\/em>, P, <em>A, B<\/em>} is the model and <em>S <\/em>: {s1\u2026sN } are the values for the hidden states and<em> K <\/em>: {k1\u2026kM } are the values for the observations<\/p>\r\n&nbsp;\r\n\r\n<img class=\"aligncenter size-full wp-image-763\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-190.png\" alt=\"\" width=\"521\" height=\"115\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.17 The Basic Formalism<\/strong><\/p>\r\n<p style=\"text-align: justify\">The complete formalism is given in Figure 34.18. Here the model is defined by 5 parameters {<em>S, K<\/em>, P, <em>A, B<\/em>} where P = {pi} are the initial state probabilities, <em>A<\/em>=\u00a0\u00a0 {a<em>ij<\/em>} are the state transition probabilities and <em>B<\/em> = {b<em>ik<\/em>} are the observation state probabilities<\/p>\r\n<img class=\"aligncenter size-full wp-image-764\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-191.png\" alt=\"\" width=\"536\" height=\"105\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.19 The Complete Formalism<\/strong><\/p>\r\n\r\n<\/div>\r\n<p style=\"text-align: justify\"><strong>\u00a0<\/strong><span style=\"text-align: initial;font-size: 1em\">Now let us revisit the Urn example and explain it using the formalism as shown in Figure 34.20. Here number of states N=3, the number of observations possible M=3 that is V={R,G,B}.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">The initial state distribution is given as pFig 34.20 (a) and the state transition probability A = { aij } \u2013 is the transition probability of going from state I to state j and is given by the state transition matrix (Figure 34.20 (b)). Similarly the observation symbol probability distribution B { b i ( vk) } is the probability of seeing symbol vk in state bi (Figure 34.20 (c)).<\/span><\/p>\r\n\r\n<div>\r\n\r\n<img class=\"aligncenter size-full wp-image-765\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-192.png\" alt=\"\" width=\"448\" height=\"68\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.20 (a) Urn Example \u2013 Initial State Distribution<\/strong><\/p>\r\n<img class=\"aligncenter size-full wp-image-766\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-193.png\" alt=\"\" width=\"472\" height=\"123\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.20 (b) Urn Example \u2013 State Transition Probability Distribution<\/strong><\/p>\r\n<img class=\"aligncenter size-full wp-image-767\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-194.png\" alt=\"\" width=\"525\" height=\"108\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.20 (c) Urn Example \u2013 Observation Symbol Probability Distribution<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Let us discuss another example (sentence example) of HMM given in Figure 34.21. Here we have four states, the probability of emitting each symbol ( here dog and eats) and the transition probability between states. The initial probability is 1 at S and 0 for all other states. Therefore we start at S (probability 1) , we can go to either state N or state V with probability 0.5. Let us assume we go to state N. Now the probability of emitting dog at state N is 0.9. Next let us assume we go to state V with probability 0.8. At V we generate eats with probability 0.9. Now we go from V back to N (probability 0.7) where we emit dog with probability 0.9. Now from N let us assume we go to state \/S (probability 0.1). Thus the probability of following this sequence is 0.02 ( Figure 34.21).<\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"aligncenter size-full wp-image-768\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-195.png\" alt=\"\" width=\"537\" height=\"251\" \/>\r\n<p style=\"text-align: center\"><strong>Figure 34.21 Sentence Example<\/strong><\/p>\r\n&nbsp;\r\n\r\n<strong>34.5 Advantage of HMM on Sequential Data<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">HMM is a natural model structure which represents a doubly stochastic process where transition parameters model <em>temporal<\/em> variability and output distribution model <em>spatial<\/em> variability. It is efficient and good modelling tool forsequences with temporal constraints and spatial variability along the sequence, and this is able to model many real world complex processes . Efficient evaluation, decoding and training algorithms are available which are mathematically strong and computationally efficient. Moreover it is a proven technology with successful stories in many applications<\/p>\r\n&nbsp;\r\n\r\n<strong>34.6 Successful Application Areas of HMM<\/strong>\r\n\r\n&nbsp;\r\n\r\nSome of the successful areas where HMM has been used is listed below:\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 On-line handwriting recognition\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Speech recognition\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Gesture recognition\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Language modeling\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Motion video analysis and tracking\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Optical character recognition.\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Stock price prediction\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Flood predictions\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Modeling of coding\/noncoding regions in DNA,\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Multiple sequence alignment,\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Outlined here are details of some of the applications such as speech recognition where we need to recognize spoken words and phrases, text processing where we need to parse raw records into structured records, bioinformatics where we need to predict protein sequences and in finance domain where we make stock market forecasts by carrying out price pattern prediction or we can compare shopping services.<\/p>\r\n\r\n<\/div>\r\n&nbsp;\r\n\r\n<strong>Summary<\/strong>\r\n<ul>\r\n \t<li>Explained the concept of Markov Chain<\/li>\r\n \t<li>Outlined Markov Chain with an example<\/li>\r\n \t<li>Discussed the concept of Hidden Markov Model with examples\r\n<div><\/div><\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n<strong>Web Links<\/strong>\r\n<ul>\r\n \t<li>studentnet.cs.manchester.ac.uk\/ugt\/COMP24111\/...\/Nai ve-Bayes.ppt<\/li>\r\n \t<li>web.cecs.pdx.edu\/...\/2015BayesTrees...\/2014_0095_Example%20of%20<\/li>\r\n \t<li>https:\/\/cse.sc.edu\/~rose\/587\/PPT\/NaiveBayes.ppt<\/li>\r\n \t<li>www.cs.unc.edu\/~lazebnik\/spring09\/lec20_generative.ppt<\/li>\r\n \t<li>cis-linux1.temple.edu\/~latecki\/Courses\/RobotFall08\/...\/bayesNaive.ppt<\/li>\r\n \t<li>www.cs.bu.edu\/fac\/gkollios\/ada01\/LectNotes\/Bayesian.ppt<\/li>\r\n<\/ul>\r\n&nbsp;\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Markov and Hidden Markov<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/wuGbrguSyAM\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n<strong>Supporting &amp; Reference Materials<\/strong>\r\n<ul>\r\n \t<li>Tom <a href=\"http:\/\/www.amazon.in\/s\/ref=dp_byline_sr_book_1?ie=UTF8&amp;field-author=Mitchell&amp;search-alias=stripbooks\">Mitchell, <\/a>\u201cMachine Learning\u201d,McGraw-Hill Education, 1997<\/li>\r\n \t<li><a href=\"http:\/\/www.amazon.in\/s\/ref=dp_byline_sr_book_1?ie=UTF8&amp;field-author=Alpaydin+Ethem&amp;search-alias=stripbooks\">AlpaydinEthem, <\/a>\u201cIntroduction to Machine Learning\u201d, The MIT Press; third edition, 2014<\/li>\r\n \t<li>Christopher M. <a href=\"http:\/\/www.amazon.in\/s\/ref=dp_byline_sr_book_1?ie=UTF8&amp;field-author=Bishop&amp;search-alias=stripbooks\">Bishop, <\/a>\u201cPattern Recognition and Machine Learning\u201d,Springer, 2013 <a href=\"http:\/\/www.amazon.in\/s\/ref=dp_byline_sr_book_1?ie=UTF8&amp;field-author=Peter+Harrington&amp;search-alias=stripbooks\">Peter Harrington, <\/a>\u201cMachine Learning In Action\u201d, Manning Publications, 2012<\/li>\r\n \t<li><a href=\"http:\/\/www.amazon.in\/s\/ref=dp_byline_sr_book_1?ie=UTF8&amp;field-author=Peter+Flach&amp;search-alias=stripbooks\">Peter Flach, <\/a>\u201cMachine Learning: The Art and Science of Algorithms that Make Sense of Data\u201d,Cambridge University Press, 2012<\/li>\r\n \t<li><a href=\"http:\/\/www.amazon.in\/s\/ref=dp_byline_sr_book_1?ie=UTF8&amp;field-author=Stephen+Marsland&amp;search-alias=stripbooks\">Stephen Marsland, <\/a>\u201cMachine Learning: An Algorithmic Perspective\u201d, Chapman and Hall\/CRC; 2 edition, 2014<\/li>\r\n \t<li>S. Abu-Mostafa, M. Magdon-Ismail, and H.-T. Lin, \u201cLearning from Data\u201d, AMLBook, 2012.<\/li>\r\n<\/ul>","rendered":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/wuGbrguSyAM\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>Learning Objectives:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>The learning objectives of this module are as follows:<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 To understand the concept of Markov Chain<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 To explain Markov Chain with an example<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 To understand the concept of Hidden Markov Model<\/p>\n<p>&nbsp;<\/p>\n<p><strong>34.1 Markov Random Processes<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Until now, we have considered data to be i.i.d (independent and Identically distributed). Now we study sequential data such as time-series like stock market, speech, video analysis and ordered like text, genes, etc. If underlying process is unknown we can construct a model to predict the next state in sequence. In general, product rule expresses joint distribution for sequence<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-739\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-166.png\" alt=\"\" width=\"380\" height=\"41\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-166.png 380w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-166-300x32.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-166-65x7.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-166-225x24.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-166-350x38.png 350w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">First-order Markov chain is described as each observation being independent of all previous observations except the most recent.<\/span><\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-740\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-167.png\" alt=\"\" width=\"306\" height=\"50\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-167.png 306w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-167-300x49.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-167-65x11.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-167-225x37.png 225w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/><\/p>\n<p>In this case the Maximum Likelihood parameter estimates are easy.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Now we define the Markovprocessas 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. A random sequence has the Markov property if its distribution is determined solely by its current state. Any random process having this property is called a Markov random process.For observable state sequences (state is known from data), this leads to a Markov chain model.For non-observable states, this leads to a Hidden Markov Model (HMM).<\/p>\n<p>&nbsp;<\/p>\n<p><strong>34.1.1 Markov Model<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>A discrete (finite) system can be described as consisting of:<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013\u00a0 N distinct states.<\/p>\n<p>\u2013\u00a0 Begins (at time t=1) in some initial state(s).<\/p>\n<p style=\"text-align: justify\">\u2013 At each time step (t=1,2,\u2026) the system moves from current to next state (possibly the same as the current state) according to transition probabilities associated with current state.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">This kind of system is called a fi nite, or discrete Markov model. The model has been named after Andrei Andreyevich Markov (1856 -1922).<\/p>\n<p>&nbsp;<\/p>\n<p><strong>34.1.2 Markov Property<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">Now let us discuss a very important property that is known as the Markov property<\/span><strong style=\"text-align: initial;font-size: 1em\">.<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">Markov Property: <\/strong><span style=\"text-align: initial;font-size: 1em\">The state of the system at time <\/span><em style=\"text-align: initial;font-size: 1em\">t<\/em><span style=\"text-align: initial;font-size: 1em\">+1 depends only on the state of the system at time <\/span><em style=\"text-align: initial;font-size: 1em\">t.<\/em><span style=\"text-align: initial;font-size: 1em\"> This property allows us to assume that the state at time <\/span><em style=\"text-align: initial;font-size: 1em\">t<\/em><span style=\"text-align: initial;font-size: 1em\">+1is independent of the states at all times before t (Figure 34.1). This is a simplifying assumption that allows us to compute the states of many sequential problems.<\/span><\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-741\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-168.png\" alt=\"\" width=\"528\" height=\"81\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-168.png 528w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-168-300x46.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-168-65x10.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-168-225x35.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-168-350x54.png 350w\" sizes=\"auto, (max-width: 528px) 100vw, 528px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.1 Markov Property<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>Stationary Assumption: <\/strong>In general, a process is called stationary if transition probabilities are independent of t, namely (Figure 34.2)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-742\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-169.png\" alt=\"\" width=\"522\" height=\"66\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-169.png 522w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-169-300x38.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-169-65x8.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-169-225x28.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-169-350x44.png 350w\" sizes=\"auto, (max-width: 522px) 100vw, 522px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.2 Stationary Property<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">This means that if system is in state i, the probability thatthe system will next move to state j is pij , no matter whatthe value of t is.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>34.2 Components of the Markov Model<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Markov model is a stochastic processes holding the Markov property. The Markov property is also called as memoryless property.This is because the future is independent of past given present. One step transition probability is the basis.We need the following three basic information to define a Markov model which is essentially a state space model:<\/p>\n<ul>\n<li>Parameter space.<\/li>\n<li>Statespace \u2013 where states represent various conditions of the System<\/li>\n<li>State transition probability -Transitions betweenstates indicateoccurrences of events<\/li>\n<\/ul>\n<p>Now let us describe the components of the Markov Model in detail:<\/p>\n<p>&nbsp;<\/p>\n<p>First we have a set of states:<\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-743\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-170.png\" alt=\"\" width=\"211\" height=\"65\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-170.png 211w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-170-65x20.png 65w\" sizes=\"auto, (max-width: 211px) 100vw, 211px\" \/><\/p>\n<p>In general the process moves from one state to another generating a sequence of states given as:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-744\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-171.png\" alt=\"\" width=\"244\" height=\"61\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-171.png 244w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-171-65x16.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-171-225x56.png 225w\" sizes=\"auto, (max-width: 244px) 100vw, 244px\" \/><\/p>\n<p>Now according to the Markov chain property, the probability of each subsequent state depends only on what was the previous state:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-745\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-172.png\" alt=\"\" width=\"494\" height=\"58\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-172.png 494w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-172-300x35.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-172-65x8.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-172-225x26.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-172-350x41.png 350w\" sizes=\"auto, (max-width: 494px) 100vw, 494px\" \/><\/p>\n<p>To define Markov model, the following two probabilities have to be specified:<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Transition probability<\/strong>which is the probability of state Sigiven Sjand defined as:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-746\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-173.png\" alt=\"\" width=\"209\" height=\"62\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-173.png 209w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-173-65x19.png 65w\" sizes=\"auto, (max-width: 209px) 100vw, 209px\" \/><\/p>\n<p>and<strong>initial probability which the probability of<\/strong> Sibeing an Initial state and given as:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-747\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-174.png\" alt=\"\" width=\"171\" height=\"59\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-174.png 171w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-174-65x22.png 65w\" sizes=\"auto, (max-width: 171px) 100vw, 171px\" \/><\/p>\n<p>The output of the process is the set of states at each instant of time .<\/p>\n<p>&nbsp;<\/p>\n<p><strong>34.3 Markov Model \u2013 Examples<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Now let us consider an example of the Markov Model scenario where we classify weather into three states (Figure 34.3) as State 1: rain or snow, \u2013 State 2: cloudy and State 3: sunny.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-748\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-175.png\" alt=\"\" width=\"268\" height=\"83\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-175.png 268w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-175-65x20.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-175-225x70.png 225w\" sizes=\"auto, (max-width: 268px) 100vw, 268px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.3 Three States of the Weather Example<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">It is given that the weather of some city followed the weather change pattern given in the following table (Figure 34.5):<\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-749\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-176.png\" alt=\"\" width=\"504\" height=\"193\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-176.png 504w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-176-300x115.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-176-65x25.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-176-225x86.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-176-350x134.png 350w\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.5 Weather Change Pattern<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Here we make a major Markov assumption that tomorrow\u2019s weather depends only on today\u2019s weather. The above information can be represented as a Markov Model which is represented graphically as given in Figure 34.6.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-750\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-177.png\" alt=\"\" width=\"327\" height=\"198\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-177.png 327w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-177-300x182.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-177-65x39.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-177-225x136.png 225w\" sizes=\"auto, (max-width: 327px) 100vw, 327px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.6 Graphical Representation<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Here each state corresponds to one observation and the sum of outgoing edge weights is equal to one.<\/p>\n<p>&nbsp;<\/p>\n<p>Here we have the observable states as {1,2,\u2026.,N}<\/p>\n<p>&nbsp;<\/p>\n<p>Observable Sequence is q1, q2,\u2026\u2026.., qT. In other words these are the stateswe<\/p>\n<p>&nbsp;<\/p>\n<p>will be observing to make a decision. Because of the 1st order Markov assumptionthe representation is as given in Figure 34.7.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>P(q<\/strong><sub><strong>t<\/strong><\/sub><strong> = j | q<\/strong><sub><strong>t<\/strong> <\/sub><strong>\u22121<\/strong><strong> = i, q<\/strong><sub><strong>t<\/strong><\/sub> <strong>\u22122<\/strong><strong>\u00a0 = k,\u2026) reduces to P(q<\/strong><sub><strong>t<\/strong><\/sub><strong> = j | q<\/strong><sub><strong>t<\/strong><\/sub> <strong>\u22121<\/strong><strong> = i)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-751\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-178.png\" alt=\"\" width=\"481\" height=\"126\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-178.png 481w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-178-300x79.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-178-65x17.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-178-225x59.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-178-350x92.png 350w\" sizes=\"auto, (max-width: 481px) 100vw, 481px\" \/><\/p>\n<p style=\"text-align: center\"><strong style=\"text-align: initial;font-size: 1em\">Figure 34.7 Markov Assumption<\/strong><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>We can consider<\/p>\n<p><strong>P(q<\/strong><sub><strong>t<\/strong><\/sub><strong> = j | q<\/strong><sub><strong>t<\/strong><\/sub> <strong>\u22121<\/strong><strong> = i) = P(q<\/strong><strong><sub>t<\/sub> +l<\/strong><strong>\u00a0 = j | q<\/strong><strong><sub>t<\/sub> +l<\/strong> <strong>\u22121<\/strong><strong> = i)<\/strong><\/p>\n<p>and initial state probability to be<\/p>\n<p><strong>\u03c0<\/strong><strong><em>i<\/em><\/strong><strong> = <em>P<\/em> ( <em>q<\/em> <\/strong><strong>1<\/strong>\u00a0<strong>= <em>i<\/em> ),<\/strong>\u00a0\u00a0<strong>1 \u2264 <em>i<\/em> \u2264 <em>N<\/em><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Now let us consider Conditional probability <em>P<\/em>(<em> A<\/em>,<em> B<\/em>) =<em> P<\/em>(<em> A <\/em>|<em> B<\/em>)<em>P<\/em>(<em> B<\/em>)<\/p>\n<p>&nbsp;<\/p>\n<p>Now the sequence probability of Markov model can be represented as:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-752\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-179.png\" alt=\"\" width=\"534\" height=\"260\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-179.png 534w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-179-300x146.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-179-65x32.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-179-225x110.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-179-350x170.png 350w\" sizes=\"auto, (max-width: 534px) 100vw, 534px\" \/><\/p>\n<p><strong>Markov Model \u2013 Example 1<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Let us consider the following question: What is the probability that the weather for the next 7 days will be \u201csun-sun-rain-rain-sun-cloudy-sun\u201d when today is sunny? (Refer Figure 34.6)<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><em style=\"text-align: initial;font-size: 1em\">S<\/em><sub><span style=\"text-align: initial\">1<\/span><\/sub><span style=\"text-align: initial;font-size: 1em\">: <\/span><em style=\"text-align: initial;font-size: 1em\">rain<\/em><span style=\"text-align: initial;font-size: 1em\">,\u00a0\u00a0<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><sub><span style=\"text-align: initial\">2<\/span><\/sub><span style=\"text-align: initial;font-size: 1em\">: <\/span><em style=\"text-align: initial;font-size: 1em\">cloudy<\/em><span style=\"text-align: initial;font-size: 1em\">,\u00a0<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><sub><span style=\"text-align: initial\">3<\/span><\/sub><span style=\"text-align: initial;font-size: 1em\">: <\/span><em style=\"text-align: initial;font-size: 1em\">sunny<\/em><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">O <\/em><span style=\"text-align: initial;font-size: 1em\">| model) =<\/span><em style=\"text-align: initial;font-size: 1em\"> P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">1 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">1 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">2 ,<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 | model)<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">=\u00a0\u00a0 <\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ) \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 |<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ) \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 |<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 ) \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">1 |<\/span><em style=\"text-align: initial;font-size: 1em\"> S<\/em><span style=\"text-align: initial;font-size: 1em\">3 )<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">\u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">1 | <\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">1 )<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 | <\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">1 )<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">2 | <\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 )<\/span><em style=\"text-align: initial;font-size: 1em\">P<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">3 | <\/span><em style=\"text-align: initial;font-size: 1em\">S<\/em><span style=\"text-align: initial;font-size: 1em\">2 )<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">=\u00a0\u00a0 \u03c0 3 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">33 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">33 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">31 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">11 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">13 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">32 \u22c5<\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">23<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">=\u00a0\u00a0 1\u22c5 (0.8)(0.8)(0.1)(0.4)(0.3)(0.1)(0.2)<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">=\u00a0\u00a0\u00a0 1.536X10-4<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">Markov model Matrix &#8211; Example 2<\/strong><\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-753\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-180.png\" alt=\"\" width=\"535\" height=\"230\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-180.png 535w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-180-300x129.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-180-65x28.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-180-225x97.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-180-350x150.png 350w\" sizes=\"auto, (max-width: 535px) 100vw, 535px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.8 Markov Model \u2013 Example 2<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>What is the probability of 5 consecutive up days?<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Sequence is up-up-up-up-up<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 I.e., state sequence is 1-1-1-1-1<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 P(1,1,1,1,1) =<\/p>\n<p>\u2013\u00a0 p1a11a11a11a11 = 0.5 x (0.6)4 = 0.0648<\/p>\n<p>&nbsp;<\/p>\n<p><strong>34.4 Hidden Markov Model<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A Hidden Markov Model is an extension of a Markov model in which the input symbols are not the same as the states.This means we don\u2019t know which state we are in.In HMM POS-tagging for example input symbols are the words, states are the part of speech tags (Figure 34. 9)<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-754\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-181.png\" alt=\"\" width=\"525\" height=\"66\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-181.png 525w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-181-300x38.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-181-65x8.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-181-225x28.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-181-350x44.png 350w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.9 POS Example<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Hidden Markov Models (HMMs) are also called as probabilistic finite state automata. However to tackle scenarios where states cannot be directly observed, we need an extension called as Hidden Markov Models.<\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-755\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-182.png\" alt=\"\" width=\"523\" height=\"196\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-182.png 523w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-182-300x112.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-182-65x24.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-182-225x84.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-182-350x131.png 350w\" sizes=\"auto, (max-width: 523px) 100vw, 523px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.10 Example of Hidden Markov Model<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In Figure 34.10, a<strong>ij<\/strong> are state transition probabilities and b<strong>ik<\/strong> are observation (output) probabilities. Please note that for the observed phenomenonb<sub><strong>11<\/strong><\/sub> + b<sub><strong>12<\/strong><\/sub> + b<sub><strong>13<\/strong><\/sub> + b<sub><strong>14<\/strong><\/sub> = 1,b<sub><strong>21<\/strong><\/sub> + b<sub><strong>22<\/strong><\/sub> + b<sub><strong>23<\/strong><\/sub> + b<sub><strong>24<\/strong><\/sub> = 1, etc.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Now considering the example shown in Figure 34.8, we can extend it to become an HMM. Here every state is associated with an additional probability called emission probability to indicate the probability of the output symbols emitted by each state.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-756\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-183.png\" alt=\"\" width=\"530\" height=\"242\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-183.png 530w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-183-300x137.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-183-65x30.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-183-225x103.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-183-350x160.png 350w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.11 HMM Model<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>34.5 Hidden Markov Model \u2013 The Urn Example<\/strong><\/p>\n<\/div>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-757\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-184.png\" alt=\"\" width=\"523\" height=\"225\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-184.png 523w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-184-300x129.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-184-65x28.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-184-225x97.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-184-350x151.png 350w\" sizes=\"auto, (max-width: 523px) 100vw, 523px\" \/><\/strong><\/p>\n<div>\n<p style=\"text-align: center\"><strong>Figure 34.12 Urn Example<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The example assumes we have N urns containing color balls of M distinct colors. Each urn can contain different number of balls of each color. Here we assume that we have 3 urns each containing 6 balls, which can be of 3 distinct colors. The HMM generation process is a sequential process (Figure 34.13) where<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013\u00a0\u00a0 Step 1: Pick initial urn according to some random process<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013\u00a0\u00a0 Step 2: Randomly pick a ball from the urn and then replace it<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013\u00a0\u00a0 Step 3: Select another urn according to a random selection process<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013\u00a0\u00a0 Step 4: Repeat Steps 2 &amp; 3<\/p>\n<p>&nbsp;<\/p>\n<p>Here we have the Markov process as {<em>q<\/em>(<em>t<\/em>)} and the output process as {f(x|q)}.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-758\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-185.png\" alt=\"\" width=\"332\" height=\"176\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-185.png 332w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-185-300x159.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-185-65x34.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-185-225x119.png 225w\" sizes=\"auto, (max-width: 332px) 100vw, 332px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.13 HMM Generation Process<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Now the next question is what is hidden. Let us assume that we can see the color of the ball selected each time but however we do not know which urn is selected or the sequence in which urn selection takes place (state transition) is hidden (Figure 34.14).<\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-759\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-186.png\" alt=\"\" width=\"534\" height=\"197\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-186.png 534w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-186-300x111.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-186-65x24.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-186-225x83.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-186-350x129.png 350w\" sizes=\"auto, (max-width: 534px) 100vw, 534px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.14 Hidden Information<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>HMM Assumptions:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">There are some assumptions we make regarding the HMM model. The two assumptions are:<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0<strong>Markov assumption: <\/strong>the state transition depends only on the origin and destination states<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u2022\u00a0<strong>Output-independent assumption: <\/strong>all observation frames are dependent only on the state that generated them, not on neighbouring observation frames<\/p>\n<p>&nbsp;<\/p>\n<p>These assumptions allow us to now define the dependency structure of the HMM model. 1-st order Markov assumption of transition gives the following<\/p>\n<p>&nbsp;<\/p>\n<p><em>P<\/em>(<em>q<\/em><em>t<\/em><em>\u00a0 <\/em>|<em> q<\/em><sub>1<\/sub> ,<em> q<\/em><sub>2<\/sub> ,L,<em> q<\/em><sub><em>t<\/em><\/sub> \u22121 ) =<em> P<\/em>(<em>q<\/em><sub><em>t<\/em><\/sub><em>\u00a0 <\/em>|<em> q<\/em><sub><em>t<\/em><\/sub> \u22121 )<\/p>\n<p>&nbsp;<\/p>\n<p>Conditional independency of observation parameters<\/p>\n<p><em>P<\/em>(<em> X <\/em><em>t<\/em><em>\u00a0 <\/em>|<em> q<\/em><sub><em>t<\/em><\/sub> ,<em> X <\/em><sub>1<\/sub> ,L,<em> X <\/em><sub><em>t<\/em><\/sub> \u22121 ,<em> q<\/em><sub>1<\/sub> ,L,<em> q<\/em><sub><em>t<\/em><\/sub> \u22121 ) =<em> P<\/em>(<em> X <\/em><sub><em>t<\/em><\/sub><em>\u00a0 <\/em>|<em> q<\/em><sub><em>t<\/em><\/sub> )<\/p>\n<p>&nbsp;<\/p>\n<p>The output-independent assumption gives rise to the following structure (Figure 34.15).<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-760\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-187.png\" alt=\"\" width=\"504\" height=\"132\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-187.png 504w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-187-300x79.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-187-65x17.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-187-225x59.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-187-350x92.png 350w\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.15 Bayesian Network<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Figure 34.16 outlines the definition of the HMM model. Here N indicates the total number of states in the model while M indicates the number of symbols observable in the states. Now as we can see the HMM model is defined using\u00a0<span style=\"font-size: 1em;text-align: initial\">three probabilities A, which is the state transition probability, B, which is the observation probability and P the initial state distribution.<\/span><\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-762\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-189.png\" alt=\"\" width=\"487\" height=\"247\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-189.png 487w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-189-300x152.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-189-65x33.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-189-225x114.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-189-350x178.png 350w\" sizes=\"auto, (max-width: 487px) 100vw, 487px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.16 The HMM Definition<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Figure 34.17 shows the HMM formalism. Here {<em>S, K<\/em>, P, <em>A, B<\/em>} is the model and <em>S <\/em>: {s1\u2026sN } are the values for the hidden states and<em> K <\/em>: {k1\u2026kM } are the values for the observations<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-763\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-190.png\" alt=\"\" width=\"521\" height=\"115\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-190.png 521w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-190-300x66.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-190-65x14.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-190-225x50.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-190-350x77.png 350w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.17 The Basic Formalism<\/strong><\/p>\n<p style=\"text-align: justify\">The complete formalism is given in Figure 34.18. Here the model is defined by 5 parameters {<em>S, K<\/em>, P, <em>A, B<\/em>} where P = {pi} are the initial state probabilities, <em>A<\/em>=\u00a0\u00a0 {a<em>ij<\/em>} are the state transition probabilities and <em>B<\/em> = {b<em>ik<\/em>} are the observation state probabilities<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-764\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-191.png\" alt=\"\" width=\"536\" height=\"105\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-191.png 536w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-191-300x59.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-191-65x13.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-191-225x44.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-191-350x69.png 350w\" sizes=\"auto, (max-width: 536px) 100vw, 536px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.19 The Complete Formalism<\/strong><\/p>\n<\/div>\n<p style=\"text-align: justify\"><strong>\u00a0<\/strong><span style=\"text-align: initial;font-size: 1em\">Now let us revisit the Urn example and explain it using the formalism as shown in Figure 34.20. Here number of states N=3, the number of observations possible M=3 that is V={R,G,B}.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">The initial state distribution is given as pFig 34.20 (a) and the state transition probability A = { aij } \u2013 is the transition probability of going from state I to state j and is given by the state transition matrix (Figure 34.20 (b)). Similarly the observation symbol probability distribution B { b i ( vk) } is the probability of seeing symbol vk in state bi (Figure 34.20 (c)).<\/span><\/p>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-765\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-192.png\" alt=\"\" width=\"448\" height=\"68\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-192.png 448w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-192-300x46.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-192-65x10.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-192-225x34.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-192-350x53.png 350w\" sizes=\"auto, (max-width: 448px) 100vw, 448px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.20 (a) Urn Example \u2013 Initial State Distribution<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-766\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-193.png\" alt=\"\" width=\"472\" height=\"123\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-193.png 472w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-193-300x78.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-193-65x17.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-193-225x59.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-193-350x91.png 350w\" sizes=\"auto, (max-width: 472px) 100vw, 472px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.20 (b) Urn Example \u2013 State Transition Probability Distribution<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-767\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-194.png\" alt=\"\" width=\"525\" height=\"108\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-194.png 525w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-194-300x62.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-194-65x13.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-194-225x46.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-194-350x72.png 350w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.20 (c) Urn Example \u2013 Observation Symbol Probability Distribution<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Let us discuss another example (sentence example) of HMM given in Figure 34.21. Here we have four states, the probability of emitting each symbol ( here dog and eats) and the transition probability between states. The initial probability is 1 at S and 0 for all other states. Therefore we start at S (probability 1) , we can go to either state N or state V with probability 0.5. Let us assume we go to state N. Now the probability of emitting dog at state N is 0.9. Next let us assume we go to state V with probability 0.8. At V we generate eats with probability 0.9. Now we go from V back to N (probability 0.7) where we emit dog with probability 0.9. Now from N let us assume we go to state \/S (probability 0.1). Thus the probability of following this sequence is 0.02 ( Figure 34.21).<\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-768\" src=\"http:\/\/csp15.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/65\/2019\/01\/2-195.png\" alt=\"\" width=\"537\" height=\"251\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-195.png 537w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-195-300x140.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-195-65x30.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-195-225x105.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-content\/uploads\/sites\/65\/2019\/01\/2-195-350x164.png 350w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 34.21 Sentence Example<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>34.5 Advantage of HMM on Sequential Data<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">HMM is a natural model structure which represents a doubly stochastic process where transition parameters model <em>temporal<\/em> variability and output distribution model <em>spatial<\/em> variability. It is efficient and good modelling tool forsequences with temporal constraints and spatial variability along the sequence, and this is able to model many real world complex processes . Efficient evaluation, decoding and training algorithms are available which are mathematically strong and computationally efficient. Moreover it is a proven technology with successful stories in many applications<\/p>\n<p>&nbsp;<\/p>\n<p><strong>34.6 Successful Application Areas of HMM<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Some of the successful areas where HMM has been used is listed below:<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 On-line handwriting recognition<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Speech recognition<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Gesture recognition<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Language modeling<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Motion video analysis and tracking<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Optical character recognition.<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Stock price prediction<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Flood predictions<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Modeling of coding\/noncoding regions in DNA,<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Multiple sequence alignment,<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Outlined here are details of some of the applications such as speech recognition where we need to recognize spoken words and phrases, text processing where we need to parse raw records into structured records, bioinformatics where we need to predict protein sequences and in finance domain where we make stock market forecasts by carrying out price pattern prediction or we can compare shopping services.<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Summary<\/strong><\/p>\n<ul>\n<li>Explained the concept of Markov Chain<\/li>\n<li>Outlined Markov Chain with an example<\/li>\n<li>Discussed the concept of Hidden Markov Model with examples\n<div><\/div>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Web Links<\/strong><\/p>\n<ul>\n<li>studentnet.cs.manchester.ac.uk\/ugt\/COMP24111\/&#8230;\/Nai ve-Bayes.ppt<\/li>\n<li>web.cecs.pdx.edu\/&#8230;\/2015BayesTrees&#8230;\/2014_0095_Example%20of%20<\/li>\n<li>https:\/\/cse.sc.edu\/~rose\/587\/PPT\/NaiveBayes.ppt<\/li>\n<li>www.cs.unc.edu\/~lazebnik\/spring09\/lec20_generative.ppt<\/li>\n<li>cis-linux1.temple.edu\/~latecki\/Courses\/RobotFall08\/&#8230;\/bayesNaive.ppt<\/li>\n<li>www.cs.bu.edu\/fac\/gkollios\/ada01\/LectNotes\/Bayesian.ppt<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Markov and Hidden Markov<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/wuGbrguSyAM\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Supporting &amp; Reference Materials<\/strong><\/p>\n<ul>\n<li>Tom <a href=\"http:\/\/www.amazon.in\/s\/ref=dp_byline_sr_book_1?ie=UTF8&amp;field-author=Mitchell&amp;search-alias=stripbooks\">Mitchell, <\/a>\u201cMachine Learning\u201d,McGraw-Hill Education, 1997<\/li>\n<li><a href=\"http:\/\/www.amazon.in\/s\/ref=dp_byline_sr_book_1?ie=UTF8&amp;field-author=Alpaydin+Ethem&amp;search-alias=stripbooks\">AlpaydinEthem, <\/a>\u201cIntroduction to Machine Learning\u201d, The MIT Press; third edition, 2014<\/li>\n<li>Christopher M. <a href=\"http:\/\/www.amazon.in\/s\/ref=dp_byline_sr_book_1?ie=UTF8&amp;field-author=Bishop&amp;search-alias=stripbooks\">Bishop, <\/a>\u201cPattern Recognition and Machine Learning\u201d,Springer, 2013 <a href=\"http:\/\/www.amazon.in\/s\/ref=dp_byline_sr_book_1?ie=UTF8&amp;field-author=Peter+Harrington&amp;search-alias=stripbooks\">Peter Harrington, <\/a>\u201cMachine Learning In Action\u201d, Manning Publications, 2012<\/li>\n<li><a href=\"http:\/\/www.amazon.in\/s\/ref=dp_byline_sr_book_1?ie=UTF8&amp;field-author=Peter+Flach&amp;search-alias=stripbooks\">Peter Flach, <\/a>\u201cMachine Learning: The Art and Science of Algorithms that Make Sense of Data\u201d,Cambridge University Press, 2012<\/li>\n<li><a href=\"http:\/\/www.amazon.in\/s\/ref=dp_byline_sr_book_1?ie=UTF8&amp;field-author=Stephen+Marsland&amp;search-alias=stripbooks\">Stephen Marsland, <\/a>\u201cMachine Learning: An Algorithmic Perspective\u201d, Chapman and Hall\/CRC; 2 edition, 2014<\/li>\n<li>S. Abu-Mostafa, M. Magdon-Ismail, and H.-T. Lin, \u201cLearning from Data\u201d, AMLBook, 2012.<\/li>\n<\/ul>\n","protected":false},"author":3,"menu_order":33,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-735","chapter","type-chapter","status-publish","hentry"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/chapters\/735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/wp\/v2\/users\/3"}],"version-history":[{"count":7,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/chapters\/735\/revisions"}],"predecessor-version":[{"id":772,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/chapters\/735\/revisions\/772"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/chapters\/735\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/wp\/v2\/media?parent=735"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/pressbooks\/v2\/chapter-type?post=735"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/wp\/v2\/contributor?post=735"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp15\/wp-json\/wp\/v2\/license?post=735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}