ott.tools.gaussian_mixture.gaussian_mixture.GaussianMixture

Contents

ott.tools.gaussian_mixture.gaussian_mixture.GaussianMixture#

class ott.tools.gaussian_mixture.gaussian_mixture.GaussianMixture(loc, scale_params, component_weight_ob)[source]#

Gaussian Mixture model.

Parameters:
  • loc (Array) –

  • scale_params (Array) –

  • component_weight_ob (Probabilities) –

Methods

components()

List of all GMM components.

conditional_log_prob(x)

Compute the component-conditional log probability of x.

from_mean_cov_component_weights(mean, cov, ...)

Construct a GMM from means, covariances, and component weights.

from_points_and_assignment_probs(points, ...)

Estimate a GMM from points and a set of component probabilities.

from_random(rng, n_components, n_dimensions)

Construct a random GMM.

get_component(index)

Specified GMM component.

get_log_component_posterior(x)

Compute the posterior probability that x came from each component.

has_nans()

rtype:

bool

log_component_weights()

Log component weights probabilities.

log_prob(x)

Compute the log probability of the observations x.

sample(rng, size)

Generate samples from the distribution.

Attributes

cholesky

Cholesky decomposition of the GMM covariance matrices.

component_weight_ob

Component weight object.

component_weights

Component weights probabilities.

covariance

Covariance matrices of the GMM.

dtype

Dtype of the GMM parameters.

loc

Location parameters of the GMM.

n_components

Number of components of the GMM parameters.

n_dimensions

Number of dimensions of the GMM parameters.

scale_params

Scale parameters of the GMM.