ECM#
- class ECM(breakpointers, pruners, optimizer)[source]#
Bases:
BaseEstimatorAn estimator that implements the Expectation-Conditional Maximization (ECM) algorithm.
This class encapsulates the logic for the ECM algorithm, a variant of the classic Expectation-Maximization (EM) algorithm. It constructs and executes a
Pipelineconsisting of an expectation step (ExpectationStep) and a conditional maximization step (MaximizationStep).The key feature of this ECM implementation is that the maximization (M-step) is partitioned into separate, smaller optimization problems—one for each component in the mixture. For each component, all of its optimizable (non-fixed) parameters are estimated simultaneously by maximizing the Q-function. This component-wise update simplifies the optimization process.
The overall fitting process can be customized with stopping criteria, component pruning strategies, and a numerical optimizer.
- Parameters:
breakpointers (Sequence[Breakpointer]) – A sequence of strategies that define the stopping conditions for the iterative process.
pruners (Sequence[Pruner]) – A sequence of strategies for removing (pruning) components from the mixture model during fitting.
optimizer (Optimizer) – A numerical optimizer instance used in the maximization step to find the optimal parameters.
- Variables:
breakpointers (list[Breakpointer]) – The list of objects that determine when the fitting process should terminate.
pruners (list[Pruner]) – The list of objects that may remove components from the mixture during the fitting process.
optimizer (Optimizer) – The numerical optimizer used for parameter estimation.
logger (IterationsHistory | None) – An object that collects information about each iteration. This attribute is only available after the
fit()method has been called. Accessing it beforehand will raise anAttributeError.
Methods
fit(X, mixture[, once_in_iterations])Fits the mixture model to the data using the ECM algorithm.