Mode-k flattening

From HandWiki
Short description: Mathematical operation
Flattening a (3rd-order) tensor. The tensor can be flattened in three ways to obtain matrices comprising its mode-0, mode-1, and mode-2 vectors.[1]

In multilinear algebra, mode-m flattening[1][2][3], also known as matrixizing, matricizing, or unfolding,[4] is an operation that reshapes a multi-way array [math]\displaystyle{ \mathcal{A} }[/math] into a matrix denoted by [math]\displaystyle{ A_{[m]} }[/math] (a two-way array).

Matrixizing may be regarded as a generalization of the mathematical concept of vectorizing.

Definition

The mode-m matrixizing of tensor [math]\displaystyle{ {\mathcal A} \in {\mathbb C}^{I_0\times I_1\times\cdots\times I_M}, }[/math] is defined as the matrix [math]\displaystyle{ {\bf A}_{[m]} \in {\mathbb C}^{I_m \times (I_0 \dots I_{m-1} I_{m+1} \dots I_M)} }[/math]. As the parenthetical ordering indicates, the mode-m column vectors are arranged by sweeping all the other mode indices through their ranges, with smaller mode indexes varying more rapidly than larger ones; thus[1]

[math]\displaystyle{ [{\bf A}_{[m]}]_{jk} = a_{i_1\dots i_m\dots i_M}, }[/math] where [math]\displaystyle{ j=i_m }[/math] and [math]\displaystyle{ k=1+\sum_{n=0\atop n\neq m}^M(i_n - 1) \prod_{\ell=0\atop \ell\neq m}^{n-1} I_\ell. }[/math] By comparison, the matrix [math]\displaystyle{ {\bf A}_{[m]} \in {\mathbb C}^{I_m \times (I_{m+1} \dots I_M I_0I_1 \dots I_{m-1})} }[/math] that results from an unfolding[4] has columns that are the result of sweeping through all the modes in a circular manner beginning with mode m + 1 as seen in the parenthetical ordering. This is an inefficient way to matrixize.[citation needed]

Applications

This operation is used in tensor algebra and its methods, such as Parafac and HOSVD.[citation needed]

References

  1. 1.0 1.1 1.2 Vasilescu, M. Alex O. (2009), "Multilinear (Tensor) Algebraic Framework for Computer Graphics, Computer Vision and Machine Learning", University of Toronto: p. 21, https://tspace.library.utoronto.ca/bitstream/1807/65327/11/Vasilescu_M_Alex_O_200911_PhD_thesis.pdf 
  2. Vasilescu, M. Alex O.; Terzopoulos, Demetri (2002), "Multilinear Analysis of Image Ensembles: TensorFaces", Computer Vision — ECCV 2002 (Berlin, Heidelberg: Springer Berlin Heidelberg): pp. 447–460, doi:10.1007/3-540-47969-4_30, ISBN 978-3-540-43745-1, http://dx.doi.org/10.1007/3-540-47969-4_30, retrieved 2023-03-15 
  3. Eldén, L.; Savas, B. (2009-01-01), "A Newton–Grassmann Method for Computing the Best Multilinear Rank-[math]\displaystyle{ (r_1, r_2, r_3) }[/math] Approximation of a Tensor", SIAM Journal on Matrix Analysis and Applications 31 (2): 248–271, doi:10.1137/070688316, ISSN 0895-4798, http://epubs.siam.org/doi/10.1137/070688316 
  4. 4.0 4.1 De Lathauwer, Lieven; De Mood, B.; Vandewalle, J. (2000), "A multilinear singular value decomposition", SIAM Journal on Matrix Analysis and Applications 21 (4): 1253–1278, doi:10.1137/S0895479896305696, http://www.siam.org/journals/simax/21-4/30569.html