Does scipy's basinhopping default change randomly or adaptively?

I am confused about the "take_step" option in scipy.optimize.basinhopping

:

According to the online link :

The standard procedure for accepting a step by default is a random coordinate offset ... take_step may optionally have an attribute take_step.stepsize

. If this attribute exists, then basinhopping will be tuned take_step.stepsize

to try to optimize the global minimum search.

According to the source (line 587, see below), however scipy

s is basinhopping

used AdaptiveStepSize

by default, and is set stepsize

to something like 0.9 * stepsize or stepsize / 0.9, etc., regardless of whether it is specified take_step.stepsize

.

# use default
displace = RandomDisplacement(stepsize=stepsize)
take_step_wrapped = AdaptiveStepsize(displace, interval=interval,
verbose=disp)

      

So my understanding from reading the basinhopping

default source would adaptively modify the default stepsize

(0.5) by some stepize *, stepize / factor, etc., following the number of samples taken in the Metropolis-Hasting procedure. I'm confused because the online link basinhopping

, on the other hand, seems to indicate that the default stepsize

will be something completely random.

Can anyone clarify? If I haven't provided any procedure take_step

for basinhopping

, will it try with stepsize

randomly or adapt stepsize

adaptively? Thank you.

+3


source to share


1 answer


The step size is responsively updated by default. The only time it doesn't update is if you pass a custom take_step object that has no attributestepsize



+1


source







All Articles