# Understanding Hidden Markov Model (HMM)

I was studying this article about Hidden Markov Model. The article introduced two diagrams at the outset.

(1) Given what I had for dinner last night, the probability of what I will have tonight.

(2) Given what I had for dinner that night, the probability that it will lead to finding either a plastic bowl or some tin foil wrapper in my trash.

What I understand is, (1) is a transition model of a Markov Model of the person's food items.

I have the following questions:

(a) Is t the number of generations/steps?

(b) Is diagram (2) a Markov Model or Hidden Markov Model?

(c) Is the aim of an HMM to find (1) from (2)?

(d) Evaluation means finding probabilities of a specific sequence of states from previously known information using HMM, and, Decoding means constructing a specific sequence of states from previously known information using HMM.

Then, what does Learning mean?

(e) HMM itself doesn't give us any result/value, it just helps us to model a scenario. We have to apply algorithms to HMM to obtain results/values. Am I correct?

A hidden Markov model is made of two levels:

1. A Markov chain, $(X_t)$, driven by a transition kernel $K$, e.g., $$X_{t+1}=K(X_t,\epsilon_{t+1})$$where $(\epsilon_t)$ is an iid white noise sequence;
2. A noisy observation of the Markov chain, $(Y_t)$, driven by a noise distribution, e.g., $$Y_t=H(X_t,\xi_t)$$where $(\xi_t)$ is an iid white noise sequence.

It is called hidden because the sequence $(X_t)$ is not observed. In your example, the Markov chain is made of the sequence of dishes one eats every evening, while the observation sequence is made of the type of container found in the trash the next morning. One possible use of a hidden Markov model is to infer the hidden chain $(X_t)$ from the $Y_t$'s. Another use is to infer the parameters driving the model, i.e., the parameters of $K$ and $H$. The book Inference in Hidden Markov Models [to which I contributed one chapter] is a suggest entry on the topic, albeit at a rather advanced level.

[The above diagram is reproduced from an earlier Stack Exchange question on that topic.]