1 / 71

CSE 5290: Algorithms for Bioinformatics Fall 2011

CSE 5290: Algorithms for Bioinformatics Fall 2011. Suprakash D at ta datta@cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cse.yorku.ca/course/5290. Next. Clustering revisited: Expectation Maximization, and Gaussian mixture model fitting

brendaprice
Download Presentation

CSE 5290: Algorithms for Bioinformatics Fall 2011

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSE 5290:Algorithms for Bioinformatics Fall 2011 Suprakash Datta datta@cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cse.yorku.ca/course/5290 CSE 5290, Fall 2011

  2. Next Clustering revisited: Expectation Maximization, and Gaussian mixture model fitting Some of the following slides are based on slides by Christopher M. Bishop, Microsoft Research, http://research.microsoft.com/~cmbishop CSE 5290, Fall 2011

  3. Old Faithful CSE 5290, Fall 2011

  4. Old Faithful Data Set Time betweeneruptions (minutes) Duration of eruption (minutes) CSE 5290, Fall 2011

  5. K-means Algorithm • Goal: represent a data set in terms of K clusters each of which is summarized by a prototype • Initialize prototypes, then iterate between two phases: • E-step: assign each data point to nearest prototype • M-step: update prototypes to be the cluster means • Simplest version is based on Euclidean distance • re-scale Old Faithful data CSE 5290, Fall 2011

  6. CSE 5290, Fall 2011

  7. CSE 5290, Fall 2011

  8. CSE 5290, Fall 2011

  9. CSE 5290, Fall 2011

  10. CSE 5290, Fall 2011

  11. CSE 5290, Fall 2011

  12. CSE 5290, Fall 2011

  13. CSE 5290, Fall 2011

  14. CSE 5290, Fall 2011

  15. Responsibilities • Responsibilities assign data points to clusterssuch that • Example: 5 data points and 3 clusters CSE 5290, Fall 2011

  16. data prototypes responsibilities K-means Cost Function CSE 5290, Fall 2011

  17. Minimizing the Cost Function • E-step: minimize w.r.t. • assigns each data point to nearest prototype • M-step: minimize w.r.t • gives • each prototype set to the mean of points in that cluster • Convergence guaranteed since there is a finite number of possible settings for the responsibilities CSE 5290, Fall 2011

  18. Evolution of J CSE 5290, Fall 2011

  19. Limitations of K-means • Hard assignments of data points to clusters – small shift of a data point can flip it to a different cluster • Not clear how to choose the value of K • Solution: replace ‘hard’ clustering of K-means with ‘soft’ probabilistic assignments • Represents the probability distribution of the data as a Gaussian mixture model CSE 5290, Fall 2011

  20. covariance mean The Gaussian Distribution • Multivariate Gaussian • Define precision to be the inverse of the covariance • In 1-dimension CSE 5290, Fall 2011

  21. Likelihood Function • Data set • Assume observed data points generated independently • Viewed as a function of the parameters, this is known as the likelihood function CSE 5290, Fall 2011

  22. Maximum Likelihood • Set the parameters by maximizing the likelihood function • Equivalently maximize the log likelihood CSE 5290, Fall 2011

  23. Maximum Likelihood Solution • Maximizing w.r.t. the mean gives the sample mean • Maximizing w.r.t covariance gives the sample covariance CSE 5290, Fall 2011

  24. Bias of Maximum Likelihood • Consider the expectations of the maximum likelihood estimates under the Gaussian distribution • The maximum likelihood solution systematically under-estimates the covariance • This is an example of over-fitting CSE 5290, Fall 2011

  25. Intuitive Explanation of Over-fitting CSE 5290, Fall 2011

  26. Unbiased Variance Estimate • Clearly we can remove the bias by usingsince this gives • Arises naturally in a Bayesian treatment • For an infinite data set the two expressions are equal CSE 5290, Fall 2011

  27. Gaussian Mixtures • Linear super-position of Gaussians • Normalization and positivity require • Can interpret the mixing coefficients as prior probabilities CSE 5290, Fall 2011

  28. Example: Mixture of 3 Gaussians CSE 5290, Fall 2011

  29. Contours of Probability Distribution CSE 5290, Fall 2011

  30. Sampling from the Gaussian • To generate a data point: • first pick one of the components with probability • then draw a sample from that component • Repeat these two steps for each new data point CSE 5290, Fall 2011

  31. Synthetic Data Set CSE 5290, Fall 2011

  32. Fitting the Gaussian Mixture • We wish to invert this process – given the data set, find the corresponding parameters: • mixing coefficients • means • covariances • If we knew which component generated each data point, the maximum likelihood solution would involve fitting each component to the corresponding cluster • Problem: the data set is unlabelled • We shall refer to the labels as latent (= hidden) variables CSE 5290, Fall 2011

  33. Synthetic Data Set Without Labels CSE 5290, Fall 2011

  34. Posterior Probabilities • We can think of the mixing coefficients as prior probabilities for the components • For a given value of we can evaluate the corresponding posterior probabilities, called responsibilities • These are given from Bayes’ theorem by CSE 5290, Fall 2011

  35. Posterior Probabilities (colour coded) CSE 5290, Fall 2011

  36. Posterior Probability Map CSE 5290, Fall 2011

  37. Maximum Likelihood for the GMM • The log likelihood function takes the form • Note: sum over components appears inside the log • There is no closed form solution for maximum likelihood CSE 5290, Fall 2011

  38. Over-fitting in GMM • Singularities in likelihood function when a component ‘collapses’ onto a data point:then consider • Likelihood function gets larger as we add more components (and hence parameters) to the model • not clear how to choose the number K of components CSE 5290, Fall 2011

  39. Problems and Solutions • How to maximize the log likelihood • solved by expectation-maximization (EM) algorithm • How to avoid singularities in the likelihood function • solved by a Bayesian treatment • How to choose number K of components • also solved by a Bayesian treatment Will not cover Will not cover CSE 5290, Fall 2011

  40. EM Algorithm – Informal Derivation • Let us proceed by simply differentiating the log likelihood • Setting derivative with respect to equal to zero givesgivingwhich is simply the weighted mean of the data CSE 5290, Fall 2011

  41. EM Algorithm – Informal Derivation II • Similarly for the covariances • For mixing coefficients use a Lagrange multiplier to give CSE 5290, Fall 2011

  42. EM Algorithm – Informal Derivation III • The solutions are not closed form since they are coupled • Suggests an iterative scheme for solving them: • Make initial guesses for the parameters • Alternate between the following two stages: • E-step: evaluate responsibilities • M-step: update parameters using ML results CSE 5290, Fall 2011

  43. CSE 5290, Fall 2011

  44. CSE 5290, Fall 2011

  45. CSE 5290, Fall 2011

  46. CSE 5290, Fall 2011

  47. CSE 5290, Fall 2011

  48. CSE 5290, Fall 2011

  49. EM – Latent Variable Viewpoint • Binary latent variables describing which component generated each data point • If we knew the values for the LV, we would maximize the complete-data log likelihood • which gives a trivial closed-form solution (fit each component to the corresponding set of data points) • We don’t know the values of the LV • However, for given parameter values we can compute the expected values of the LV CSE 5290, Fall 2011

  50. Expected Value of Latent Variable • From Bayes’ theorem CSE 5290, Fall 2011

More Related