User Tools

Site Tools


cs401r_w2016:lab13

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
cs401r_w2016:lab13 [2016/02/08 23:16]
admin
cs401r_w2016:lab13 [2016/02/12 23:39]
admin
Line 29: Line 29:
  
 [[http://​hatch.cs.byu.edu/​courses/​stat_ml/​old_faithful.mat|Old Faithful dataset]] [[http://​hatch.cs.byu.edu/​courses/​stat_ml/​old_faithful.mat|Old Faithful dataset]]
 +
 +**The first thing you should is mean-center your data (ie, compute the mean of the data, then subtract that off from each datapoint).** ​ (If you don't do this, you'll get zero probabilities for all of your responsibilities,​ given the initial conditions discussed below.)
  
 The equations for implementing the EM algorithm are given in MLAPP 11.4.2.2 - 11.4.2.3. The equations for implementing the EM algorithm are given in MLAPP 11.4.2.2 - 11.4.2.3.
Line 36: Line 38:
   - Compute the responsibilities $r_{ik}$ (Eq. 11.27)   - Compute the responsibilities $r_{ik}$ (Eq. 11.27)
   - Update the mixing weights $\pi_k$ (Eq. 11.28)   - Update the mixing weights $\pi_k$ (Eq. 11.28)
-  - Update the means $\mu_k$ (Eq. 11.31) 
   - Update the covariances $\Sigma_k$ (Eq. 11.32)   - Update the covariances $\Sigma_k$ (Eq. 11.32)
 +  - Update the means $\mu_k$ (Eq. 11.31)
  
-Now, repeat until convergence.+Now, repeat until convergence.  Note that if you change the order of operations, you may get slightly difference convergences than the reference image.
  
 Since the EM algorithm is deterministic,​ and since precise initial conditions for your algorithm are given below, the progress of your algorithm should closely match the reference image shown above. Since the EM algorithm is deterministic,​ and since precise initial conditions for your algorithm are given below, the progress of your algorithm should closely match the reference image shown above.
cs401r_w2016/lab13.txt ยท Last modified: 2021/06/30 23:42 (external edit)