| wrap.spdk | R Documentation |
When (p\times p) SPD matrices are of fixed-rank k < p, they form a geometric structure represented by (p\times k) matrices,
SPD(k,p) = \lbrace X \in \mathbf{R}^{(p\times p)}~\vert~ Y Y^\top = X, \textrm{rank}(X) = k \rbrace
It's key difference from \mathcal{S}_{++}^p is that all matrices should be
of fixed rank k where k is usually smaller than p. Inputs are
given as (p\times p) matrices with specified k and wrap.spdk
automatically decomposes input square matrices into rank-k representation matrices.
wrap.spdk(input, k)
input |
data matrices to be wrapped as
|
k |
rank of the SPD matrices. |
a named riemdata S3 object containing
a list of (p\times k) representation of the corresponding rank-k SPSD matrices.
size of each representation matrix.
name of the manifold of interests, "spdk"
journee_lowrank_2010Riemann
#-------------------------------------------------------------------
# Checker for Two Types of Inputs
#-------------------------------------------------------------------
# Data Generation
d1 = array(0,c(10,10,3))
d2 = list()
for (i in 1:3){
dat = matrix(rnorm(10*10),ncol=10)
d1[,,i] = stats::cov(dat)
d2[[i]] = d1[,,i]
}
# Run
test1 = wrap.spdk(d1, k=2)
test2 = wrap.spdk(d2, k=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.