That’s “HMM” as in Hidden Markov Models, not as in “hmm I’m wondering why I never liked math at High School?”
HMMs are an impressive and “easier to understand” approach to machine learning. Basically, by measuring the probability of observable state changes (e.g. your friend telling you what he did on the weekend) you can infer the likelihood of unobservable events (e.g. what the weather was like).
Example:
If your friend tells you he did this for the last few weekends … Watch TVĀ -> Play Football -> Watch TV -> Clean House.
HMMs helps us work out what the weather will probably be at the end of the chain … Rainy -> Sunny -> Rainy -> ???.
In other words, we can work out the probabilities of events we cannot see or observe (this is the “hidden” in Hidden Markov Models) based on related observable events.
Like any machine learning approach, you need something to “learn” from - in other words, training data. From the training data, the probabilistic relationship between the observable and unobservable events is calculated. However, these are not a simple one-to-one relationships. Rather, HMMs look at the “chain” of state changes leading to the currently observed state. In fact, the observable state changes in a Hidden Markov Model are called “Markov Chains”.
Okay, so it’s a teensy bit more complex than explained, but when rendered as Ruby code, I find it easier to understand. Check out the HMM Ruby Quiz and also Markov Chains in Ruby. These are examples of working code in under 50 or so lines. Also, for a clear if somewhat “mathy” explanation of Hidden Markov Processes and Markov Chains, check out Wikipedia’s HMM article.
Conceptually, I found HMMs easier to grasp than Neural Networks. If you’re interested, here are some more cool resources on machine learning. Kudos to Ilya Grigorik for putting my high school math teachers to shame with his easy to understand tutorials.
* Decision Tree Learning
* Bayes Classification
* Support Vector Machines
Despite what you probably think of me right now, I am still in the process of my “math re-nerdification”. I hope to post a more graphical explanation in the future, to help people like me, who hate mathematical notation.
Leave a Reply