with_component#
- MixtureModel.with_component(index, component)[исходный код]#
Return a new mixture with the component at
indexreplaced.The log-weights are unchanged and shared with this mixture.
- Параметры:
index (int) – Index of the component to replace; negative indices are not supported.
component (ParametricFamilyDistribution) – The replacement component.
- Результат:
A new mixture; this mixture is left unchanged.
- Тип результата:
- Исключение:
IndexError – If
indexis outside[0, n_components - 1].