GaussNewtonModel.gn_quadratic#

t3toolbox.fitting.GaussNewtonModel.gn_quadratic(p)#
def gn_quadratic(
        self,
        p:  t3m.T3Tangent,
) -> NDArray:  # pᵀ H p = ‖J p‖², shape C

The Gauss-Newton quadratic form pᵀ H p = ‖J p‖² – ONE forward sweep, NOT a Hessian apply.

The cheap denominator for Cauchy / line-search step lengths: alpha = g.corewise_inner(g) / model.gn_quadratic(g). Because H = JᵀJ, pᵀHp = (Jp)ᵀ(Jp) = ‖Jp‖², so this needs only the forward jacobian() – it avoids the transpose 𝒥ᵀ and the H p tangent materialization that the equivalent p.corewise_inner(self.gn_hessian(p)) would incur. When a regularizer is set this adds its ⟨p, H_R p⟩ term, consistent with gn_hessian().

Parameters:

p (T3Tangent)

Return type:

NDArray