t3_probe_corewise_hessian_from_sweep#

t3toolbox.backend.probing.t3_probe_corewise_hessian_from_sweep(ztildes, ww, core_pair, core_directions, frame_sweep)#
def t3_probe_corewise_hessian_from_sweep(
        ztildes:            typ.Union[typ.Sequence[NDArray], NDArray],  # residuals (omega^2 applied), len=d, elm_shape=W+C+(Ni,)
        ww:                 typ.Union[typ.Sequence[NDArray], NDArray],  # probe vectors, len=d, elm_shape=W+(Ni,)
        core_pair:          typ.Tuple[
            typ.Sequence[NDArray],                  # tucker_cores of theta. len=d, elm_shape=C+(ni,Ni)
            typ.Sequence[NDArray],                  # tt_cores of theta.     len=d, elm_shape=C+(ri,ni,r(i+1))
        ],                                          # = TuckerTensorTrain.data
        core_directions:    typ.Tuple[
            typ.Sequence[NDArray],                  # Tucker directions theta_hat. len=d, elm_shape=K+C+(ni,Ni)
            typ.Sequence[NDArray],                  # TT directions theta_hat.     len=d, elm_shape=K+C+(ri,ni,r(i+1))
        ],
        frame_sweep:        typ.Tuple[typ.Sequence[NDArray], ...],  # (xi, mu[, nu, eta]); only xi, mu are read
) -> typ.Tuple[
    typ.Tuple[NDArray, ...],                        # Tucker block of K theta_hat. len=d, elm_shape=K+C+(ni,Ni)
    typ.Tuple[NDArray, ...],                        # TT block of K theta_hat.     len=d, elm_shape=K+C+(ri,ni,r(i+1))
]:

t3_probe_corewise_hessian() reusing a precomputed frame_sweep’s xi and mu – the reuse hook for a local model, whose probe sweep at the manifold frame (D, U, L, R) carries exactly the corewise frame’s xi (through D) and mu (through L) when core_pair = (D, L), the geometry’s base point.

frame_sweep is tv_precompute_probe_frame_sweep() at that frame (its nu and eta belong to the manifold frame and are not read: nu is re-swept here through G), or the lean (xi, mu) pair of tv_precompute_apply_frame_sweep() at the corewise frame. Either way its xi / mu must be core_pair’s own; nothing here checks that.

Parameters:
  • ztildes (t3toolbox.backend.common.typ.Union[t3toolbox.backend.common.typ.Sequence[NDArray], NDArray])

  • ww (t3toolbox.backend.common.typ.Union[t3toolbox.backend.common.typ.Sequence[NDArray], NDArray])

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

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

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

Return type:

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