| ttm-methods | R Documentation |
Contracted (m-Mode) product between a DelayedArray (Tensor) of arbitrary number of modes and a matrix. The result is folded back into Tensor.
ttm(darr, mat, m = NULL)
## S4 method for signature 'DelayedArray,DelayedArray'
ttm(darr, mat, m)
darr |
DelayedArray object |
mat |
input 2D DelayedArray with same number columns as
the |
m |
the mode to contract on |
This function is an extension of the ttm
by DelayedArray.
By definition, rs_unfold(ttm(darr, mat), m) = mat%*%rs_unfold(darr, m),
so the number of columns in mat must match the
mth mode of darr. For the math on the m-Mode Product,
see Kolda and Bader (2009).
a DelayedArray object with K modes
The mth mode of darr must match the number of columns in
mat. By default, the returned Tensor does not drop any modes equal to 1.
T. Kolda, B. Bader, "Tensor decomposition and applications". SIAM Applied Mathematics and Applications 2009.
rs_unfold, ttl
library("DelayedRandomArray")
darr <- RandomUnifArray(c(2,3,4))
mat <- RandomUnifArray(c(10,4))
ttm(darr, mat, m=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.