Minuit2's gradient-based minimizers are occasionally calling the hessian diagonal method G2 of a cost function even if the HasG2 property is set to false.
In other words, HasG2may just be ignored, at least during minimizer seeding.
function = Pow(1 - x, 2) + 100*Pow(-Pow(x, 2) + y, 2);
gradient[x] = 400*x*(Pow(x, 2) - y) + 2*x - 2;
gradient[y] = -200*Pow(x, 2) + 200*y;
hessian[x, x] = 1200*Pow(x, 2) - 400*y + 2;
hessian[x, y] = -400*x;
hessian[y, x] = -400*x;
hessian[y, y] = 200;
Check duplicate issues.
Description
Minuit2's gradient-based minimizers are occasionally calling the hessian diagonal method
G2of a cost function even if theHasG2property is set to false.In other words,
HasG2may just be ignored, at least during minimizer seeding.See #20665
Reproducer
Example:
FCNBasesubclass for the Rosenbrock problem:which
HasGradientandHasHessianHasG2G2is called (or passively monitors a call to it)G2getting called although it shouldn't (at least to my mind)ROOT version
ROOT v6.36.06
Installation method
Build from source
Operating system
Windows
Additional context
No response