networkqit.algorithms.basinhoppingmod.AdaptiveStepsize

class AdaptiveStepsize(takestep, accept_rate=0.5, interval=50, factor=0.9, verbose=True)[source]

Class to implement adaptive stepsize.

This class wraps the step taking class and modifies the stepsize to ensure the true acceptance rate is as close as possible to the target.

takestepcallable

The step taking routine. Must contain modifiable attribute takestep.stepsize

accept_ratefloat, optional

The target step acceptance rate

intervalint, optional

Interval for how often to update the stepsize

factorfloat, optional

The step size is multiplied or divided by this factor upon each update.

verbosebool, optional

Print information about each update

__init__(takestep, accept_rate=0.5, interval=50, factor=0.9, verbose=True)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(takestep[, accept_rate, interval, …])

Initialize self.

report(accept, **kwargs)

called by basinhopping to report the result of the step

take_step(x)