Spectral-Grassmann optimal transport for linear operators.
This module implements the Spectral-Grassmann Wasserstein framework for
comparing dynamical systems via their learned operator representations.
It provides tools to extract spectral “atoms” (eigenvalues and associated
eigenspaces) from linear operators and to compute an optimal transport metric
that combines a spectral term on eigenvalues with a Grassmannian term on
eigenspaces.
q (int or float, optional) – Exponent applied to the eigenvalue distance, default 1.
eigen_scaling (None or array-like of length 2, optional) – Scaling (real_scale, imag_scale) applied to eigenvalues before computing
distances. If None, defaults to (1.0, 1.0). Accepts tuple/list or
array/tensor with two entries.
nx (module, optional) – Backend (NumPy-compatible). If None, inferred from inputs.
Compute the SGOT cost matrix between two spectral decompositions.
This returns the discrete ground cost matrix used in the SGOT optimal transport
objective. Each spectral atom is \(z_i=(\lambda_i, V_i)\) where
\(\lambda_i \in \mathbb{C}\) is an eigenvalue and \(V_i\) is the
associated (bi-orthogonal) eigenspace point.
eigen_scaling (None or array-like of length 2, optional) – Scaling (real_scale,imag_scale) applied to eigenvalues before computing
\(C_\lambda\). If provided, eigenvalues are transformed as
\(\lambda \mapsto \alpha\operatorname{Re}(\lambda) + i\,\beta\operatorname{Im}(\lambda)\).
If None, defaults to (1.0,1.0). Accepts tuple/list or array/tensor with
two entries.
nx (module, optional) – Backend (NumPy-compatible). If None, inferred from inputs.
eps (float, optional) – Minimum value used for numerical stability in Grassmann distances and
Martin metric. Default is 1e-12.
Compute the SGOT metric between two spectral decompositions.
This function computes a discrete optimal transport problem between two measures
over spectral atoms \(z_i=(\lambda_i, V_i)\) and \(z'_j=(\lambda'_j, V'_j)\).
Using the ground cost matrix \(C = d^p\) returned by sgot_cost_matrix(),
we solve:
eigen_scaling (None or array-like of length 2, optional) – Scaling (real_scale,imag_scale) applied to eigenvalues before
computing the spectral cost. If None, defaults to (1.0,1.0).
Ws (array-like, shape (n_s,), optional) – Source weights. If None, uniform weights are used.
Wt (array-like, shape (n_t,), optional) – Target weights. If None, uniform weights are used.
nx (module, optional) – Backend (NumPy-compatible). If None, inferred from inputs.
q (int or float, optional) – Exponent applied to the eigenvalue distance, default 1.
eigen_scaling (None or array-like of length 2, optional) – Scaling (real_scale, imag_scale) applied to eigenvalues before computing
distances. If None, defaults to (1.0, 1.0). Accepts tuple/list or
array/tensor with two entries.
nx (module, optional) – Backend (NumPy-compatible). If None, inferred from inputs.
Compute the SGOT cost matrix between two spectral decompositions.
This returns the discrete ground cost matrix used in the SGOT optimal transport
objective. Each spectral atom is \(z_i=(\lambda_i, V_i)\) where
\(\lambda_i \in \mathbb{C}\) is an eigenvalue and \(V_i\) is the
associated (bi-orthogonal) eigenspace point.
eigen_scaling (None or array-like of length 2, optional) – Scaling (real_scale,imag_scale) applied to eigenvalues before computing
\(C_\lambda\). If provided, eigenvalues are transformed as
\(\lambda \mapsto \alpha\operatorname{Re}(\lambda) + i\,\beta\operatorname{Im}(\lambda)\).
If None, defaults to (1.0,1.0). Accepts tuple/list or array/tensor with
two entries.
nx (module, optional) – Backend (NumPy-compatible). If None, inferred from inputs.
eps (float, optional) – Minimum value used for numerical stability in Grassmann distances and
Martin metric. Default is 1e-12.
Compute the SGOT metric between two spectral decompositions.
This function computes a discrete optimal transport problem between two measures
over spectral atoms \(z_i=(\lambda_i, V_i)\) and \(z'_j=(\lambda'_j, V'_j)\).
Using the ground cost matrix \(C = d^p\) returned by sgot_cost_matrix(),
we solve:
eigen_scaling (None or array-like of length 2, optional) – Scaling (real_scale,imag_scale) applied to eigenvalues before
computing the spectral cost. If None, defaults to (1.0,1.0).
Ws (array-like, shape (n_s,), optional) – Source weights. If None, uniform weights are used.
Wt (array-like, shape (n_t,), optional) – Target weights. If None, uniform weights are used.
nx (module, optional) – Backend (NumPy-compatible). If None, inferred from inputs.