ott.tools.gaussian_mixture.gaussian.Gaussian

Contents

ott.tools.gaussian_mixture.gaussian.Gaussian#

class ott.tools.gaussian_mixture.gaussian.Gaussian(loc, scale)[source]#

Normal distribution.

Parameters:
  • loc (Array) –

  • scale (ScaleTriL) –

Methods

covariance()

Covariance of the Gaussian.

f_potential(dest, points)

Optimal potential for W2 distance between Gaussians.

from_mean_and_cov(mean, cov)

Construct a Gaussian from a mean and covariance.

from_random(rng, n_dimensions[, stdev_mean, ...])

Construct a random Gaussian.

from_samples(points[, weights])

Construct a Gaussian from weighted samples.

from_z(z)

Transform \(z\) to \(x = loc + scale \cdot z\).

log_prob(x)

Log probability for a Gaussian with a diagonal covariance.

sample(rng, size)

Generate samples from the distribution.

to_z(x)

Transform \(x\) to \(z = \frac{x - loc}{scale}\).

transport(dest, points)

Transport points according to map between two Gaussian measures.

w2_dist(other)

Wasserstein distance \(W_2^2\) to another Gaussian.

Attributes

loc

Mean of the Gaussian.

n_dimensions

Dimensionality of the Gaussian.

scale

Scale of the Gaussian.