LikelihoodBreakpointer#

class LikelihoodBreakpointer(threshold)[исходный код]#

Базовые классы: Breakpointer

Stops the pipeline when the log-likelihood of the mixture converges.

This breakpointer terminates the iterative estimation process when the absolute difference between the current and previous log-likelihood values falls below a specified threshold:

\[|L_{t+1} - L_t| < threshold\]

Only observations whose mixture log-density is not -inf contribute to the sum. Consecutive sums are compared only when the same observations contribute; a changed support mask establishes a new comparison baseline. Thus, this sum can be finite even when mixture.loglikelihood(X) is -inf because that method includes observations outside the support.

An empty support or a non-finite sum emits a RuntimeWarning and stops the pipeline. The stored sum and support mask are cleared only by reset(), which Pipeline.fit() calls before every fitting run.

Параметры:

threshold (Scalar) – The convergence threshold for the log-likelihood difference. Must be a positive number.

Переменные:

threshold (Scalar) – The convergence threshold.

Исключение:

ValueError – If threshold is not greater than 0.

Methods

check(state)

Check convergence of the log-likelihood over supported observations.

reset()

Clear the stored likelihood baseline and support mask.