with_components#

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

Return a new mixture with all components replaced.

The already normalized log-weights are kept as is and shared with this mixture; only the length is checked.

Параметры:

components (Sequence[ParametricFamilyDistribution]) – The new components; must be as many as in this mixture.

Результат:

A new mixture; this mixture is left unchanged.

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

MixtureModel

Исключение:

ValueError – If the number of components differs from n_components.