t3_probe_derivatives#
- t3toolbox.backend.sampling_derivatives.t3_probe_derivatives(ww, pp, x, order)#
def t3_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,) x: typ.Tuple[ typ.Sequence[NDArray], # tucker_cores. len=d, elm_shape=C+(nUi,Ni) typ.Sequence[NDArray], # tt_cores. len=d, elm_shape=C+(rLi,nUi,rR(i+1)) ], # = TuckerTensorTrain.data order: int, # highest derivative order K ) -> typ.Tuple[NDArray, ...]: # z_jets. len=d, elm_shape=(order+1,)+W+C+(Ni,)
Symmetric derivatives of probing a Tucker tensor train, in one repeated direction.
Returns, for each mode
i, the stacky_i^(t) = d^t/ds^t y_i(X + s P)|_0fort=0..K, wherey_iis thei-th probing action. Index0is the ordinary probet3_probe.Two independent stacks ride through, base-inner as in plain probing: a sample stack
Won the input vectors (each sample a paired(X, P)– repeat a point acrossWto sweep many directions at it) and a frame/core stackCon the cores (a batch of T3s probed by the same samples). Outputs areorder + W + C + (Ni,)(Wouter,Cinner); either may be empty. (A plain T3 has no tangent stackK; the Riemannian forwards carryorder + W + K + C.)The symmetric-derivative formulation is not in the published T4S paper; the recursions are verified against
dense_probe_derivatives(). (Project write-up in preparation.)- Parameters:
ww (typ.Sequence[NDArray]) – probe vectors X. len=d, elm_shape=W+(Ni,)
pp (typ.Sequence[NDArray]) – perturbation direction P (the same P fed into every derivative slot). len=d, elm_shape=W+(Ni,)
x (t3.TuckerTensorTrain.data) – Tucker tensor train, as a (tucker_cores, tt_cores) data tuple.
order (int) – highest derivative order K.
- Returns:
Probe-derivative jets, z_jets. len=d, elm_shape=(order+1,)+W+C+(Ni,).
z_jets[i][t]isy_i^(t).- Return type:
typ.Tuple[NDArray,…]