UT3Tangent.probe_transpose ========================== .. py:method:: t3toolbox.uniform_manifold.UT3Tangent.probe_transpose(ztildes, ww, frame, sum_over_probes = False) :staticmethod: .. code-block:: python def probe_transpose( ztildes, # probe residuals, len=d, ith elm_shape=W+K+C+(Ni,) ww, # probe vectors, len=d, ith elm_shape=W+(Ni,) frame: ubv.UT3Frame, # the orthogonal frame the tangent attaches at sum_over_probes: bool = False, # True: sum the probe stack W (Gauss-Newton 𝒥ᵀr); False: keep it ) -> 'UT3Tangent': # tangent stack W+K (sum_over_probes=False) or K (True); frame stack C Apply the transpose ``𝒥ᵀ`` of the probe map to residuals; returns a :py:class:`UT3Tangent` at ``frame``. The adjoint of :py:meth:`probe`. Uniform mirror of :py:meth:`~t3toolbox.manifold.T3Tangent.probe_transpose`: the residuals live in the forward probe space (``W+K+C``); ``sum_over_probes=False`` keeps the probe stack ``W`` as the result's tangent stack (``W+K``), ``True`` sums it (``K``, the Gauss-Newton ``𝒥ᵀr``). The bare ``𝒥ᵀ`` (no gauge projector ``Π``). .. seealso:: :py:obj:`probe`, :py:obj:`apply_transpose`, :py:obj:`probe_derivatives_transpose` .. rubric:: Examples The defining property -- the adjoint identity `` = <𝒥ᵀr, v>`` (summed over probes): >>> 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), (5, 6, 4), (1, 2, 3, 1))) >>> v = ut3m.UNIFORM_COREWISE.randn(ut3m.UNIFORM_MANIFOLD.frame(x)) >>> ww = [np.random.randn(2, N) for N in (10, 11, 12)] # probe stack W=(2,) >>> zz = v.probe(ww) >>> r = [np.random.randn(*np.asarray(z).shape) for z in zz] >>> JTr = ut3m.UT3Tangent.probe_transpose(r, ww, v.frame, sum_over_probes=True) >>> lhs = sum(float(np.sum(ri * np.asarray(zi))) for ri, zi in zip(r, zz)) >>> print(bool(abs(lhs - float(JTr.corewise_inner(v))) < 1e-9)) True >>> keep = ut3m.UT3Tangent.probe_transpose(r, ww, v.frame, sum_over_probes=False) >>> print(keep.tangent_stack_shape, JTr.tangent_stack_shape) # keep W (=W+K) vs sum W (=K) (2,) ()