Generalized Grassmann
Manifolds.GeneralizedGrassmann β Type
GeneralizedGrassmann{π½,T,TB<:AbstractMatrix} <: AbstractDecoratorManifold{π½}The generalized Grassmann manifold $\operatorname{Gr}(n,k,B)$ consists of all subspaces spanned by $k$ linear independent vectors $π½^n$, where $π½ β \{β, β\}$ is either the real- (or complex-) valued vectors. This yields all $k$-dimensional subspaces of $β^n$ for the real-valued case and all $2k$-dimensional subspaces of $β^n$ for the second.
The manifold can be represented as
\[\operatorname{Gr}(n, k, B) := \bigl\{ \operatorname{span}(p)\ \big|\ p β π½^{nΓk}, p^\mathrm{H}Bp = I_k\},\]
where $β
^{\mathrm{H}}$ denotes the complex conjugate (or Hermitian) transpose and $I_k$ is the $kΓk$ identity matrix. This means, that the columns of $p$ form an unitary basis of the subspace with respect to the scaled inner product, that is a point on $\operatorname{Gr}(n,k,B)$, and hence the subspace can actually be represented by a whole equivalence class of representers. For $B=I_n$ this simplifies to the Grassmann manifold.
The tangent space at a point (subspace) $p$ is given by
\[T_p\mathrm{Gr}(n,k,B) = \bigl\{ X β π½^{nΓk} : p^{\mathrm{H}}BX = 0_{k} \bigr\},\]
where $0_{k}$ denotes the $kΓk$ zero matrix.
Note that a point $p β \operatorname{Gr}(n,k,B)$ might be represented by different matrices (i.e. matrices with $B$-unitary column vectors that span the same subspace). Different representations of $p$ also lead to different representation matrices for the tangent space $T_p\mathrm{Gr}(n,k,B)$
The manifold is named after Hermann G. GraΓmann (1809-1877).
Constructor
GeneralizedGrassmann(n, k, B=I_n, field=β; parameter::Symbol=:type)Generate the (real-valued) Generalized Grassmann manifold of $nΓk$ dimensional orthonormal matrices with scalar product B.
Base.exp β Method
exp(M::GeneralizedGrassmann, p, X)Compute the exponential map on the GeneralizedGrassmann M $= \mathrm{Gr}(n,k,B)$ starting in p with tangent vector (direction) X. Let $X = USV^{\mathrm{H}}$ with $U^{\mathrm{H}}BU = I_k$, $S$ diagonal and nonnegative and $V$ unitary, so that $X^{\mathrm{H}}BX = VS^2V^{\mathrm{H}}$. Then the exponential map is written, see Section 4.5 of [EAS98], using
\[\exp_p X = p V\cos(S)V^\mathrm{H} + U\sin(S)V^\mathrm{H},\]
where $β ^{\mathrm{H}}$ denotes the complex conjugate transposed or Hermitian and the cosine and sine are applied element wise to the diagonal entries of $S$.
Base.isapprox β Method
isapprox(M::GeneralizedGrassmann, p, X, Y; kwargs...)Test whether two tangent vectors X, Y at p on the GeneralizedGrassmann manifold M are (approximately) the same, that is whether $\lVert X - Y \rVert_p \approx 0$ with the classical isapprox. The kwargs... are passed on to this; atol defaults to sqrt(max_eps(X, Y)).
Base.isapprox β Method
isapprox(M::GeneralizedGrassmann, p, q; kwargs...)Test whether two points p, q on the GeneralizedGrassmann manifold M are (approximately) the same. Since this is a quotient manifold, the test is performed by checking their distance if they are not equal, that is $d_{\mathcal M}(p,q) \approx 0$ with the classical isapprox. The kwargs... are passed on to this; atol defaults to sqrt(max_eps(p, q)).
Base.log β Method
log(M::GeneralizedGrassmann, p, q)Compute the logarithmic map on the GeneralizedGrassmann M $= \mathcal M=\mathrm{Gr}(n,k,B)$, i.e. the tangent vector X whose corresponding geodesic starting from p reaches q after time 1 on M. The formula reads
\[\log_p q = B^{-1/2}Uβ \operatorname{atan}(S) β V^\mathrm{H},\]
where $β ^{\mathrm{H}}$ denotes the complex conjugate transposed or Hermitian and $B^{1/2}$ is the square root of $B$; multiplying by it turns the metric into the Euclidean one, see Section 4.5 of [EAS98]. The matrices $U$ and $V$ are the unitary matrices, and $S$ is the diagonal matrix containing the singular values of the SVD-decomposition
\[USV^\mathrm{H} = B^{1/2}\bigl(q(p^\mathrm{H}Bq)^{-1} - p\bigr).\]
In this formula the $\operatorname{atan}$ is meant elementwise.
Base.rand β Method
rand(::GeneralizedGrassmann; vector_at=nothing, Ο::Real=1.0)When vector_at is nothing, return a random (Gaussian) point p on the GeneralizedGrassmann manifold M. This generates a (Gaussian) matrix of size $nΓk$ with standard deviation Ο and returns its (generalized) orthogonalized version, i.e. the projection onto the manifold of the Q component of its QR decomposition.
When vector_at is not nothing, return a (Gaussian) random vector from the tangent space $T_{vector\_at}\mathrm{St}(n,k)$ with mean zero and standard deviation Ο by projecting a random Matrix onto the tangent vector at vector_at.
ManifoldsBase.change_metric β Method
change_metric(M::GeneralizedGrassmann, ::EuclideanMetric, p, X)Change X to the corresponding vector with respect to the metric of the GeneralizedGrassmann M, i.e. find $c\colon T_p\mathrm{Gr}(n,k,B) β T_p\mathrm{Gr}(n,k,B)$ such that for all $X, Y β T_p\mathrm{Gr}(n,k,B)$ it holds
\[β¨X,Yβ© = \operatorname{tr}(X^{\mathrm{H}}Y) = \operatorname{tr}(c(X)^{\mathrm{H}}Bc(Y)) = g_p(c(X),c(Y)).\]
Let $B=LL^{\mathrm{H}}$ be the Cholesky decomposition of the matrix M.B, $P = L^{\mathrm{H}}p$ and $Q = I_n - PP^{\mathrm{H}}$. Then $c(X) = L^{-\mathrm{H}}(QL^{-1}L^{-\mathrm{H}}Q)^{1/2}L^{\mathrm{H}}X$, which is the positive square root of the change of representer $X β¦ (B^{-1} - pp^{\mathrm{H}})X$ on the tangent space, see Section 4.5 of [EAS98] for the latter.
ManifoldsBase.change_representer β Method
change_representer(M::GeneralizedGrassmann, ::EuclideanMetric, p, X)Change X to the corresponding representer of a cotangent vector at p with respect to the scaled metric of the GeneralizedGrassmann M. Since
\[g_p(Y,Z) = \operatorname{tr}(Y^{\mathrm{H}}BZ) = \operatorname{tr}(X^{\mathrm{H}}Z) = β¨X,Zβ©\]
has to hold for all $Z$, where the representer X is given, the resulting representer with respect to the metric on the GeneralizedGrassmann is given by $Y = B^{-1}X$.
ManifoldsBase.check_point β Method
check_point(M::GeneralizedGrassmann, p)Check whether p is representing a point on the GeneralizedGrassmann M, i.e. its a n-by-k matrix of unitary column vectors with respect to the B inner product and of correct eltype with respect to π½.
ManifoldsBase.check_vector β Method
check_vector(M::GeneralizedGrassmann, p, X; kwargs...)Check whether X is a tangent vector in the tangent space of p on the GeneralizedGrassmann M, i.e. that X is of size and type as well as that
\[ p^{\mathrm{H}}BX + \overline{X^{\mathrm{H}}Bp} = 0_k,\]
where $β ^{\mathrm{H}}$ denotes the complex conjugate transpose or Hermitian, $\overline{β }$ the (elementwise) complex conjugate, and $0_k$ denotes the $kΓk$ zero natrix.
ManifoldsBase.default_vector_transport_method β Method
default_vector_transport_method(M::GeneralizedGrassmann)Return the ProjectionTransport as the default vector transport method for the GeneralizedGrassmann manifold.
ManifoldsBase.distance β Method
distance(M::GeneralizedGrassmann, p, q)Compute the Riemannian distance on GeneralizedGrassmann manifold M$= \mathrm{Gr}(n,k,B)$.
The distance is the arc length
\[d_{\mathrm{Gr}(n,k,B)}(p,q) = \operatorname{norm}(\log_p(q)) = \Bigl(\sum_{i=1}^k ΞΈ_i^2\Bigr)^{1/2}\]
of the principal angles $ΞΈ_1,β¦,ΞΈ_k$ between the spans of $B^{1/2}p$ and $B^{1/2}q$, see Sections 4.3 and 4.5 of [EAS98]; these are the principal angles between the spans of p and q in the inner product given by $B$, see Theorem 4.2 of [KA02]. They are computed with Algorithm 3.2 there, applied to $B^{1/2}p$ and $B^{1/2}q$: for the singular value decomposition $p^{\mathrm{H}}Bq = YΞ£Z^{\mathrm{H}}$, $Ξ£ = \operatorname{diag}(Ο_1,β¦,Ο_k)$, the angles with $Ο_i β€ \frac{\sqrt{2}}{2}$ are $ΞΈ_i = \arccos(Ο_i)$, and the others are $ΞΈ_i = \arcsin(\min\{ΞΌ_i, 1\})$, where $ΞΌ_i$ are the singular values of $B^{1/2}(R - p(p^{\mathrm{H}}BR))$ and the columns of $R$ are the columns of $qZ$ that belong to these other $Ο_i$. Algorithm 3.2 takes the arc sine also for $Ο_i = \frac{\sqrt{2}}{2}$, where both formulas give $\frac{Ο}{4}$.
ManifoldsBase.injectivity_radius β Method
injectivity_radius(M::GeneralizedGrassmann)
injectivity_radius(M::GeneralizedGrassmann, p)Return the injectivity radius on the GeneralizedGrassmann M, which is $\frac{Ο}{2}$.
ManifoldsBase.inner β Method
inner(M::GeneralizedGrassmann, p, X, Y)Compute the inner product for two tangent vectors X, Y from the tangent space of p on the GeneralizedGrassmann manifold M. The formula reads
\[g_p(X,Y) = \operatorname{tr}(X^{\mathrm{H}}BY),\]
where $β ^{\mathrm{H}}$ denotes the complex conjugate transposed or Hermitian.
ManifoldsBase.inverse_retract β Method
inverse_retract(M::GeneralizedGrassmann, p, q, ::PolarInverseRetraction)Compute the inverse of the PolarRetraction on the GeneralizedGrassmann manifold M, i.e.
\[\operatorname{retr}_p^{-1}q = q(p^{\mathrm{H}}Bq)^{-1} - p,\]
where $β ^{\mathrm{H}}$ denotes the complex conjugate transposed or Hermitian.
ManifoldsBase.is_flat β Method
is_flat(M::GeneralizedGrassmann)Return true if GeneralizedGrassmann M is one-dimensional.
ManifoldsBase.manifold_dimension β Method
manifold_dimension(M::GeneralizedGrassmann)Return the dimension of the GeneralizedGrassmann(n,k,π½) manifold M, i.e.
\[\dim \operatorname{Gr}(n,k,B) = k(n-k) \dim_β π½,\]
where $\dim_β π½$ is the real_dimension of π½.
ManifoldsBase.project β Method
project(M::GeneralizedGrassmann, p, X)Project the n-by-k X onto the tangent space of p on the GeneralizedGrassmann M, which is computed by
\[\operatorname{proj_p}(X) = X - pp^{\mathrm{H}}B^\mathrm{T}X,\]
where $β ^{\mathrm{H}}$ denotes the complex conjugate transposed or Hermitian and $β ^{\mathrm{T}}$ the transpose.
ManifoldsBase.project β Method
project(M::GeneralizedGrassmann, p)Project p from the embedding onto the GeneralizedGrassmann M, i.e. compute q as the polar decomposition of $p$ such that $q^{\mathrm{H}}Bq$ is the identity, where $β
^{\mathrm{H}}$ denotes the Hermitian, i.e. complex conjugate transpose.
ManifoldsBase.representation_size β Method
representation_size(M::GeneralizedGrassmann)Return the representation size or matrix dimension of a point on the GeneralizedGrassmann M, i.e. $(n,k)$ for both the real-valued and the complex value case.
ManifoldsBase.retract β Method
retract(M::GeneralizedGrassmann, p, X, ::PolarRetraction)Compute the SVD-based retraction PolarRetraction on the GeneralizedGrassmann M, by projecting $p + X$ onto M.
ManifoldsBase.zero_vector β Method
zero_vector(M::GeneralizedGrassmann, p)Return the zero tangent vector from the tangent space at p on the GeneralizedGrassmann M, which is given by a zero matrix the same size as p.
Statistics.mean β Method
mean(
M::GeneralizedGrassmann,
x::AbstractVector,
[w::AbstractWeights,]
method = GeodesicInterpolationWithinRadius(Ο/4);
kwargs...,
)Compute the Riemannian mean of x using GeodesicInterpolationWithinRadius.