Machine Learning, Einsum, Python, Gaussian Mixture Model, Bioimaging.
matrix for each Gaussian component, was more verbose but also more conceptually straightforward: sigma_next = np.einsum("ni,nj->ij", (X - mu_next) * r[:, np.newaxis], X - mu_next) / N The indices to this einsum are fairly standard faire for matrix multiplication; the only wrinkle was the inclusion