SamplingKind.corewise_hessian ============================= .. py:method:: t3toolbox.backend.fitting.SamplingKind.corewise_hessian(core_directions, residual, sample, frame, sweep, base_point) :abstractmethod: .. code-block:: python def corewise_hessian( self, core_directions, # theta_hat = (Bdot, Gdot) at base_point; elm_shape=K+C+(...) (raw core shapes) residual, # RAW r = S(x) - data, as transpose receives it; omega^2 is applied HERE sample, # as forward / transpose take it frame, # this model's frame -- the slot forward / transpose take sweep, # this model's precompute(frame, sample); its xi / mu half is what is reused base_point, # theta = geom.base_point(frame): the raw cores the directions vary ): # -> raw (dB, dG), stack K+C, probe stack W summed; MASK-FREE by contract The derivative of :py:meth:`transpose`'s **corewise** form along a core direction. ``K_r theta_hat = d/ds grad_theta |_{s=0}`` at ``theta = base_point`` -- the core-coordinate Hessian of ``theta -> `` applied to ``theta_hat``, with the residual ``r`` held fixed (raw, weighted here exactly as ``transpose`` weights it). It is the sampling half of the exact Hessian's curvature term; the geometry lifts a tangent to ``theta_hat`` and maps the result back. Needed **only** for ``hessian='exact'``. Raw ``(dB, dG)`` shaped like the directions (``K + C``), ``W`` summed. Mask-free by contract: on the uniform layer the kind's own override masks ``theta`` and ``theta_hat`` with the frame's masks and re-masks the output. The base method is marked with :py:func:`abc.abstractmethod` (the class is not an ``ABC``, so the marker changes nothing about instantiation): ``Problem.local_model(hessian='exact')`` reads the marker to reject a kind that does not implement it before any work, while the Gauss-Newton path never consults it.