MultiStartInitializer#
- class MultiStartInitializer(initializer, n_init)[исходный код]#
Базовые классы:
InitializerRuns another initializer several times and returns the start with the largest log-likelihood.
Run
igets childiofrng.spawn(n_init): an integer seed reproduces the whole multistart, andnumpy.random.default_rng(seed).spawn(i + 1)[i]reproduces one run. A passed generator advances only its counter of children, not its stream of numbers. Ties go to the earlier run.A run that raises
InitializationErroris skipped. If some runs fail, aRuntimeWarningreports how many and the last reason; if all fail,InitializationErroris raised with the last reason as its cause. Other exceptions pass through at once.- Параметры:
initializer (Initializer) – The initializer to repeat; its checks of the input and the result apply in every run.
n_init (int | numpy.integer) – The positive number of independent runs.
- Переменные:
initializer (Initializer) – The nested initializer, the same object that was passed to the constructor.
n_init (int) – The number of runs as
int.
- Исключение:
TypeError – If
initializeris not anInitializer.ValueError – If
n_initis not a positive integer.
Methods
initialize(X, families[, random_state])Build a starting mixture from the sample.