Multinomial matrices
Manifolds.MultinomialMatrices β Type
MultinomialMatrices{T,TPM} <: AbstractPowerManifold{β}The multinomial manifold consists of m column vectors, where each column is of length n and is a discrete probability distribution, i.e.
\[\mathcal{MN}(n,m) \coloneqq \bigl\{ p β β^{nΓm}\ \big|\ p_{i,j} > 0 \text{ for all } i=1,β¦,n, j=1,β¦,m \text{ and } p^{\mathrm{T}}\mathbb{1}_n = \mathbb{1}_m\bigr\},\]
where $\mathbb{1}_k$ is the vector of length $k$ containing ones.
This yields exactly the same metric as considering the product metric of the probability vectors, i.e. PowerManifold of the $(n-1)$-dimensional ProbabilitySimplex.
The ProbabilitySimplex is stored internally within M.manifold, such that all functions of AbstractPowerManifold can be used directly.
Constructor
MultinomialMatrices(n::Int, m::Int; parameter::Symbol=:type)Generate the manifold of matrices $β^{nΓm}$ such that the $m$ columns are discrete probability distributions, i.e. sum up to one.
parameter: whether a type parameter should be used to store n and m. By default size is stored in type. Value can either be :field or :type.
Functions
Most functions are directly implemented for an AbstractPowerManifold with ArrayPowerRepresentation except the following special cases:
ManifoldDiff.riemannian_gradient β Method
riemannian_gradient(M::MultinomialMatrices, p, Y; kwargs...)Let $Y$ denote the Euclidean gradient of a function $\tilde f$ defined in the embedding neighborhood of M, then the Riemannian gradient is given by Equation 5 of [DH19] as
\[ \operatorname{grad} f(p) = \proj_{T_p\mathcal M}(Yβp)\]
where $β$ denotes the Hadamard or elementwise product.
ManifoldsBase.check_point β Method
check_point(M::MultinomialMatrices, p)Check whether p is a valid point on the MultinomialMatrices(n,m) M. This means p is a matrix of m discrete probability distributions as columns from $β^n$, i.e. each column is a point from ProbabilitySimplex(n-1).
ManifoldsBase.check_vector β Method
check_vector(M::MultinomialMatrices p, X; kwargs...)Checks whether X is a valid tangent vector to p on the MultinomialMatrices M. This means, that p is valid, that X is of correct dimension and columnswise a tangent vector to the columns of p on the ProbabilitySimplex.
ManifoldsBase.get_embedding β Method
get_embedding(M::MultinomialMatrices)Return the embedding of the MultinomialMatrices manifold M, the Euclidean $β^{nΓm}$.
ManifoldsBase.project β Method
project(M::MultinomialMatrices, p, Y)Project Y from the embedding onto the tangent space at p on the MultinomialMatrices M, orthogonally with respect to the FisherβRao metric. Column by column the formula reads
\[ \operatorname{proj}_{T_p\mathcal M}(Y)_j = Y_j - β¨\mathbb{1}_n, Y_jβ©p_j, \qquad j = 1,β¦,m,\]
where $p_j$ and $Y_j$ are the $j$th columns of $p$ and $Y$, respectively.