Below is an implementation of EM Algorithm in Octave:

*Tips: *

*Replace the inverse function with pinv if you get machine precision errors.**r2 is the meanÂ matrix for both clusters.**data_cluster_1_cov is the covariance matrix for first cluster whereas data_cluster_2_cov is the covariance matrix for second cluster.**h is the labelÂ matrix for both clusters.*

Advertisements