UT3Tangent#
- class t3toolbox.uniform_manifold.UT3Tangent#
Tangent vector to the uniform manifold of fixed-rank Tucker tensor trains (uniform analog of
T3Tangent).A
UT3Tangentbundles aUT3Frame(the frame at the base point where the tangent space is attached) with aUT3Variations(the tangent direction in that frame). TheK/Cstack split (extra tangent stackKover the shared frame stackC) is inferred from the pair – the variation stack isK + Cand the frame stack isC– never stored (the split-agnostic stacking of increment 2c).Like the ragged class, the metric lives on the geometry, not here; this exposes only the raw coordinate
corewise_inner()/corewise_norm()(no Hilbert-Schmidt claim), computed on the real (masked) content of the variations.Examples
>>> import numpy as np >>> import t3toolbox.tucker_tensor_train as t3 >>> import t3toolbox.uniform_tucker_tensor_train as ut3 >>> import t3toolbox.uniform_frame_variations_format as ubv >>> import t3toolbox.uniform_manifold as ut3m >>> np.random.seed(0) >>> x = t3.TuckerTensorTrain.randn((10, 11, 12), (3, 4, 3), (1, 2, 2, 1)) >>> frame, variations = ubv.ut3_orthogonal_representations(ut3.UniformTuckerTensorTrain.from_t3(x)) >>> v = ut3m.UT3Tangent(frame, variations) >>> print(v.shape, v.stack_shape) (10, 11, 12) () >>> print(bool(v.is_orthogonal())) # frame from ut3_orthogonal_representations is orthogonal True >>> w = 2.0 * v - v # linear algebra stays in the same tangent space >>> print(bool(w.allclose(v))) # (2v - v) == v True
- variations: UT3Variations#
- __rmul__#
Methods#
|
Validate this tangent: both components well-formed and a compatible (frame, variations) pair. |
|
|
|
|
|
|
Frame stack |
|
Tangent stack |
|
Full stack |
|
The frame's per-element structure tuple (ranks are arrays over the frame stack |
|
|
|
|
Copy with frame and variation supercores converted to jax arrays (masks stay host numpy). |
|
Copy with frame and variation supercores converted to numpy arrays. |
|
Deep copy (copies the frame and variation supercores). |
True if any frame or variation supercore is a jax array. |
|
|
Add tangent vectors. Requires the same frame + matching stack/masks (same tangent space). |
|
Subtract tangent vectors. Requires the same frame + matching stack/masks. |
|
Scale a tangent vector by a scalar (the base point is unchanged). |
|
|
|
The raw corewise (coordinate) dot of two tangents' variations -- not the HS inner product. |
The raw corewise (coordinate) norm of the variations (masked content) -- not the HS norm. |
|
|
Absorb the metric |
|
The weighted (Grasedyck-Kramer) coordinate norm: absorb the metric into the variation |
|
The weighted coordinate inner product |
Unit-norm rescaling |
|
|
|
Structural minimal ranks of this tangent's base point, per frame-stack element (the ranks |
|
Dimension of the tangent space at this base point (= the fixed-rank manifold dimension), |
|
True (per frame-stack element) if this tangent's frame has structurally minimal ranks. See |
|
|
True (per frame-stack element) if this tangent's frame is numerically minimal. See |
|
True (per frame-stack element) if this tangent's frame is orthogonal. See |
Max absolute gauge-condition violation, per stack element (shape = variation stack |
|
|
True (per stack element) if the variations are gauged w.r.t. the frame. |
|
Doubled-rank |
|
Form the dense tensor represented by this tangent vector ( |
Convert to a ragged |
|
|
Pack a ragged |
|
Reverse the mode order of this tangent (reverses both the frame and the variations). |
|
Probe this tangent vector: the single-sample Riemannian Jacobian |
|
Apply this tangent vector in all modes (the all-modes special case of |
|
Entries of the dense tangent at |
|
Symmetric directional derivatives of |
|
Symmetric all-modes apply derivatives (derivative twin of |
|
Symmetric entry derivatives at |
|
Apply the transpose |
|
Apply the transpose |
|
Apply the transpose |
|
Transpose |
|
Transpose |
|
Transpose |
|
Sum over the tangent stack |
|
Zero tangent vector at a given frame (numpy/jax matching the frame). |
|
Canonical unit tangent at |
|
Zero tangent at |
Unstack over the tangent stack |
|
Unstack over the frame stack |
|
|
Stack a |
|
Stack a |