Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
×

# Learning group em - 20171025 - copy

57 views

Published on

EM algorithm and GMM

Published in: Technology
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

### Learning group em - 20171025 - copy

1. 1. The Expectation Maximization Algorithm Presenter: Shuai Zhang, CSE, UNSW
2. 2. Content β’ Introduction β’ Preliminary β’ EM-Algorithm β’ Example: Gaussian Mixture Model
3. 3. Introduction EM, is one of the top 10 data mining algorithms The other nine are: C4.5, k-means, SVM, Apriori, PageRank, AdaBoost, kNN, NaΓ―ve Bayes, and CART It is a popular tool in statistical estimation problems involving incomplete data, and mixture estimation . The EM algorithm is an efficient iterative procedure to compute the maximum likelihood (ML) estimate in the presence of missing or hidden data.
4. 4. Preliminary Definition 1: Let π be a real valued function defined on an interval I β π, π , π is said to be convex on πΌ if βπ₯1, π₯2 β πΌ, π β 0,1 , π ππ₯1 + 1 β π π₯2 β€ ππ π₯1 + 1 β π π π₯2 π is said to be strictly convex if the inequality is strict.
5. 5. Preliminary Intuitively, this definition states that the function falls below or is never above the straight line from points (π₯1, π π₯1 to (π₯2, π π₯2
6. 6. Preliminary Definition 2: π is concave if βπ is convex Definition 3: If π x is twice differentiable on π, π and πβ²β² π₯ β₯ 0 on π, π then π(π₯) is convex on π, π .
7. 7. Preliminary Definition 4: Jensenβs inequality, Let π be a convex function defined on an interval πΌ. If π₯1, π₯2, β¦ , π₯ π β πΌ πππ π1, π2, β¦ , π π β₯ 0 π€ππ‘β π=1 π ππ = 1, π( π=1 π ππ π₯π) β€ π=1 π ππ π(π₯π) Proof: For π = 1, this is trivial For π = 2, this corresponds to the definition of convexity. TBCβ¦ Induction
8. 8. Preliminary Assume the theorem is true for some π then, we need to proof for π + 1 this equation still holds. We have π=1 π+1 ππ = 1, this is important! π( π=1 π+1 ππ π₯π) = π(π π+1 π₯ π+1 + π=1 π ππ π₯π) = π(π π+1 π₯ π+1 + 1 β π π+1 1 1βπ π+1 π=1 π ππ π₯π) β€ π π+1 π π₯ π+1 + 1 β π π+1 π( 1 1βπ π+1 π=1 π ππ π₯π) = π π+1 π π₯ π+1 + 1 β π π+1 π( π=1 π π π 1βπ π+1 π₯π) TBC
9. 9. Preliminary β€ π π+1 π π₯ π+1 + 1 β π π+1 π=1 π π π 1βπ π+1 π(π₯π) = π π+1 π π₯ π+1 + π=1 π ππ π(π₯π) = π=1 π+1 ππ π(π₯π) JE provides a simple proof that the arithmetic mean is greater than or equal to the geometric mean. Because π=1 π π π 1βπ π+1 = 1, we set ππ = π π 1βπ π+1
10. 10. Preliminary A useful example is natural log function ln π₯ , as it is concave, so we have ππ( π=1 π ππ π₯π) β€ π=1 π ππ ππ(π₯π) We will use this inequality in the derivation of the EM algorithm.
11. 11. The EM algorithm Two steps: β’ E-step, the missing data are estimated given the observed data and current estimate of the model parameters. β’ M-step, the likelihood function is maximized under the assumption that the missing data are known! Convergence is assured since the algorithm is guaranteed to increase the likelihood at each iteration.
12. 12. The EM algorithm Maximize π π π , estimate the parameter π Equally, we maximize the log likelihood, πΏ π = ln π(π|π) Assume that after π π‘β iteration the current estimate for π is given by π π. We wish to compute an updated estimate π such that πΏ π > πΏ π π Equivalently, we need to maximize the difference, πΏ π β πΏ π π = ln π π π β ln π(π|π π)
13. 13. The EM algorithm Sometimes, π π π is intractable, so we will introduce some latent variables, We denote by π§ the latent variable. We can rewrite π π π as: π π π = π§ π π π§, π P z π Then, we have πΏ π β πΏ π π = ln π§ π(π|π§, π) π π§ π β ln π(π|π π)
14. 14. The EM algorithm πΏ π β πΏ π π = ln π§ π(π|π§, π) π π§ π β ln π(π|π π) = ln π§ π(π|π§, π) π π§ π π(π§|π, π π) π(π§|π, π π) β ln π(π|π π) = ln π§ π(π§|π, π π) π(π|π§, π)π(π§|π) π(π§|π, π π) β ln π(π|π π) β₯ π§ π(π§|π, π π) ln( π π π§, π π π§ π π π§ π, π π ) β ln π(π|π π) = π§ π π§ π, π π ln π π π§, π π π§ π π π§ π, π π π(π|π π) β β(π|π π)
15. 15. The EM algorithm So, πΏ π β₯ πΏ π π + β π π π For convenience, we define: π π π π β πΏ π + β π π π So we have, πΏ π β₯ π π π π
16. 16. The EM algorithm We also observe that, π π π π π = πΏ π π + β π π π π = πΏ π π + π§ π π§ π, π π ln π π π§, π π π π§ π π π π§ π, π π π(π|π π) = πΏ π π + π§ π π§ π, π π ln π π, π§ π π π π, π§ π π = πΏ π π For π = π π, the function π π π π and πΏ π are equal.
17. 17. The EM algorithm From the following two equations: πΏ π β₯ π π π π π π π π π = πΏ π π Any π which increases π π π π will finally increase πΏ π The EM algorithm calls for selecting π such that π π π π is maximized, we denote the update value as π π+1
18. 18. The EM algorithm
19. 19. The EM algorithm π π+1 = πππmax π {π π π π } = πππmax π {πΏ π π + π§ π π§ π, π π ln π π π§, π π π§ π π π§ π, π π π(π|π π) } = πππmax π { π§ π π§ π, π π ln π π π§, π π π§ π } = πππmax π { π§ π π§ π, π π ln π π, π§, π π π§, π π π§, π π π } = πππmax π π§ π π§ π, π π ln π π, π§ π = πππmax π πΈ π|π,π {ln π π, π§ π }
20. 20. The EM algorithm E-step: Determine the conditional expectation πΈ π|π,π {ln π π, π§ π } M-step: Maximize this expression w.r.t π One problem of EM algorithm, it can converge to a local minama or saddle points.
21. 21. Example: Gaussian Mixture Model Gaussian Mixture Model has the following form: π π π₯ = π=π πΎ π€ π 1 2π π/2 Ξ£ 1/2 exp(β 1 2 x β π π π Ξ£β1 π₯ β π π ) A mixture of πΎ gaussians, π€ π is the weight of the π π‘β Gaussian component (mixture coefficient).
22. 22. Example: Gaussian Mixture Model
23. 23. Example: Gaussian Mixture Model Suppose we observe π₯1, π₯2, β¦ π₯π β¦ π₯ π as samples from a mixture of Gaussians. Suppose we augment with the latent variable π§ππ (π = 1, β¦ π; π = 1, β¦ π) that indicates which of the π Gaussians our observation π₯π came from. Recall that we need to determine the conditional expectation. πΈ π|π,π {ln π π, π§ π }
24. 24. Example: Gaussian Mixture Model E-step: We first compute the posterior of latent variable π§. From Bayes rule, we have: π π π§π = π π₯π = π π§π = π π π(π₯π|π§π = π) π π π₯π = π€π π(π₯π|π π, Ξ£π) π=1 πΎ π€π π(π₯π|ππ, Ξ£π) Where, π€π = π π π , Interpret Nπ as the effective number of points assigned to cluster π.
25. 25. Example: Gaussian Mixture Model M-step: Re-estimate the parameters: π π+1 = πππmax π π π π§π = π π₯π, π π ln π=1 π π π₯π, π§π = π π π π π, π§ π } = π=1 π π π₯π, π§π = π π π = π=1 π π π₯π π§π = π, π π π π§π = π π π = π=1 π π€π π©(π π, Ξ£π) πΈ π|π,π {ln π π, π§ π } π©(π π, Ξ£π) π€π
26. 26. Example: Gaussian Mixture Model π π+1 = πππmax π π π π§π = π π₯π, π π ln π=1 π π€π π©(π π, Ξ£π) = πππmax π π=1 π π ln(π€π π©(π π, Ξ£π) π π§π = π π₯π, π π = πππmax π π=1 π π ln(π€π) π π§π = π π₯π, π π + π=1 π π ln(π©(π π, Ξ£π)) π π§π = π π₯π, π π
27. 27. Example: Gaussian Mixture Model E-step: πΈ π§ππ = π π π§π = π π₯π M-step: π π = π=1 π πΈ π§ππ π₯π π=1 π πΈ π§ππ ; π€π = π=1 π πΈ π§ππ π₯π π=1 π πΈ π§ππ Ξ£π = π=1 π πΈ π§ππ { π₯π β π π π (π₯π β π π)} π=1 π πΈ π§ππ
28. 28. Example: Gaussian Mixture Model
29. 29. Example: Gaussian Mixture Model
30. 30. Example: Gaussian Mixture Model
31. 31. References 1. Wu, Xindong, et al. "Top 10 algorithms in data mining." Knowledge and information systems 14.1 (2008): 1- 37. 2. http://blog.csdn.net/u014157632/article/details/65442165 3. http://www.cse.iitm.ac.in/~vplab/courses/DVP/PDF/gmm.pdf 4. http://www-staff.it.uts.edu.au/~ydxu/ml_course/em.pdf 5. http://people.csail.mit.edu/dsontag/courses/ml12/slides/lecture21.pdf 6. https://www.cs.utah.edu/~piyush/teaching/EM_algorithm.pdf 7. Machine Learning, zhihua zhou
32. 32. Thanks!
33. 33. Last Week β’ Implement the WRMF and Lrec under our framework with side information β’ Our research goal is to investigate the efficacy of incorporating multi-faceted side information with our framework β’ There are a lot of ways to embed side information β’ Do not have a sure answer yet if the side information can improve the original model β’ Deep learning for recommender systems, the magazine paper β’ Prepare the learning group
34. 34. This Week β’ Adjust our model and conduct experiments β’ The magazine paper β’ Prepare for the slides for next weekβs talk in RMIT (Mark Sandersonβs Group)