Introduction and Outline: Why would you want to use an HMM?
A free video tutorial from Lazy Programmer Team
Artificial Intelligence and Machine Learning Engineer
46 courses
640,964 students
Learn more from the full course
Unsupervised Machine Learning Hidden Markov Models in Python
HMMs for stock price analysis, language modeling, web analytics, biology, and PageRank.
09:48:13 of on-demand video • Updated August 2026
Understand and enumerate the various applications of Markov Models and Hidden Markov Models
Understand how Markov Models work
Write a Markov Model in code
Apply Markov Models to any sequence of data
Understand the mathematics behind Markov chains
Apply Markov models to language
Apply Markov models to website analytics
Understand how Google's PageRank works
Understand Hidden Markov Models
Write a Hidden Markov Model in Code
Write a Hidden Markov Model using Theano
Understand how gradient descent, which is normally used in deep learning, can be used for HMMs
English [Auto]
Everyone, and welcome to unsupervised machine learning, hidden Markov models in Python. In this lecture, you will learn what this course is about and I'll give you the ten thousand foot view of how this course is structured. Let's start with what are ECMS and why should you care? H.M.S. Have a long history in sequence modeling. So what is the sequence? Here are some real world practical examples in finance sequences. Are stock prices in stock returns? Financial analysts can use ACMS to model stock return volatility and also to try and predict future stock returns. And biology sequences are DNA string's, RNA strings and amino acid strings. Just like how we use the letters A to Z to communicate our written language. DNA molecules use the letters ATC and G to communicate the genetic code computational biologists can use. It comes to perform a sequence. Alignment's gene annotation and many other tasks in online marketing sequences can be used to model user behavior, for example, which pages they visit on your website. Using ACMS online marketers can optimize their websites and predict what users will do based on their previous actions. There is so many applications of ECMS that you should be absolutely convinced of their practicality. In addition to the examples I just described, H.M.S. have been used for speech recognition, natural language processing time series analysis and handwriting recognition. So what will we look at in this course, this course is about the fundamentals of ECMS in order to apply ECMS, the first step is to understand how they work in the first place. Clearly, in order to know what a hidden Markov model is, you have to know what a Markov model is. Therefore, the first section of this course will review Markov models and their applications. After we've looked at the Markov model, we will add on to that foundation by adding hidden states. This gives us the hidden Markov model. We'll start with the simplest kind of hidden Markov model, one with discrete observations. This will allow us to derive important H.M. algorithms. Specifically, these algorithms are called Forward, Backward, Viterbi and Bromwell. Now, obviously, you don't know what these are now, but you will by that point in the course, note that in this course, coding and implementing is equally as important as the theory itself. My motto is, if you can't implement it, then you don't understand it. To that end, you will implement everything you learn in this course. That is, after every theory lecture, there will be a corresponding code lecture. So, for example, you won't just learn about the mathematics behind Baum Welch. You will also learn how to implement it in code. After looking at the discrete observation H.M., we will then consider the continuous observation H.M.S.. This comes with its own challenges, which you will encounter when we reach that point in the course. Now, one very unique part of this course is that we are also going to implement ACMS using deep learning libraries in addition to just basic Python as the instructor of over 15 deep learning courses. I know how important deep learning is nowadays, which should be noted, is that these so-called deep learning libraries are not just for deep learning, but other machine learning models to ACMS are part of a wider set of models known as Bayesian networks. It turns out that Bayesian networks can be trained using gradient descent. And it just so happens that deep learning libraries were built specifically for making gradient descent easy. In this course, we will use V.A. intensive flow to popular deep learning libraries to implement ECMS. One advantage to using deep learning libraries is that they can take advantage of a use which makes your A.M. computations much faster than on your CPU. Finally, we'll look at some applications of H.M.S. Note that this is really the easy part when it comes to comes the hard part is actually building the gym itself, which is the main focus of this course, plugging data into your A.M. once it's already built. It's not that difficult, but it's a nice test to confirm that everything is working as expected in this course. Some example applications include text classification in parts of speech, tagging, parts of speech. Tagging is an important concept in natural language processing, and it will help you really understand how ACMS work.