I am setting up to use SciPy's basin-hopping global optimizer. Its documentation for parameter T
states
T: float, optional
The “temperature” parameter for the accept or reject criterion. Higher “temperatures” mean that larger jumps in function value will be accepted. For best results
T
should be comparable to the separation (in function value) between local minima.
When it says "function value", does that mean the expected return value of the cost function func
? Or the value passed to it? Or something else?
I read the source, and I see where T
is passed to the Metropolis acceptance criterion, but I do not understand how it is used when converted to "beta".
I'm unfamiliar with the algorithm, but if you keep reading the documentation on the link you posted you'll find this:
Choosing T: The parameter T is the “temperature” used in the Metropolis criterion. Basinhopping steps are always accepted if
func(xnew) < func(xold)
. Otherwise, they are accepted with probability:exp( -(func(xnew) - func(xold)) / T )
. So, for best results, T should to be comparable to the typical difference (in function values) between local minima. (The height of “walls” between local minima is irrelevant.)
So I believe T should take on the value of the function which you are trying to optimize, func
. This makes sense if you look at that probability expression -- you'd be comparing a difference in function values to what is meant to be a type of "upper bound" for the step. For example, if one local minima is func = 10
and another is func = 14
, you might consider T = 4
to be an appropriate value.