Code Monkey home page Code Monkey logo

understanding_the_em_algorithm's Introduction

Understanding the EM Algorithm

Example codes for my blog post: Understanding the EM Algorithm.

Example 1: Two coins

Find the probabilities of two coins A and B, given 5 coin tossing trials with missing information:

Trial ID Coin Result #heads / #tails
#1 Unknown HTTTHHTHTH 5/5
#2 Unknown HHHHTHHHHH 9/1
#3 Unknown HTHHHHHTHH 8/2
#4 Unknown HTHTTTHHTT 4/6
#5 Unknown THHHTHHHTH 7/3

Screen Shot 2021-08-23 at 12.16.15 AM

Example 2: Girls and boys (GMM)

Infer the gender of 6 students given their heights (Note: in real life, inferring one's gender based on their height might be a bad idea. This example is for educational purposes only):

Student ID Gender Height (cm)
#1 Unknown 168
#2 Unknown 180
#3 Unknown 170
#4 Unknown 172
#5 Unknown 178
#6 Unknown 176

Screen Shot 2021-08-23 at 9.13.02 PM

License

Distributed under the MIT License. See LICENSE for more information.

Contact

@mistylight - [email protected]

Acknowledgements

[1] What is the expectation maximization algorithm? Chuong B Do, Serafim Batzoglou. Nature, 2008. [paper]

[2] Expectation Maximization. Benjamin Bray. UMich EECS 545: Machine Learning course notes, 2016. [course notes]

[3] The EM algorithm. Tengyu Ma, Andrew Ng. Stanford CS 229: Machine Learning course notes, 2019. [course notes]

[4] Bayesian networks: EM algorithm. Stanford CS 221: Artificial Intelligence: Principles and Techniques slides, 2021. [slides]

[5] 如何感性地理解EM算法?工程师milter. 简书, 2017. [blog post]

[6] Coin Flipping and EM. Karl Rosaen, chansoo. UMich EECS 545: Machine Learning Materials. [Jupyter Notebook]

understanding_the_em_algorithm's People

Contributors

mistylight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rohitpandey13

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.