svd.tensor {tensorA}R Documentation

Singular value decomposition of tensors

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

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.

svd.tensor
Computes a singular value decomposition u_{i_1...i_dλ{}},d_λ{}, v_{j_1...j_l}λ{} such that u and v correspond to orthogonal mappings from R_λ{} to R_i or R_j respectively.

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

References

See Also

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

Examples

# 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)))



[Package tensorA version 0.31 Index]