bregman.application.distribution.exponential_family.gaussian package

Submodules

bregman.application.distribution.exponential_family.gaussian.dissimilarity module

class bregman.application.distribution.exponential_family.gaussian.dissimilarity.GaussianFisherRaoDistance(manifold: GaussianManifold)

Bases: ApproxDissimilarity[GaussianManifold]

Approximate Fisher-Rao distance for Gaussian manifolds.

jeffreys_divergence

Jeffreys divergence for the Gaussian manifold.

dissimilarity(point_1: Point, point_2: Point, eps: float = 1e-05) ndarray

Calculate an approximate Fisher-Rao distance of points in the Gaussian manifold.

Parameters:
  • point_1 – Left-sided argument of the approximate Fisher-Rao distance.

  • point_2 – Right-sided argument of the approximate Fisher-Rao distance.

  • eps – Tolerance function used in Fisher-Rao distance approximation.

Returns:

Approximate Fisher-Rao distance between point_1 and point_2 in the Gaussian manifold.

bregman.application.distribution.exponential_family.gaussian.dissimilarity.isometric_SPD_embedding_calvo_oller(manifold: GaussianManifold, point: Point) ndarray

Calculates the Calvo-Oller SPD embedding for Gaussian distributions.

Parameters:
  • manifold – Gaussian manifold to calculate embedding.

  • point – Point to be embedded.

Returns:

Calvo-Oller SPD embedding of point.

bregman.application.distribution.exponential_family.gaussian.dissimilarity.scaled_riemannian_SPD_distance(P: ndarray, Q: ndarray) ndarray

Calculates the Riemannian distance for PSD matrices.

Parameters:
  • P – Left-side argument of the Riemannian distance for PSD matrices.

  • Q – Right-side argument of the Riemannian distance for PSD matrices.

Returns:

PSD Riemannian distance between P and Q.

bregman.application.distribution.exponential_family.gaussian.gaussian module

class bregman.application.distribution.exponential_family.gaussian.gaussian.GaussianDistribution(theta: ndarray, dimension: int)

Bases: ExponentialFamilyDistribution

Gaussian distributions as exponential family distributions.

dimension

Covariance shape dimension (i.e, d in dxd covariance matrix).

F(x: ndarray) ndarray

\(F(x) = \log \int \exp(\theta^T t(x)) \mathrm{d}x\) normalizer of the Gaussian distribution.

Parameters:

x – Parameter value.

Returns:

Normalizer of the Gaussian distribution evaluated at parameter value x.

static k(x: ndarray) ndarray

\(k(x)\) carrier measure of the Gaussian distribution.

Parameters:

x – Sample space input.

Returns:

Carries measure of the Gaussian distribution evaluated at x.

static t(x: ndarray) ndarray

\(t(x)\) sufficient statistics function of the Gaussian distribution.

Parameters:

x – Sample space input.

Returns:

Sufficient statistics function of the Gaussian distribution evaluated at x.

class bregman.application.distribution.exponential_family.gaussian.gaussian.GaussianDualGenerator(dimension: int)

Bases: AutoDiffGenerator

Gaussian manifold dual Bregman generator.

class bregman.application.distribution.exponential_family.gaussian.gaussian.GaussianManifold(input_dimension: int)

Bases: ExponentialFamilyManifold[GaussianPoint, GaussianDistribution]

Gaussian exponential family manifold.

input_dimension

Dimension of the sample space.

distribution_to_point(distribution: GaussianDistribution) GaussianPoint

Converts a Gaussian distribution to a point in the manifold.

Parameters:

distribution – Gaussian distribution to be converted.

Returns:

Point corresponding to the Gaussian distribution.

point_to_distribution(point: Point) GaussianDistribution

Converts a point to a Gaussian distribution.

Parameters:

point – Point to be converted.

Returns:

Gaussian distribution corresponding to the point.

class bregman.application.distribution.exponential_family.gaussian.gaussian.GaussianPoint(point: Point)

Bases: DisplayPoint

Display point for the Gaussian manifold.

property Sigma: ndarray

Covariance value from point data.

Returns:

Covariance of Gaussian distribution corresponding to the point.

property dimension: int

Covariance matrix shape dimension.

Returns:

Covariance shape dimension (i.e, d in dxd covariance matrix).

display() str

Generated pretty printed string on display.

Returns:

String of probability values of Gaussian point.

property mu: ndarray

Mean value from point data.

Returns:

Mean of Gaussian distribution corresponding to the point.

class bregman.application.distribution.exponential_family.gaussian.gaussian.GaussianPrimalGenerator(dimension: int)

Bases: AutoDiffGenerator

Gaussian manifold primal Bregman generator.

class bregman.application.distribution.exponential_family.gaussian.gaussian.UnivariateGaussianDistribution(theta: ndarray)

Bases: GaussianDistribution

Univariate Gaussian distribution as an exponential family distribution.

F(x: ndarray) ndarray

\(F(x) = \log \int \exp(\theta^T t(x)) \mathrm{d}x\) normalizer of the univariate Gaussian distribution.

Parameters:

x – Parameter value.

Returns:

Normalizer of the univariate Gaussian distribution evaluated at parameter value x.

static k(x: ndarray) ndarray

\(k(x)\) carrier measure of the univariate Gaussian distribution.

Parameters:

x – Sample space input.

Returns:

Carries measure of the univariate Gaussian distribution evaluated at x.

static t(x: ndarray) ndarray

\(t(x)\) sufficient statistics function of the univariate Gaussian distribution.

Parameters:

x – Sample space input.

Returns:

Sufficient statistics function of the univariate Gaussian distribution evaluated at x.

bregman.application.distribution.exponential_family.gaussian.geodesic module

class bregman.application.distribution.exponential_family.gaussian.geodesic.EriksenIVPGeodesic(manifold: GaussianManifold, dest: Point)

Bases: Geodesic[GaussianManifold]

Eriksen Initial value problem (IVP) geodesic from the identity Gaussian distribution (Isotropic centered Gaussian). Doesn’t provide a geodesic between source and destination points. Instead the destination point acts as an initial value problem vector.

dest_mu

IVP mean vector.

dest_Sigma

IVP covariance matrix.

dim

Sample space dimension.

path(t: float) Point

Eriksen IVP geodesic calculation.

Parameters:

t – Value in [0, 1] corresponding to the parameterization of the geodesic.

Returns:

Eriksen IVP geodesic from the centered Isotropic Gaussian.

class bregman.application.distribution.exponential_family.gaussian.geodesic.FisherRaoKobayashiGeodesic(manifold: GaussianManifold, source: Point, dest: Point)

Bases: Geodesic[GaussianManifold]

Fisher-Rao Geodesic on the Gaussian manifold using Kobayashi calculation.

source_mu

Source point’s mean value as a Gaussian distribution.

source_Sigma

Source point’s covariance value as a Gaussian distribution.

dest_mu

Destination point’s mean value as a Gaussian distribution.

dest_Sigma

Destination point’s covariance value as a Gaussian distribution.

dim

Sample space dimension.

path(t: float) Point

Evaluate the Fisher-Rao geodesic on the Gaussian manifold using Kobayashi’s approach.

Parameters:

t – Value in [0, 1] corresponding to the parameterization of the geodesic.

Returns:

Kobayashi’s Fisher-Rao geodesic evaluated at t.

bregman.application.distribution.exponential_family.gaussian.geodesic.real_fractional_matrix_power(matrix: ndarray, t: float) ndarray

Module contents