[New-bugs-announce] [issue40581] scipy's differential_evolution bug

Mike report at bugs.python.org
Sat May 9 16:43:17 EDT 2020


New submission from Mike <mikha.myara at gmail.com>:

I have a random bug with scipy's optimize . 
I use it in the context of SageMath (Python 3.7.3).
I checked 3 algorithms  : shgo, dual_annealing and full_optimize.
All don't work well (at all !).

I optimise with a 3 parameters functions with given bounds. The algorithm randomly sends to my error function the "1e-8" value for any of the 3 parameters. I displayed the vector + error to understand it. AS you can see, in this case, the first parameter is 1e-8 whereas it is outside the bounds. Sometimes it happens for the second parameter, or the 3rd ....

------
[3.95049282e-19 3.03055607e-20 1.96212098e+29] 0.0030238733573031864
[3.95273920e-19 3.05821352e-20 1.90997635e+29] 0.002957956545311753
[3.95037412e-19 3.04080173e-20 1.93312145e+29] 0.0029572689364709224
sage.all_cmdline:33: IntegrationWarning: The occurrence of roundoff error is detected, which prevents 
  the requested tolerance from being achieved.  The error may be 
  underestimated.
[1.00000000e-08 3.04080173e-20 1.93312145e+29] 1.0713560755245306
Overflow
[3.95037412e-19 3.04080173e-20 1.93312145e+29] 0.0029572689364709224
-----
The behaviour is the same for all of them. However the value inserted is not always the same, I noticed 3 : 1e-10, 1e-8 and 1.49011612e-08

Moreover, all do not send nice values. For example, the full_optimize always send values close to the highest bound. Perhaps are the value computed with a simple linear average and I guess it should not be the case.

my bounds are :
bounds = [(1*e,4*e),(0.1*e,0.5*e),(1e5,1e40)]
with e=1.6e-19

Is there an alternative for optimization in python ?

regards,
    Mike

----------
messages: 368540
nosy: mmyara
priority: normal
severity: normal
status: open
title: scipy's differential_evolution bug
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40581>
_______________________________________


More information about the New-bugs-announce mailing list