UniformCorewiseGeometry#

class t3toolbox.uniform_manifold.UniformCorewiseGeometry#

The Euclidean geometry of the uniform core parameter space (uniform mirror of CorewiseGeometry).

Optimization happens on the raw supercores: tangents are perturbations of the cores (U, G, G, G) (the non-orthonormal frame whose down/left/right cores are all the TT supercore G – the Section 6.3 (P, Q, O) -> G substitution), the metric is the plain Euclidean (corewise) inner product, the “projection” is the identity (no gauge), and the retraction is vector addition in the supercores. Use the module singleton UNIFORM_COREWISE. The manifold counterpart is UniformManifoldGeometry.

Examples

>>> import numpy as np
>>> import t3toolbox.tucker_tensor_train as t3
>>> import t3toolbox.uniform_tucker_tensor_train as ut3
>>> import t3toolbox.uniform_manifold as ut3m
>>> np.random.seed(0)
>>> x = ut3.UniformTuckerTensorTrain.from_t3(t3.TuckerTensorTrain.randn((10, 11, 12), (3, 4, 3), (1, 2, 2, 1)))
>>> frame = ut3m.UNIFORM_COREWISE.frame(x)            # the (U, G, G, G) frame
>>> v = ut3m.UNIFORM_COREWISE.randn(frame)           # raw randn cores (no gauge)
>>> print(bool(v.is_gauged().all()))
False
>>> y = ut3m.UNIFORM_COREWISE.retract(ut3m.UT3Tangent.zeros(frame))   # additive: cores += step (zero -> the point)
>>> print(bool(np.allclose(y.to_dense(), x.to_dense())))
True

Methods#

frame(x)

The core-parameter frame at x: (U, G, G, G) (down/left/right all the TT supercore G).

randn(frame[, stack_shape])

Random tangent at frame: raw i.i.d. N(0, 1) variation supercores (the natural corewise

randn_like(tangent)

A raw random tangent at tangent's frame, with tangent's tangent stack K.

project(v)

The identity: the core parameter space is Euclidean, with no gauge projection.

inner(t1, t2)

The Euclidean (coordinate) inner product of two tangents on the core parameter space.

norm(t)

The Euclidean (coordinate) norm of a tangent (= UT3Tangent.corewise_norm()); no

retract(p)

Additive retraction: add the variation supercores to the point's cores (cores += p).