svd.tensor | R Documentation |
A tensor can be seen as a linear mapping of a tensor to a tensor. This function computes the singular value decomposition of this mapping
svd.tensor(X,i,j=NULL,...,name="lambda",by=NULL)
X |
The tensor to be decomposed |
i |
The image dimensions of the linear mapping |
j |
The coimage dimensions of the linear mapping |
name |
The name of the eigenspace dimension. This is the
dimension created by the decompositions, in which the eigenvectors
are |
... |
further arguments for generic use |
by |
the operation is done in parallel for these dimensions |
A tensor can be seen as a linear mapping of a tensor to a tensor. Let
denote R_i
the space of real tensors with dimensions i_1...i_d
.
Computes a singular value decomposition
u_{i_1...i_d\lambda{}}
,d_\lambda{}
, v_{j_1...j_l}\lambda{}
such
that u and v correspond to orthogonal mappings from R_\lambda{}
to
R_i
or R_j
respectively.
a tensor or in case of svd a list u,d,v, of tensors like in svd
.
K. Gerald van den Boogaart
to.tensor
, to.matrix.tensor
,
inv.tensor
, solve.tensor
# SVD
A <- to.tensor(rnorm(120),c(a=2,b=2,c=5,d=3,e=2))
SVD <- svd.tensor(A,c("a","d"),c("b","c"),by="e")
dim(SVD$v)
# Property of decomposition
einstein.tensor(SVD$v,diag=SVD$d,SVD$u,by="e") # A
# Property of orthogonality
SVD$v %e% SVD$v[[lambda=~"lambda'"]] # 2*delta.tensor(c(lambda=6))
SVD$u %e% SVD$u[[lambda=~"lambda'"]] # 2*delta.tensor(c(lambda=6)))
SVD$u %e% mark(SVD$u,"'",c("a","d")) # 2*delta.tensor(c(a=2,d=3)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.