dense_probe_derivatives#

t3toolbox.backend.sampling_derivatives.dense_probe_derivatives(ww, pp, T, order)#
def dense_probe_derivatives(
        ww:     typ.Sequence[NDArray],  # probe vectors X,        len=d, elm_shape=(Ni,)
        pp:     typ.Sequence[NDArray],  # perturbation vectors P, len=d, elm_shape=(Ni,)
        T:      NDArray,                # dense tensor, shape=(N0,...,N(d-1))
        order:  int,                    # highest derivative order K
) -> typ.List[NDArray]:                 # z_jets. len=d, elm_shape=(K+1,Ni)

Exact dense symmetric probe derivatives, by the multilinear subset expansion (test oracle).

Each action y_i is multilinear in the off-mode vectors, so y_i(X+sP) is a polynomial in s and the t-th derivative at s=0 is exact:

y_i^(t) = t! * sum_{|S|=t, S subset of modes\{i}} T contracted with {p_j: j in S, x_j: else}.

Enumerates the size-t subsets S – only for small d/t (testing), unstacked, no rank structure.

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

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

  • T (NDArray)

  • order (int)

Return type:

t3toolbox.backend.common.typ.List[NDArray]