svdtensor: Singular value decomposition of tensors

Description Usage Arguments Details Value Author(s) See Also Examples

Description

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

Usage

1
svd.tensor(X,i,j=NULL,...,name="lambda",by=NULL)

Arguments

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 e_i

...

further arguments for generic use

by

the operation is done in parallel for these dimensions

Details

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.

Value

a tensor or in case of svd a list u,d,v, of tensors like in svd.

Author(s)

K. Gerald van den Boogaart

See Also

to.tensor, to.matrix.tensor, inv.tensor, solve.tensor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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)))

tensorA documentation built on Nov. 20, 2020, 9:07 a.m.

Related to svdtensor in tensorA...