zuko.flows.mixture¶
Mixture models.
Warning
This sub-module is deprecated and will be removed in the future. Use
zuko.mixtures instead.
Classes¶
Creates a Gaussian mixture model (GMM). |
Descriptions¶
- class zuko.flows.mixture.GMM(features, context=0, components=2, covariance_type='full', tied=False, epsilon=1e-06, **kwargs)¶
Creates a Gaussian mixture model (GMM).
\[p(X | c) = \sum_{i = 1}^K w_i(c) \, \mathcal{N}(X | \mu_i(c), \Sigma_i(c))\]Wikipedia
https://wikipedia.org/wiki/Mixture_model#Gaussian_mixture_model
- Parameters:
features (int) – The number of features.
context (int) – The number of context features.
components (int) – The number of components \(K\) in the mixture.
covariance_type (str) – The type of covariance matrix parameterization to use. One of
['full', 'diagonal', 'spherical'].tied (bool) – Whether to tie the covariance parameters across components.
epsilon (float) – A numerical stability term.
kwargs – Keyword arguments passed to
zuko.nn.MLP.
- initialize(x, strategy)¶
Initializes the components of the model.
Note
For more information on the clustering strategies see https://scikit-learn.org/dev/modules/mixture.html#choice-of-the-initialization-method