t3_apply_derivatives#
- t3toolbox.backend.sampling_derivatives.t3_apply_derivatives(ww, pp, x, order)#
def t3_apply_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 ) -> NDArray: # apply-derivative jets, shape=(order+1,)+W+C
Symmetric derivatives of applying a Tucker tensor train in all modes, in one repeated direction.
The all-modes Euclidean analog of
t3_probe_derivatives(): returns the stacky^(t) = d^t/ds^t apply(X, W + s P)|_0fort=0..order, whereapplycontracts the tensor with the vectors in every mode (a scalar). Index0is the ordinary apply. Computed as the terminal carry of the left mu-jet sweep (via the cores), bond summed – no right/central sweeps. Stacks ride asorder + W + C(sample stackW, frame stackC; no tangent stack here). Verified againstdense_apply_derivatives().