mixle.experimental.ot_geometry moduleΒΆ

Validated Bures geometry and mass-splitting component transport for Gaussian mixtures.

The Gaussian metric and barycenter use symmetric eigendecompositions, explicit covariance validation, and a converged fixed-point iteration. Gaussian-mixture barycenters are solved as a symmetric multi-marginal linear program over tuples of component atoms. Unlike one-to-one matching against a privileged first mixture, this formulation permits mass splitting, supports unequal component counts, and is invariant to input/component ordering after canonicalization.

The mixture construction is a Wasserstein barycenter in the discrete space of Gaussian components under the squared Bures-Wasserstein ground metric. It is not a claim that component-restricted transport equals unrestricted transport between the corresponding continuous mixture densities.

class MixtureBarycenterReceipt(solver, solver_status, solver_message, objective, joint_atom_count, positive_transport_atoms, output_components, max_marginal_error, mass_error, input_component_counts)[source]

Bases: object

Optimization and marginal-conservation evidence for a component barycenter.

Parameters:
  • solver (str)

  • solver_status (int)

  • solver_message (str)

  • objective (float)

  • joint_atom_count (int)

  • positive_transport_atoms (int)

  • output_components (int)

  • max_marginal_error (float)

  • mass_error (float)

  • input_component_counts (tuple[int, ...])

bures_distance_sq(cov1, cov2)[source]

Squared Bures distance between two positive-definite covariance matrices.

Parameters:
Return type:

float

bures_wasserstein_params(mean1, cov1, mean2, cov2)[source]

Exact W2 between two non-degenerate Gaussian distributions.

Parameters:
Return type:

float

bures_wasserstein(g1, g2)[source]

Exact W2 between two supported Mixle Gaussian distributions.

Parameters:
Return type:

float

gaussian_barycenter_params(means, covs, weights=None, *, max_iter=100, tol=1e-10)[source]

Converged Bures barycenter parameters using the standard covariance fixed-point map.

Parameters:
Return type:

tuple[ndarray, ndarray]

gaussian_barycenter(gaussians, weights=None)[source]

Bures barycenter of supported Mixle Gaussians.

Parameters:
Return type:

Any

mixture_barycenter_with_receipt(mixtures, weights=None, *, max_joint_atoms=100_000, mass_tolerance=1e-9)[source]

Solve the symmetric mass-splitting Gaussian-component Wasserstein barycenter.

Parameters:
Return type:

tuple[MixtureDistribution, MixtureBarycenterReceipt]

mixture_barycenter(mixtures, weights=None, *, max_joint_atoms=100_000, mass_tolerance=1e-9)[source]

Return the mass-splitting component-Wasserstein barycenter.

Use mixture_barycenter_with_receipt() when solver and conservation evidence is required.

Parameters:
Return type:

MixtureDistribution