Description Usage Arguments Format Value Author(s) References See Also Examples

The `backward`

-function computes the backward probabilities.
The backward probability for state X and observation at time k is defined as the probability
of observing the sequence of observations e_k+1, ... ,e_n under the condition that the
state at time k is X. That is:

`b[X,k] := Prob(E_k+1 = e_k+1, ... , E_n = e_n | X_k = X)`

.

Where `E_1...E_n = e_1...e_n`

is the sequence of observed emissions and
`X_k`

is a random variable that represents the state at time `k`

.

1 | ```
backward(hmm, observation)
``` |

`hmm ` |
A Hidden Markov Model. |

`observation ` |
A sequence of observations. |

Dimension and Format of the Arguments.

- hmm
A valid Hidden Markov Model, for example instantiated by

`initHMM`

.- observation
A vector of strings with the observations.

Return Value:

`backward ` |
A matrix containing the backward probabilities. The probabilities are given on a logarithmic scale (natural logarithm). The first dimension refers to the state and the second dimension to time. |

Lin Himmelmann <[email protected]>, Scientific Software Development

Lawrence R. Rabiner: A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition. Proceedings of the IEEE 77(2) p.257-286, 1989.

See `forward`

for computing the forward probabilities.

1 2 3 4 5 6 7 8 9 | ```
# Initialise HMM
hmm = initHMM(c("A","B"), c("L","R"), transProbs=matrix(c(.8,.2,.2,.8),2),
emissionProbs=matrix(c(.6,.4,.4,.6),2))
print(hmm)
# Sequence of observations
observations = c("L","L","R","R")
# Calculate backward probablities
logBackwardProbabilities = backward(hmm,observations)
print(exp(logBackwardProbabilities))
``` |

HMM documentation built on May 29, 2017, 11:45 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.