Grassmann Distances
The Grassmannian (or Riemannian) distance assigns a nonnegative value to measure distance between a pair of subspaces
\(\mathbf{X}_0, \mathbf{X}_1 \in \mathbb{R}^{n \times p}\) on the Grassmann manifold \(\mathcal{G}(p, n)\).
Formally, a Grassmann distance measures the length of the geodesic path connecting the two points on
\(\mathcal{G}(p, n)\) where all distances are a function of the principal angles between subspaces. UQpy
introduces various Grassmann distances derived from the principal angles [74].
Practically, the principal angles can be calculated from the singular value decomposition (SVD) of \(\mathbf{X}_0^T\mathbf{X}_1\), as
where \(\cos(\Theta)=\text{diag}(\cos\theta_1, \ldots,\cos\theta_p)\). This definition of distance can be extended to cases where \(\mathbf{X}_0\) and \(\mathbf{X}_1\) have different number of columns \(p\). More information can be found in [75].
GrassmannianDistance Class
The abstract UQpy.utilities.distances.baseclass.GrassmannianDistance class is the base class for all
Grassmannian distances in UQpy. It provides a blueprint for classes in the grassmannian_distances
module and allows the user to define a set of methods that must be created within any child classes built
from this abstract class.
- class GrassmannianDistance[source]
- calculate_distance_matrix(points, p_dim)[source]
Given a list of points that belong on a Grassmann Manifold, assemble the distance matrix between all points.
- Parameters:
points (
Union[list[ndarray],list[GrassmannPoint]]) – List of points belonging on the Grassmann Manifold. Either a list ofGrassmannPointor a list of orthonormalndarray.p_dim (
Union[list,ndarray]) – Number of independent p-planes of each Grassmann point.
The GrassmannianDistance class is imported using the following command:
>>> from UQpy.utilities.distances.baseclass.GrassmannianDistance import GrassmannianDistance
List of Available Distances
All the distances classes below are subclasses of the GrassmannianDistance class. New distances can be written
as subclasses having a compute_distance() method.
Asimov Distance
The Asimov distance between two subspaces defined by the orthonormal matrices, \(\mathbf{X}_0\) and \(\mathbf{X}_1\), is given by:
The AsimovDistance class is imported using the following command:
>>> from UQpy.utilities.distances.grassmannian_distances.AsimovDistance import AsimovDistance
One can use the following command to instantiate the AsimovDistance class.
- class AsimovDistance[source]
A class to calculate the Asimov distance between two Grassmann points.
- compute_distance(xi, xj)[source]
Compute the Asimov distance between two points on the Grassmann manifold.
- Parameters:
xi (
GrassmannPoint) – Orthonormal matrix representing the first point.xj (
GrassmannPoint) – Orthonormal matrix representing the second point.
- Return type:
Binet-Cauchy Distance
The Binet-Cauchy distance between two subspaces defined by the orthonormal matrices, \(\mathbf{X}_0\) and \(\mathbf{X}_1\), is given by:
The BinetCauchyDistance class is imported using the following command:
>>> from UQpy.utilities.distances.grassmannian_distances.BinetCauchyDistance import BinetCauchyDistance
One can use the following command to instantiate the BinetCauchyDistance class.
- class BinetCauchyDistance[source]
A class to calculate the Binet-Cauchy distance between two Grassmann points.
- compute_distance(xi, xj)[source]
Compute the Binet-Cauchy distance between two points on the Grassmann manifold.
- Parameters:
xi (
GrassmannPoint) – Orthonormal matrix representing the first point.xj (
GrassmannPoint) – Orthonormal matrix representing the second point.
- Return type:
Fubini-Study Distance
The Fubini-Study distance between two subspaces defined by the orthonormal matrices, \(\mathbf{X}_0\) and \(\mathbf{X}_1\), is given by:
The FubiniStudyDistance class is imported using the following command:
>>> from UQpy.utilities.distances.grassmannian_distances.FubiniStudyDistance import FubiniStudyDistance
One can use the following command to instantiate the FubiniStudyDistance class.
- class FubiniStudyDistance[source]
A class to calculate the Fubini-Study distance between two Grassmann points.
- compute_distance(xi, xj)[source]
Compute the Fubini-Study distance between two points on the Grassmann manifold.
- Parameters:
xi (
GrassmannPoint) – Orthonormal matrix representing the first point.xj (
GrassmannPoint) – Orthonormal matrix representing the second point.
- Return type:
Geodesic Distance
The Geodesic (or Arc-length) distance between two subspaces defined by the orthonormal matrices, \(\mathbf{X}_0\) and \(\mathbf{X}_1\), is given by:
The GeodesicDistance class is imported using the following command:
>>> from UQpy.utilities.distances.grassmannian_distances.GeodesicDistance import GeodesicDistance
One can use the following command to instantiate the class GeodesicDistance
- class GeodesicDistance[source]
A class to calculate the Geodesic distance between two Grassmann points.
- compute_distance(xi, xj)[source]
Compute the Geodesic distance between two points on the Grassmann manifold.
- Parameters:
xi (
GrassmannPoint) – Orthonormal matrix representing the first point.xj (
GrassmannPoint) – Orthonormal matrix representing the second point.
- Return type:
Martin Distance
The Martin distance between two subspaces defined by the orthonormal matrices, \(\mathbf{X}_0\) and \(\mathbf{X}_1\), is given by:
The MartinDistance class is imported using the following command:
>>> from UQpy.utilities.distances.grassmannian_distances.MartinDistance import MartinDistance
One can use the following command to instantiate the MartinDistance class.
- class MartinDistance[source]
A class to calculate the Martin distance between two Grassmann points.
- compute_distance(xi, xj)[source]
Compute the Martin distance between two points on the Grassmann manifold.
- Parameters:
xi (
GrassmannPoint) – Orthonormal matrix representing the first point.xj (
GrassmannPoint) – Orthonormal matrix representing the second point.
- Return type:
Procrustes Distance
The Procrustes distance between two subspaces defined by the orthonormal matrices, \(\mathbf{X}_0\) and \(\mathbf{X}_1\), is given by:
The ProcrustesDistance class is imported using the following command:
>>> from UQpy.utilities.distances.grassmannian_distances.ProcrustesDistance import ProcrustesDistance
One can use the following command to instantiate the ProcrustesDistance class.
- class ProcrustesDistance[source]
A class to calculate the Procrustes distance between two Grassmann points.
- compute_distance(xi, xj)[source]
Compute the Procrustes distance between two points on the Grassmann manifold.
- Parameters:
xi (
GrassmannPoint) – Orthonormal matrix representing the first point.xj (
GrassmannPoint) – Orthonormal matrix representing the second point.
- Return type:
Projection Distance
The Projection distance between two subspaces defined by the orthonormal matrices, \(\mathbf{X}_0\) and \(\mathbf{X}_1\), is given by:
The ProjectionDistance class is imported using the following command:
>>> from UQpy.utilities.distances.grassmannian_distances.ProjectionDistance import ProjectionDistance
One can use the following command to instantiate the ProjectionDistance class.
- class ProjectionDistance[source]
A class to calculate the Projection distance between two Grassmann points.
- compute_distance(xi, xj)[source]
Compute the Projection distance between two points on the Grassmann manifold.
- Parameters:
xi (
GrassmannPoint) – Orthonormal matrix representing the first point.xj (
GrassmannPoint) – Orthonormal matrix representing the second point.
- Return type:
Spectral Distance
The Spectral distance between two subspaces defined by the orthonormal matrices, \(\mathbf{X}_0\) and \(\mathbf{X}_1\), is given by:
The SpectralDistance class is imported using the following command:
>>> from UQpy.utilities.distances.grassmannian_distances.SpectralDistance import SpectralDistance
One can use the following command to instantiate the SpectralDistance class.
- class SpectralDistance[source]
A class to calculate the Spectral distance between two Grassmann points.
- compute_distance(xi, xj)[source]
Compute the Spectral distance between two points on the Grassmann manifold.
- Parameters:
xi (
GrassmannPoint) – Orthonormal matrix representing the first point.xj (
GrassmannPoint) – Orthonormal matrix representing the second point.
- Return type: