Description Usage Arguments Details Value References See Also Examples
Unfolds the tensor into a matrix, with the modes in rs
onto the rows and modes in cs
onto the columns. Note that c(rs,cs)
must have the same elements (order doesn't matter) as x@modes
. Within the rows and columns, the order of the unfolding is determined by the order of the modes. This convention is consistent with Kolda and Bader (2009).
1 2 3 4 |
tnsr |
the Tensor instance |
row_idx |
the indices of the modes to map onto the row space |
col_idx |
the indices of the modes to map onto the column space |
For Row Space Unfolding or m-mode Unfolding, see rs_unfold-methods
. For Column Space Unfolding or matvec, see cs_unfold-methods
.
vec-methods
returns the vectorization of the tensor.
unfold(tnsr,row_idx=NULL,col_idx=NULL)
matrix with prod(row_idx)
rows and prod(col_idx)
columns
T. Kolda, B. Bader, "Tensor decomposition and applications". SIAM Applied Mathematics and Applications 2009.
k_unfold-methods
and matvec-methods
1 2 | tnsr <- rand_tensor()
matT3<-unfold(tnsr,row_idx=2,col_idx=c(3,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.