An implementation of the expectation-maximization algorithm for a mixture of gaussians