This is intended to stabilize the optimization for cases in which the Hessian near the solution is very poorly conditioned. From Mihai: "I would start with a quadratic penalty indeed. Something like a 1e-4 – 1e-8 perturbation to the Hessian. I would say, I suggest perturbing the Hessian and not the problem. In other words the quadratic term should be added to the Hessian only. Perhaps you can try just one way to try the regularization I mentioned: replace double a0 = 1e-15 (line 346) by say double a0 = 1e-8, or play a bit with it.
This is intended to stabilize the optimization for cases in which the Hessian near the solution is very poorly conditioned. From Mihai: "I would start with a quadratic penalty indeed. Something like a 1e-4 – 1e-8 perturbation to the Hessian. I would say, I suggest perturbing the Hessian and not the problem. In other words the quadratic term should be added to the Hessian only. Perhaps you can try just one way to try the regularization I mentioned: replace double
a0 = 1e-15
(line 346) by saydouble a0 = 1e-8
, or play a bit with it.