Calculates the n-mode product of a tensor and a matrix. Given a tensor X with dimensions \(I_1, I_2, ..., I_n, I_n+1, ... I_N\) and a matrix U with dimensions \(J, I_n\), the resulting tensor after multiplication will have dimension \(I_1, I_2, ..., J, I_n+1, ... I_N\).
ttm(x, u, mode) # S4 method for dtensor,Matrix,numeric ttm(x, u, mode) # S4 method for dtensor,matrix,numeric ttm(x, u, mode) # S4 method for sptensor,Matrix,numeric ttm(x, u, mode) # S4 method for sptensor,matrix,numeric ttm(x, u, mode)
x | tensor |
---|---|
u | matrix |
mode | mode along tensor to perform multiplication |
T. G. Kolda and B. W. Bader, Tensor Decompositions and Applications, SIAM Review 51(3):455-500, September 2009