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_iis multilinear in the off-mode vectors, soy_i(X+sP)is a polynomial insand thet-th derivative ats=0is 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-
tsubsetsS– only for smalld/t(testing), unstacked, no rank structure.