A tensor can be seen as a linear mapping of a tensor to a tensor. This function computes its Cholesky decomposition.

chol.tensor(X,i,j,...,name="lambda")

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

...

for generic use only

Value

a tensor

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\).

chol.tensor

Computes for a tensor \( a_{i_1 \ldots i_dj_1 \ldots j_d} \) representing a positive definit mapping form \(R_j\) to \(R_i\) with equal dimension structure in \(i\) and \(j\) its "Cholesky" decomposition \(L_{i_1 \ldots i_d \lambda{}}\) such that $$ a_{i_1...i_dj_1...j_d}=\sum_{\lambda{}} L_{i_1...i_d \lambda{}}L_{j_1...j_d \lambda{}} $$

Note

A by argument is not necessary, since both processing dimensions have to be given.

See also

Author

K. Gerald van den Boogaart

Examples



A <- to.tensor(rnorm(15),c(a=3,b=5))
AAt <- einstein.tensor(A,mark(A,i="a"))
ch <- chol.tensor(AAt,"a","a'",name="lambda")
#names(ch)[1]<-"lambda"
einstein.tensor(ch,mark(ch,i="a")) # AAt
#>       a'
#> a            [,1]       [,2]       [,3]
#>   [1,]  3.6867041 -0.3823759  0.5492626
#>   [2,] -0.3823759  2.0394494 -1.7075164
#>   [3,]  0.5492626 -1.7075164 11.4289266
#> attr(,"class")
#> [1] "tensor" "matrix"

A <- to.tensor(rnorm(30),c(a=3,b=5,c=2))
AAt <- einstein.tensor(A,mark(A,i="a"),by="c")
ch <- chol.tensor(AAt,"a","a'",name="lambda")
einstein.tensor(ch,mark(ch,i="a"),by="c") #AAt
#> , , 1
#> 
#>       a'
#> a              [,1]         [,2]       [,3]
#>   [1,]  3.261590403 -0.005752731 -3.2806573
#>   [2,] -0.005752731  3.986028042  0.5591308
#>   [3,] -3.280657308  0.559130813  7.2092542
#> 
#> , , 2
#> 
#>       a'
#> a             [,1]        [,2]      [,3]
#>   [1,]  0.16083994 -0.05722539 -1.202976
#>   [2,] -0.05722539  1.05627445  1.247220
#>   [3,] -1.20297606  1.24722043 12.396373
#> 
#> attr(,"class")
#> [1] "tensor"