with_log_weights#

MixtureModel.with_log_weights(log_weights)[исходный код]#

Return a new mixture with the given log-weights.

The input is copied and normalized via log-softmax, exactly as the weights passed to the constructor.

Параметры:

log_weights (ArrayLike) – New logarithmic component weights; they are normalized, so they need not sum to one in log space.

Результат:

A new mixture; this mixture is left unchanged.

Тип результата:

MixtureModel

Исключение:

ValueError – If the length differs from n_components or the values cannot be normalized (all -inf, NaN or +inf).