Initializer#

class Initializer[исходный код]#

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

Builds a starting MixtureModel from a sample and component families.

The initializer receives one family per component and returns the mixture from which EM starts. The common template method initialize() gives every implementation, including a user-provided one, the same guarantees: the input is checked, random_state is handled in one way, and the returned mixture is checked to be usable as the starting point of EM.

To write an initializer, inherit this class and implement _initialize; do not override initialize().

Methods

initialize(X, families[, random_state])

Build a starting mixture from the sample.