Expand description
Tensor trains: TT-SVD with error-budget / Gavish–Donoho truncation, and full contraction.
A tensor X(i₁,…,i_d) is written G₁(i₁)·G₂(i₂)⋯G_d(i_d) with core
G_k of shape r_{k−1} × n_k × r_k (r₀ = r_d = 1), stored row-major
as the (r_{k−1}·n_k) × r_k matrix. tt_svd returns the canonical
left-orthogonal gauge: every core but the last has orthonormal columns
as a (r_{k−1}n_k) × r_k matrix, so the whole norm ‖X‖_F lives in
G_d, and the TT is unique up to an orthogonal r_k × r_k rotation per
bond (fixed here by the SVD’s singular-vector basis, i.e. the rotation that
diagonalises each left-unfolding Gram).
Structs§
- Tensor
Train - A tensor train in row-major core storage.
- Truncation
- Rank-selection rule for each unfolding in
tt_svd.
Constants§
- GD_
MIN_ DIM - Smallest unfolding side on which
gd_rankapplies its cap.
Functions§
- contract
- Contract cores to the full tensor. Each step is one GEMM:
P (M × r_{k−1}) · G_k (r_{k−1} × n_k r_k), and the row-major result is(M n_k) × r_k. - gd_
omega - Gavish–Donoho (2014) optimal hard threshold coefficient for unknown noise,
ω(β) ≈ 0.56β³ − 0.95β² + 1.82β + 1.43,β = min(m,n)/max(m,n). - gd_rank
- Number of singular values above the Gavish–Donoho threshold for an
m × nmatrix with spectrums(descending, lengthmin(m,n)). - tail_
rank - Smallest rank whose discarded tail energy
Σ_{j≥r} σ_j²is ≤delta2. - tt_svd
- TT-SVD (Oseledets 2011) of
xreshaped tomodes, left-orthogonal gauge.