tv_probe_derivatives#

t3toolbox.backend.sampling_derivatives.tv_probe_derivatives(ww, pp, variation, frame, order)#
def tv_probe_derivatives(
        ww:         typ.Sequence[NDArray],  # probe vectors X,        len=d, elm_shape=W+(Ni,)
        pp:         typ.Sequence[NDArray],  # perturbation vectors P, len=d, elm_shape=W+(Ni,)
        variation:  typ.Tuple[
            typ.Sequence[NDArray],          # var_tucker_cores dU. len=d, elm_shape=K+C+(nOi,Ni)
            typ.Sequence[NDArray],          # var_tt_cores     dG. len=d, elm_shape=K+C+(rLi,nUi,rRi)
        ],                                  # = T3Variations.data
        frame:       typ.Tuple[
            typ.Sequence[NDArray],          # up_tucker_cores  U. len=d
            typ.Sequence[NDArray],          # down_tt_cores    O. len=d
            typ.Sequence[NDArray],          # left_tt_cores    P. len=d
            typ.Sequence[NDArray],          # right_tt_cores   Q. len=d
        ],                                  # = T3Frame.data = (up, down, left, right) = (U, O, P, Q)
        order:      int,                    # highest derivative order K
) -> typ.Tuple[NDArray, ...]:               # z_jets. len=d, elm_shape=(order+1,)+W+K+C+(Ni,)

Symmetric derivatives of probing a tangent vector, in one repeated direction (Riemannian J^(s)).

The probe-derivative analog of probing.tv_probe(): returns, for each mode i, the stack y_i^(t) = d^t/ds^t [J^(s) v]_i (X + s P)|_0 for t=0..K, where v is the tangent vector represented by (frame, variation). Index 0 is the ordinary tangent probe.

Identical structure to t3_probe_derivatives() but on the tangent calculus: a frame sweep (frame cores) and a variation sweep. Full order + W + K + C stacking (base-inner, mirroring tv_probe): sample stack W, tangent stack K (a batch of tangents sharing the frame, on the variation cores), frame stack C; any may be empty.

The symmetric-derivative formulation is not in the published T4S paper; verified against dense_probe_derivatives() on the densified tangent. (Project write-up in preparation.)

Parameters:
  • ww (t3toolbox.backend.common.typ.Sequence[NDArray])

  • pp (t3toolbox.backend.common.typ.Sequence[NDArray])

  • variation (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])

  • frame (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])

  • order (int)

Return type:

t3toolbox.backend.common.typ.Tuple[NDArray, Ellipsis]