Intro to Expectation-Maximization, K-Means, Gaussian Mixture Models with Python, Sklearn
/Post Outline
- Part 1 Recap
- Part 2 Goals
- Jupyter (IPython) Notebook
- References
part 1 recap
In part 1 of this series we got a feel for Markov Models, Hidden Markov Models, and their applications. We went through the process of using a hidden Markov model to solve a toy problem involving a pet dog. We concluded the article by going through a high level quant finance application of Gaussian mixture models to detect historical regimes.
part 2 goals
In this post, my goal is to impart a basic understanding of the expectation maximization algorithm which, not only forms the basis of several machine learning algorithms, including K-Means, and Gaussian mixture models, but also has lots of applications beyond finance. We will also cover the K-Means algorithm which is a form of EM, and its weaknesses. Finally we will discuss how Gaussian mixture models improve on several of K-Means weaknesses.
This post is structured as a Jupyter (IPython) Notebook. I used several different resources\references and tried to give proper credit. Please contact me if you find errors, have suggestions, or if any sources were not attributed correctly.
Click here to view this notebook directly on NBviewer.jupyter.org
Click here to view this notebook directly on NBviewer.jupyter.org
References
- Python Data Science Handbook by Jake Vanderplas
- Python Machine Learning by Sebastian Raschka
- https://www.slideshare.net/petitegeek/expectation-maximization-and-gaussian-mixture-models
- https://www.slideshare.net/duluthted/emnlp01-em-slides
- http://scikit-learn.org/stable/modules/mixture.html
- http://condor.depaul.edu/ntomuro/courses/578/assign/finalprojfiles/samplepaper2.pdf
- https://www.youtube.com/watch?v=REypj2sy_5U&list=PLBv09BD7ez_4e9LtmK626Evn1ion6ynrt&index=1
Disclosure:
I receive a small commission from Amazon if any of the above books are purchased using a link from my website.