You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output of scipy.optimize.basinhopping varies between operating systems, added TODOs in the tests in #304. It does not look like it's due to the random seed that seems correctly passed, but the output tolerance.
For scipy.optimize.least_squares, I managed to have the same results on different OS by rounding the result 100 times above the variable tolerance xtol provided to the optimize function (not sure if it's 100% robust, need to think more on it).
For basinhopping and the method we use in it, one can only pass ftol (cost function) or gtol (gradient), which does not translate directly into xtol (variables of interest). So the tolerances might be too low compared to the rounding, hence different results on different OS. The equations of the tolerances are provided in the scipy doc, so we should be able to work back the influence on the variable tolerance to ensure all results are fixed.
The text was updated successfully, but these errors were encountered:
Update: in the PR #304, the output of scipy.optimize.least_squares after rounding with a lower tolerance than xtol is the same for Linux and Windows, but not for Mac.
Need to find a way to solve this more robustly...
The output of
scipy.optimize.basinhopping
varies between operating systems, added TODOs in the tests in #304. It does not look like it's due to the randomseed
that seems correctly passed, but the output tolerance.For
scipy.optimize.least_squares
, I managed to have the same results on different OS by rounding the result 100 times above the variable tolerancextol
provided to the optimize function (not sure if it's 100% robust, need to think more on it).For
basinhopping
and the method we use in it, one can only passftol
(cost function) orgtol
(gradient), which does not translate directly intoxtol
(variables of interest). So the tolerances might be too low compared to the rounding, hence different results on different OS. The equations of the tolerances are provided in thescipy
doc, so we should be able to work back the influence on the variable tolerance to ensure all results are fixed.The text was updated successfully, but these errors were encountered: