1. Learn
  2. /
  3. Courses
  4. /
  5. Mixture Models in R

Exercise

Apply the two steps

Since you have created the functions expectation and maximization, you can now apply the EM algorithm to a data frame.

The objective in this exercise is to find two Gaussian clusters in the data gaussian_sample. Assume both sd are equal to 10.

Instructions

100 XP
  • Start with the guess that one of the clusters has a mean of 0 and the other 100. Use the functions expectation and maximization to create a list, new_values.
  • Save these values into the vector means_init. Consider the proportions are equal in the vector props_init.
  • Go through 10 iterations.