Skip to main content

Module tensor_decomp

Module tensor_decomp 

Source
Expand description

Tensor decomposition algorithms: CP, Tucker, and Tensor-Train (TT).

This module provides CPU-side implementations of the three most widely used tensor decomposition methods, which can be used to generate PTX kernels for GPU execution.

§Decompositions

  • CP (CANDECOMP/PARAFAC) — decomposes a tensor into a sum of rank-one tensors via Alternating Least Squares (ALS).
  • Tucker — decomposes a tensor into a core tensor multiplied by factor matrices along each mode, via HOSVD or HOOI.
  • Tensor-Train (TT) — decomposes a tensor into a chain of 3D cores via sequential SVDs.

§References

  • Kolda & Bader, “Tensor Decompositions and Applications”, SIAM Review 2009
  • Oseledets, “Tensor-Train Decomposition”, SIAM J. Sci. Comput. 2011

Structs§

CpAlsConfig
Configuration for CP-ALS algorithm.
CpDecomposition
CP (CANDECOMP/PARAFAC) decomposition result.
Matrix
A dense row-major matrix.
Tensor
A dense multi-dimensional tensor.
TtConfig
Configuration for TT-SVD algorithm.
TtDecomposition
Tensor-Train (TT) decomposition result.
TuckerConfig
Configuration for Tucker decomposition.
TuckerDecomposition
Tucker decomposition result.

Functions§

cp_als
CP decomposition via Alternating Least Squares (ALS).
hadamard_product
Element-wise (Hadamard) product of two matrices.
khatri_rao_product
Khatri-Rao product (column-wise Kronecker product).
mode_n_product
Mode-n product: multiplies a tensor by a matrix along mode n.
tt_svd
TT-SVD decomposition.
tucker_hooi
Higher-Order Orthogonal Iteration (HOOI) for Tucker decomposition.
tucker_hosvd
Higher-Order SVD (HOSVD) for Tucker decomposition.