Hidden Markov Models: Theory, Implementation, and Extensions

The ability to model phenomena that are encountered is a vital part of the scientific community as a whole. Many phenomena are not directly observable, however often some result or effect of that phenomena provide a means by which it may be analyzed and measured. For example, it would be difficult to know conclusively if a person is angry, however, a raised voice, frowning facial features, and increases heart rate may all indicate the underlying reality. When such phenomena occur in a sequentially then often a natural model for such a situation is a Hidden Markov Model (HMM). In order to better understand the model and how it may be applied, first consider an illustrative example. In a 2002 medical study, [1], it was found that decreased exposure to sunlight, such as in the wintertime, has a negative effect on a person’s mood, and may contribute to depression during the months of least sunlight, a condition known as seasonal affective disorder (SAD). Now consider a hypothetical male test subject, for a new study in which significant simplifying assumptions will be applied for illustrative purposes. This subject can experience three levels of sunlight: (1) high, (2) medium, and (3) low exposure. Each day the subject must report his mood rated on a scale of 1 to 9, where 1 is depressed and 9 is happy. The mood of the subject is known, however the amount of sunlight exposure is unknown. At the beginning of the study, the subject filled out a survey claiming that he is typically happier when he experiences large quantities of sunlight, and similarly he is depressed when there are low quantities of sunlight. However, he also stated that when there is an intermediate amount of sunlight, his mood varies more with situations in his life, and there is more variability. With this prior knowledge, those conducting the study can draw inferences about this future actions. However, since there are always those events in life which can affect a person’s mood drastically (such as a birth or a death in a family), the mood may not always correspond directly to the amount of sunlight exposure. This situation is an ideal scenario for applying an HMM. There is an underlying state, which the amount of sunlight the subject receives. This quantity is unknown to the investigators of the study, so instead they use the information they asked him for: his mood; this is referred to as the observation. A “simulation” of the subject’s mood is shown in figure 1, and it can be seen that although, for the most part, the observation agrees with the subjects entrance survey, there are a few surprises, such as the spike in mood while he’s experiencing low exposure to sunlight. This leads to uncertainty in the model, but this too can be accounted for by incorporating an observation probability: given that he is in a certain state, an associated probability of being in a certain mood is estimated, which can be inferred based on his past experiences. Another way to account for uncertainty in the overall situation is by determining the likelihood of experiencing low sun exposure or medium sun exposure given that he is currently experiencing high sun exposure. This is a measure of the state transition probability. Similarly, there must be a certain probability that the first state he’ll be in is low, medium, or high exposure, this is the initial state probability. The mathematics behind these concepts were first conceived in the late 1960’s through the work of Baum et al. in a series of articles beginning with [2]. Rabiner made that work more accessible through his 1989 tutorial, [3], wherein the theory and implementation of HMM’s were eloquently presented, with a particular focus on applications to automatic speech recognition. Since then a multitude of publications have explored the varied applications of HMMs. The basic HMM has discrete states transition probabilities, and discrete observation probabilities. This concept is readily extended to allow for continuous observation probabilities, but this process requires considering the numerical stability of the process.