Finding something worth knowing…

Science

Guessing the weather from what a friend did all day

Alice and Bob live far apart and chat by phone every evening. Bob only ever walks in the park, shops or cleans his flat, and which he picks depends on the weather. Alice never sees the sky over Bob's home, yet from his daily reports she can make a reasoned guess about it. That is a hidden Markov model.

The setup has two layers. Underneath runs a process you cannot see, here the weather flipping between rainy and sunny. On top sits something you can observe, Bob's activities, whose odds depend on the hidden state. The hidden layer obeys the Markov property: tomorrow's weather depends only on today's, not on the days before. In Alice's version there is just a 30% chance that a rainy day is followed by a sunny one, and over the long run the weather settles at about 57% rainy and 43% sunny.

Another picture uses a genie in a closed room full of urns, each holding a known mix of labelled balls. The genie picks an urn, draws a ball and places it on a conveyor belt. Which urn comes next depends only on a random number and on the urn just used. The observer sees the parade of balls but never the urns, and even knowing every urn's contents cannot be certain which one produced, say, the third ball, though some sequences are more likely than others.

Two sets of numbers define the model. Transition probabilities say how the hidden state moves from one step to the next, and those leaving any state must add up to one. Emission probabilities, also called output probabilities, say how likely each observation is in each hidden state. Observations can be discrete categories or continuous values drawn from a bell curve. The parameters can be estimated by maximum likelihood, and for chain-shaped models the Baum–Welch algorithm does the job.

The idea turns up well beyond weather puzzles, in speech and handwriting recognition, gesture recognition, part-of-speech tagging, following a musical score, finance and bioinformatics.

Source: Hidden Markov model

Related

More in Science · All topics