LocalModel.evaluate#
- t3toolbox.fitting.LocalModel.evaluate(p)#
def evaluate(self, p) -> NDArray: # m(p), shape C
The quadratic-model value
m(p) = c + gᵀp + ½ pᵀ H pof this model’s mode, reusing the cachedcandg. Gauss-Newton (H = JᵀJ): one forward apply – the quadratic term needs only½ pᵀ H p = ½‖𝒥 Π p‖², not a Hessian apply – and the value equals½‖r + 𝒥 Π p‖²exactly (the objective is quadratic in the ambient tensor). Exact: plus½curvature_quadratic().pis projected here, shared by the linear term⟨g, Πp⟩and the quadratic. With aregularizer,candgalready carryρ/g_R, so only the quadratic½⟨p, H_R p⟩is added here.- Return type: