powered by
Compute tensor product over multiple dimensions using Khatri-Rao product
TensProd(L, range = NA)
List of length K, with matrix entries Lk: m_k X R;
Column indices over which to apply tensor product.Default is all columns (range = [1:R])
Ans Array of size m_1 X m_2 ... X m_K, where the [i1,...iK]; entry is the sum of product Lk(i1,r)*...*LK(iK,r) over all r in range.
# NOT RUN { L <- list(matrix(rnorm(10*10),10,10),matrix(rnorm(10*10),10,10),matrix(rnorm(1000*10),1000,10)) TensProd(L) # }
Run the code above in your browser using DataLab