ott.tools.gaussian_mixture.fit_gmm.fit_model_em#
- ott.tools.gaussian_mixture.fit_gmm.fit_model_em(gmm, points, point_weights, steps, jit=True, verbose=False)[source]#
Fit a GMM using the EM algorithm.
- Parameters:
gmm (
GaussianMixture
) – initial GMM modelpoints (
Array
) – set of samples to fit, shape (n, n_dimensions)point_weights (
Optional
[Array
]) – optional set of weights for points, shape (n,). If None, uses equal weights for all points.steps (
int
) – number of steps of EM to performjit (
bool
) – if True, compile functionsverbose (
bool
) – if True, print the loss at each step
- Return type:
- Returns:
A GMM with updated parameters.