fit#

ECM.fit(X, mixture, once_in_iterations=1)[source]#

Fits the mixture model to the data using the ECM algorithm.

This method sets up and runs an iterative pipeline to estimate the parameters of a given mixture model based on the input data. At each iteration, it performs an E-step and an M-step. The process repeats until one of the stopping criteria is met.

Parameters:
  • X (ArrayLike) – The input dataset for fitting the model.

  • mixture (MixtureModel) – The initial mixture model to be fitted.

  • once_in_iterations (int, optional) – The logging frequency. A value of n means logging occurs every n iterations. Defaults to 1.

Returns:

The mixture model with the estimated parameters.

Return type:

MixtureModel