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). BecauseH = JᵀJ,pᵀHp = (Jp)ᵀ(Jp) = ‖Jp‖², so this needs only the forwardjacobian()– it avoids the transpose𝒥ᵀand theH ptangent materialization that the equivalentp.corewise_inner(self.gn_hessian(p))would incur. When aregularizeris set this adds its⟨p, H_R p⟩term, consistent withgn_hessian().