EM algorithm (expected maximum algorithm) implementation