I am using FindMinimum
command to find a local minimum of an object function. My code is below
FindMinimum[obj[h],{h,h_init},
Method -> "QuasiNewton",
Gradient->grad[h]];
All the calculations are performed numerically. However, there is an precision error
FindMinimum::sdprec: Line search unable to find a sufficient decrease in the function value with MachinePrecision digit precision.
I don't understand this error because Machine number can represent number as small as $MinMachineNumber=2.22507*10^-308
in my computer. My computation has no chance to involve such a small number. Why this error pops up? Is it possible to prevent such error in general? Because my object function is complicated, using arbitrary precision number is very slow.
If not, i.e. I have to use arbitrary precision number by setting WorkingPrecision
, do I need to reset "Precision" of any number in my code to be consistent with the WorkingPrecision
setting inside FindMinimum
? Thanks!
Method
andGradient
,FindMinimum[]
is saying that the line search it is doing as part of the optimization is unable to fully satisfy the convergence criteria for your optimization. Why this might happen depends on what function you have. $\endgroup$ – J. M. will be back soon♦ Oct 17 '18 at 1:302.22045*10^-16
. The error on machine precision numbers is proportional to the number itself. $\endgroup$ – eyorble Oct 17 '18 at 5:44