0
$\begingroup$

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!

$\endgroup$
  • 2
    $\begingroup$ Assuming you did not actually set any other options except Method and Gradient, 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:30
  • $\begingroup$ It is also worth noting that while extremely high precision can be achieved near 0 with machine precision numbers, the precision at larger numbers is rather less. On my machine the highest precision achievable around 1.0 is on the order of 2.22045*10^-16. The error on machine precision numbers is proportional to the number itself. $\endgroup$ – eyorble Oct 17 '18 at 5:44
  • $\begingroup$ @eyorble Thanks for your comments! So, the error for machine precision number is proportional to the number itself. If for 1.0, the error is 2.22045*10^-16. The what the error would be for extremely small number such as 1.0*10^-100. Is there some formula that I can evaluate such error for machine precision number? I feel very confused about these numerical errors and precision thing even after reading the relevant Wolfram document. Is there some good reference to learn such things? Thanks! $\endgroup$ – cwei Oct 18 '18 at 1:02
  • $\begingroup$ @J.M.iscomputer-less Thank you for your comments! My object function is an extremely complicated function. I have no ideal to test its behavior during minimization. Maybe that is the reason. $\endgroup$ – cwei Oct 18 '18 at 1:04
  • 1
    $\begingroup$ @eyorble I see. So, the error of the final result, as a double number, depends on all intermediate numbers. However, for number other than 1.0, we have no good way to estimate the epsilon. So, it is difficult to evaluate the error for the final number. $\endgroup$ – cwei Oct 20 '18 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.