GaussianMixtureModel¶
- class pycave.bayes.gmm.GaussianMixtureModel(config)[source]¶
Bases:
Configurable
[GaussianMixtureModelConfig
],Module
PyTorch module for a Gaussian mixture model.
Covariances are represented via their Cholesky decomposition for computational efficiency. The model does not have trainable parameters.
- Parameters:
config (
GaussianMixtureModelConfig
) -- The configuration to use for initializing the module's buffers.
Methods
Computes the log-probability of observing each of the provided datapoints for each of the GMM's components. |
|
Resets the parameters of the GMM. |
|
Samples the provided number of datapoints from the GMM. |
Inherited Methods
Loads the module's configurations and parameters from files in the specified directory at first. |
|
Saves the module's configuration and parameters to files in the specified directory. |
Attributes
|
The covariance matrices learnt for the GMM's components. |
|
The probabilities of each component, buffer of shape |
|
The means of each component, buffer of shape |
|
The precision matrices for the components' covariances, buffer with a shape dependent on the covariance type, see |